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
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