A modern, feature-rich blogging platform with a clean reader experience and a powerful admin panel.
- Overview
- Features
- Tech Stack
- Project Structure
- Application Flow
- API Reference
- Screenshots
- Getting Started
- Environment Variables
- Future Roadmap
- Author
BlogVerse is a full-stack blogging application that provides a seamless reading experience for users and a powerful admin dashboard for content management. Built with the latest version of Next.js, it leverages both server-side rendering and API routes to deliver a fast, SEO-friendly blogging experience.
Whether you're publishing your thoughts, managing a newsletter, or building a content-driven site β BlogVerse has you covered.
- π° Browse all published blog posts on the homepage
- π Filter blogs by category
- π Read full blog detail pages with rich content
- π§ Subscribe to the newsletter with email
| Feature | Description |
|---|---|
| βοΈ Add Blog | Create new posts with image upload |
| ποΈ Delete Blog | Remove posts and associated images |
| π Blog List | View and manage all published blogs |
| π¬ Subscriptions | View and delete subscriber emails |
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 14 | Fullstack Framework (Frontend + API) |
| React.js | 18 | Component-based UI |
| MongoDB | Latest | NoSQL Database |
| Mongoose | Latest | ODM / Schema Modeling |
| Tailwind CSS | 3 | Utility-first Styling |
| Axios | Latest | HTTP Client |
| React Toastify | Latest | Toast Notifications |
project-root/
β
βββ π app/
β βββ π api/
β β βββ π blogs/
β β β βββ route.js # Blog CRUD endpoints
β β βββ π email/
β β βββ route.js # Email subscription endpoints
β β
β βββ π admin/
β β βββ π addProduct/
β β β βββ page.jsx # Add new blog (admin)
β β βββ π blogList/
β β β βββ page.jsx # Manage all blogs (admin)
β β βββ π subscriptions/
β β βββ page.jsx # View subscribers (admin)
β β
β βββ π blogs/
β β βββ π [id]/
β β βββ page.jsx # Dynamic blog detail page
β β
β βββ layout.js # Root layout
β βββ page.jsx # Homepage
β
βββ π Components/
β βββ π AdminComponents/
β β βββ BlogTableItem.jsx # Blog row in admin table
β β βββ SubsTableItem.jsx # Subscriber row in admin table
β β
β βββ BlogItem.jsx # Blog card component
β βββ BlogList.jsx # Blog grid/list component
β βββ Footer.jsx # Site footer
β βββ Header.jsx # Site header & navigation
β
βββ π lib/
β βββ π config/
β β βββ db.js # MongoDB connection
β βββ π models/
β βββ BlogModel.js # Blog Mongoose schema
β βββ EmailModel.js # Email Mongoose schema
β
βββ π public/ # Static assets & uploaded images
βββ .env # Environment variables
βββ package.json
βββ README.md
User Opens Homepage
β
βΌ
BlogList Component Mounts
β
βΌ
Axios GET β /api/blogs
β
βΌ
API Queries MongoDB
β
βΌ
JSON Response Returned
β
βΌ
Blogs Rendered on UI
User Clicks Blog Card
β
βΌ
Navigate to /blogs/[id]
β
βΌ
Axios GET β /api/blogs?id=blogId
β
βΌ
MongoDB Finds Document
β
βΌ
Blog Detail Page Rendered
Admin Fills Blog Form
β
βΌ
Image + Form Data Submitted
β
βΌ
POST β /api/blogs
β
βΌ
Image Saved to /public
β
βΌ
Blog Document Stored in MongoDB
β
βΌ
β
Success Toast Displayed
Admin Clicks Delete
β
βΌ
DELETE β /api/blogs?id=id
β
βΌ
Blog Removed from MongoDB
β
βΌ
Associated Image Deleted from /public
β
βΌ
UI Refreshed Automatically
User Enters Email Address
β
βΌ
POST β /api/email
β
βΌ
Email Stored in MongoDB
β
βΌ
β
Success Toast Displayed
| Method | Endpoint | Description | Body / Params |
|---|---|---|---|
GET |
/api/blogs |
Fetch all blogs | β |
GET |
/api/blogs?id={id} |
Fetch single blog | id query param |
POST |
/api/blogs |
Create a new blog | FormData with image |
DELETE |
/api/blogs?id={id} |
Delete a blog | id query param |
| Method | Endpoint | Description | Body / Params |
|---|---|---|---|
POST |
/api/email |
Add subscriber email | { email } |
GET |
/api/email |
Get all subscribers | β |
DELETE |
/api/email?id={id} |
Remove a subscriber | id query param |
| Page | Description |
|---|---|
| π Homepage | Blog grid with category filters |
| π Blog Detail | Full article view |
| β Admin β Add Blog | Form to publish new posts with image |
| π Admin β Blog List | Table of all posts with delete actions |
| π¬ Admin β Subscriptions | Table of all subscriber emails |
Make sure you have the following installed:
1. Clone the repository
git clone https://github.com/your-username/blogverse.git
cd blogverse2. Install dependencies
npm install
# or
yarn install3. Set up environment variables
Create a .env file in the root directory:
MONGO_URI=your_mongodb_connection_string4. Run the development server
npm run dev
# or
yarn dev5. Open in browser
Navigate to http://localhost:3000
npm run build
npm start| Variable | Description | Required |
|---|---|---|
MONGO_URI |
MongoDB connection string (Atlas or local) | β Yes |
π‘ Tip: For local development, you can use MongoDB Atlas Free Tier or a local MongoDB instance.
Here's what's planned for upcoming releases:
- π Authentication β Secure admin login with NextAuth.js
- π Rich Text Editor β WYSIWYG editor (e.g., TipTap or Quill) for content creation
- π Search Functionality β Full-text search across blog titles and content
- π Dark Mode β System-aware and toggle-able theme
- π Pagination β Paginate blog listings for better performance
- π¬ Comments System β Allow readers to engage with posts
- β€οΈ Blog Likes β Like/upvote system for blogs
- π·οΈ Tags β Tag-based filtering in addition to categories
- πΊοΈ Sitemap & SEO β Auto-generated sitemap and Open Graph meta tags
- π Analytics Dashboard β Track page views and popular posts
This project is licensed under the MIT License β see the LICENSE file for details.
β If you found this project helpful, please give it a star! β