Skip to content

rayhqE/Blog-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Blogify – A Full-Stack Blogging Platform

Blogify is a full-featured blogging web application built using the MERN (without React) stack. It allows users to sign up, sign in, create blog posts with image uploads, and view their personalized content securely.


πŸš€ Features

  • πŸ§‘β€πŸ’» User authentication with secure JWT-based session handling
  • ✍️ Create, read, and view blog posts with cover image support
  • πŸ“Έ Image uploads handled with Multer and stored locally
  • 🧭 Dynamic UI rendering based on user login state
  • πŸ“š Clean MVC architecture with EJS templating
  • 🎨 Responsive Bootstrap 5 UI

πŸ› οΈ Tech Stack

Layer Technology
Backend Node.js, Express.js
Frontend EJS (Embedded JavaScript) templates
Database MongoDB with Mongoose ODM
Authentication JWT (JSON Web Tokens) via cookies
File Uploads Multer
Styling Bootstrap 5

πŸ“‚ Folder Structure

Blog-App/
β”œβ”€β”€ middlewares/              # Custom Express middlewares
β”‚   └── authentication.js     # JWT authentication logic
β”œβ”€β”€ models/                   # Mongoose schema models
β”‚   β”œβ”€β”€ blog.js               # Blog schema
β”‚   β”œβ”€β”€ comments.js           # Comment schema (optional)
β”‚   └── user.js               # User schema
β”œβ”€β”€ node_modules/             # Installed dependencies
β”œβ”€β”€ public/                   # Static assets
β”‚   β”œβ”€β”€ images/               # Placeholder/static images
β”‚   └── uploads/              # Uploaded blog cover images
β”œβ”€β”€ routes/                   # Express route handlers
β”‚   β”œβ”€β”€ blog.js               # Blog-related routes
β”‚   └── user.js               # User routes (signup/signin/logout)
β”œβ”€β”€ services/                 # Logic services
β”‚   └── authentication.js     # Token generation/validation
β”œβ”€β”€ views/                    # EJS templates
β”‚   β”œβ”€β”€ partials/             # Reusable partial templates
β”‚   β”‚   β”œβ”€β”€ head.ejs
β”‚   β”‚   β”œβ”€β”€ nav.ejs
β”‚   β”‚   └── scripts.ejs
β”‚   β”œβ”€β”€ addBlog.ejs           # Add new blog form
β”‚   β”œβ”€β”€ blog.ejs              # Blog detail view
β”‚   β”œβ”€β”€ home.ejs              # Home page with all blogs
β”‚   β”œβ”€β”€ signin.ejs            # Login page
β”‚   └── signup.ejs            # Register page
β”œβ”€β”€ index.js                  # Main Express app
β”œβ”€β”€ package.json              # Project dependencies
β”œβ”€β”€ package-lock.json         # Locked versions of dependencies
└── README.md                 # Project documentation

πŸ› οΈ Installation & Setup

To run this project locally, follow these steps:

  1. Clone the repository

    git clone https://github.com/your-username/blogify.git
    cd blogify
    
  2. Install all Dependencies

npm install

  1. Ensure MongoDB is running locally

By default, the app connects to: mongodb://localhost:27017/blogify

  1. Start the development server npm run dev

  2. Visit the app in your browser

http://localhost:8000

About

πŸ“ A simple and clean blogging web app where users can sign up, log in, write blogs with images, and manage their posts easily.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors