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 Website – Explore the blog, read posts, and try out the 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
- Node.js + Express.js
- MongoDB + Mongoose
- JWT Authentication
- bcrypt for password hashing
- 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
- Node.js and npm/yarn installed
- MongoDB running locally or MongoDB Atlas URL
https://github.com/rahat728/blog.git
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
cd ./client
npm install
Create a .env
file in frontend/
:
VITE_API_URL=http://localhost:5000
Start frontend server:
npm run dev
blog/
├── backend/
│ ├── models/
│ └── index.js
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── api/
│ │ ├── App.jsx
│ │ └── main.jsx
├── .env
└── README.md
- Users are authenticated using JWT tokens
- Protected routes on both client and server
- Tokens stored in HTTP-only cookies
- Render
- Render
- Name: Asifuzzaman Rahat
- Email: asifuzzamanrahat728@gmail.com
- LinkedIn: mdrahat728
- GitHub: github