blog Tailwind Templates

Blog

A full-featured blogging application built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. Users can create, edit, and delete blog posts, register and log in, and read articles from others.

๐Ÿ“ MERN Stack Blog Platform

A full-featured blogging application built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. Users can create, edit, and delete blog posts, register and log in, and read articles from others.

๐ŸŒ Live Demo

Live Website โ€“ Explore the blog, read posts, and try out the features.

โœจ Features

โœ… User Authentication (JWT-based) โœ… Create, Read, Update, Delete (CRUD) blog posts โœ… Rich text editing with image support โœ… Responsive design โœ… Author-specific dashboard โœ… Protected routes and session management โœ… MongoDB for flexible post storage โœ… RESTful API with error handling


๐Ÿ› ๏ธ Tech Stack

๐Ÿง  Backend

  • Node.js + Express.js
  • MongoDB + Mongoose
  • JWT Authentication
  • bcrypt for password hashing

๐ŸŽจ Frontend

  • React.js
  • Tailwind CSS or CSS Modules
  • Axios for API requests
  • React Router for page navigation
  • React Hook Form or Formik for handling forms
  • Lexical for rich text editor

๐Ÿ“ธ Screenshots

๐Ÿ  Home Page

Home Page

๐Ÿ“ Blog Editor

Editor

๐Ÿ” Login

Login


๐Ÿงช Getting Started

Prerequisites

  • Node.js and npm/yarn installed
  • MongoDB running locally or MongoDB Atlas URL

โš™๏ธ Installation

1. Clone the repository

https://github.com/rahat728/blog.git

2. Backend Setup

cd backend
npm install

Create a .env file in backend/:

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
CLOUDINARY_CLOUD_NAME=name
CLOUDINARY_API_KEY=api_key
CLOUDINARY_API_SECRET=api_secret

Start backend server:

npm run dev

3. Frontend Setup

cd ./client
npm install

Create a .env file in frontend/:

VITE_API_URL=http://localhost:5000

Start frontend server:

npm run dev

๐Ÿ“ Folder Structure

blog/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ index.js
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx
โ”œโ”€โ”€ .env
โ””โ”€โ”€ README.md

๐Ÿ” Authentication

  • Users are authenticated using JWT tokens
  • Protected routes on both client and server
  • Tokens stored in HTTP-only cookies

๐Ÿš€ Deployment

Frontend:

  • Render

Backend:

  • Render

๐Ÿ™‹โ€โ™‚๏ธ Author


Top categories

tailwind logo

Need a Tailwind website built?

Hire a professional TailwindCSS developer today.
Loading Svelte Themes