Skip to content

akashkhedar/Postio-Blogging

Repository files navigation

Postio - Blog

Postio is a full-stack blogging platform built with Node.js, Express, MongoDB, and EJS. It allows users to sign up, log in, create blog posts with images, and comment on posts. The app features authentication, user roles, and a clean UI.

Features

  • User authentication (signup, login, logout)
  • Create, view, and comment on blog posts
  • Image upload for blog cover images
  • EJS templating for server-side rendering
  • MongoDB for data storage (blogs, users, comments)
  • Middleware for authentication and authorization
  • Static file serving for images and styles

Project Structure

Postio - Blog/
│   db.js                # MongoDB connection
│   index.js             # Main Express app
│   package.json         # Project metadata and dependencies
│
├── controllers/         # Route controller logic
│   ├── addBlog.js
│   ├── addBlogPage.js
│   ├── homePage.js
│   ├── loginPage.js
│   ├── logout.js
│   ├── signupPage.js
│   ├── usercomment.js
│   ├── userLogin.js
│   └── userSignup.js
│
├── middlewares/         # Express middleware
│   └── userAuthenticate.js
│
├── models/              # Mongoose models
│   ├── blog.js
│   ├── comments.js
│   └── user.js
│
├── public/              # Static assets
│   ├── images/
│   ├── stylesheets/
│   └── uploads/
│
├── routes/              # Express route definitions
│   ├── addBlog.js
│   ├── comment.js
│   ├── homeRoute.js
│   ├── login.js
│   ├── logout.js
│   ├── signup.js
│   ├── userAddBlog.js
│   ├── userLogin.js
│   └── userSignup.js
│
├── services/            # Service logic (e.g., authentication)
│   └── authentication.js
│
├── views/               # EJS templates
│   ├── addBlog.ejs
│   ├── home.ejs
│   ├── login.ejs
│   ├── signup.ejs
│   └── partials/
│       ├── head.ejs
│       ├── navbar.ejs
│       └── scripts.ejs

Getting Started

Prerequisites

  • Node.js
  • MongoDB

Installation

  1. Clone the repository
  2. Run npm install to install dependencies
  3. Start MongoDB locally (default URI: mongodb://localhost:27017/blogify)
  4. Run npm start to start the development server
  5. Visit http://localhost:8000 in your browser

Scripts

  • npm start — Starts the server with nodemon

Main Dependencies

  • express
  • mongoose
  • ejs
  • multer
  • cookie-parser
  • jsonwebtoken

License

ISC


Generated README for Postio - Blog.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors