A full-stack Blog Publishing Platform built with the MERN stack (MongoDB, Express, React, Node.js).
The platform allows users to authenticate, create posts, interact (likes, comments, bookmarks), and manage profiles with a sleek UI and dark mode support.
- 🔐 Google OAuth login
- 📝 Blog post CRUD (create, read, update, delete)
- 💬 Comments
- ❤️ Likes
- 📌 Bookmarks
- 👤 Profile setup (bio, profile picture)
- 🌗 Dark/Light mode toggle
- 🔍 Search posts by tags & titles
- 📱 Responsive Tailwind UI
MittarvBlog/
│── backend/ # Node.js + Express API
│ ├── controllers/ # User, Post, Comment controllers
│ ├── models/ # Mongoose schemas
│ ├── routes/ # Express routes
│ ├── server.js # API entrypoint
│ └── .env.example # Backend environment variables
│
│── frontend/ # React (Vite) client
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page-level components
│ │ ├── redux/ # Redux Toolkit slices
│ │ ├── App.jsx # Main app
│ │ ├── main.jsx # React root
│ │ └── index.css # Tailwind styles
│ ├── tailwind.config.js # Tailwind theme
│ └── vite.config.js # Vite config
│
├── README.md
├── package.json
└── .gitignore
git clone https://github.com/your-username/MittarvBlog.git
cd MittarvBlogcd backend
npm installCreate .env file (copy from .env.example):
PORT=5000
MONGO_URI=your_mongo_uri
JWT_SECRET=your_jwt_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
FRONTEND_URL=http://localhost:5173Run backend:
npm run devcd frontend
npm install
npm run devGET /api/auth/google→ Google loginGET /api/auth/logout→ Logout
GET /api/posts→ Get all postsPOST /api/posts→ Create new postGET /api/posts/:id→ Get single postPUT /api/posts/:id→ Update postDELETE /api/posts/:id→ Delete postPOST /api/posts/:id/like→ Like postPOST /api/posts/:id/unlike→ Unlike post
POST /api/posts/:id/comments→ Add commentGET /api/posts/:id/comments→ Fetch comments
GET /api/users/me→ Get my profilePUT /api/users/me→ Update my profileGET /api/users/:id→ View user profilePOST /api/users/bookmarks/:postId→ Bookmark postDELETE /api/users/bookmarks/:postId→ Remove bookmarkGET /api/users/bookmarks→ Get all bookmarks
Frontend: React (Vite), Redux Toolkit, TailwindCSS
Backend: Node.js, Express.js, MongoDB, Mongoose
Auth: Google OAuth2 + JWT
Others: dotenv, axios, bcrypt
This project was built with the assistance of AI tools (ChatGPT, Copilot, Cursor) for:
- Generating boilerplate (controllers, routes, Redux slices)
- UI/UX improvements (color themes, gradients, dark mode toggle)
- Debugging API & state issues
- Writing documentation (README, comments)
- Fork the repo
- Create branch
feature/xyz - Commit changes
- Push and open PR