BloomVerse is a modern, full-stack blogging platform designed to empower users to create, share, and discover engaging content. It offers a rich set of features, including user authentication, blog post management, commenting, liking, saving, and more. Whether you're a seasoned blogger or just starting out, BlogSphere provides the tools and community to thrive.
- User Authentication: Secure signup, sign-in, and password reset functionality. Google Authentication is also supported. π
- Blog Post Management: Create, edit, and delete blog posts with rich text formatting and image uploads. βοΈ
- Commenting System: Engage in discussions with other users through a nested commenting system. π¬
- Like and Save Blogs: Show appreciation for content and save your favorite blogs for later reading. β€οΈ
- User Profiles: Customizable user profiles with the ability to follow other creators. π€
- Tag-Based Filtering: Discover content based on specific tags. π·οΈ
- Search Functionality: Easily find blogs using keywords. π
- Responsive Design: Enjoy a seamless experience on any device. π±π»
- Email Verification: Ensures the authenticity of user accounts. β
- Syntax Highlighting: Code blocks in blog posts are displayed with syntax highlighting. π‘
- User Settings: Manage account settings, including profile picture and password. βοΈ
-
Frontend:
- React: A JavaScript library for building user interfaces.
- React Router DOM: For routing and navigation within the React application.
- Redux Toolkit: For state management.
- React Hot Toast: For displaying toast notifications.
- Axios: For making HTTP requests to the backend API.
- Tailwind CSS: A utility-first CSS framework for styling.
- Vite: A build tool that bundles the frontend code for production.
- Shadcn UI: UI components.
- React Syntax Highlighter: For syntax highlighting in code blocks.
-
Backend:
- Node.js: A JavaScript runtime environment.
- Express: A web application framework for Node.js.
- Mongoose: An Object Data Modeling (ODM) library for MongoDB and Node.js.
- MongoDB: A NoSQL database for storing application data.
- JWT (JSON Web Tokens): For user authentication and authorization.
- Bcrypt: For password hashing.
- Cors: Middleware for enabling Cross-Origin Resource Sharing (CORS).
- Multer: Middleware for handling file uploads.
- Cloudinary: For image storage and retrieval.
- Nodemailer: For sending emails (e.g., for password reset, email verification).
- Dotenv: For managing environment variables.
-
Other:
- Firebase: For Google Authentication.
- Node.js (>=16)
- npm or yarn
- MongoDB installed and running
- Cloudinary account (for image storage)
- Firebase project (for Google Authentication)
-
Clone the repository:
git clone <repository-url> cd BlogSphere
-
Install backend dependencies:
cd backend npm install # or yarn install
-
Configure backend environment variables:
-
Create a
.envfile in thebackenddirectory. -
Add the following environment variables:
PORT=5000 DB_URI=<your-mongodb-connection-string> DB_NAME=<your-database-name> JWT_SECRET=<your-jwt-secret> CLOUDINARY_CLOUD_NAME=<your-cloudinary-cloud-name> CLOUDINARY_API_KEY=<your-cloudinary-api-key> CLOUDINARY_API_SECRET=<your-cloudinary-api-secret> EMAIL_USER=<your-email-address> EMAIL_PASS=<your-email-password> FRONTEND_URL=<your-frontend-url>
-
-
Install frontend dependencies:
cd ../frontend npm install # or yarn install
-
Configure frontend environment variables:
-
Create a
.envfile in thefrontenddirectory. -
Add the following environment variable:
VITE_BACKEND_URL=<your-backend-url>
-
-
Configure Tailwind CSS:
- Ensure
tailwind.config.jsis properly configured with your theme customizations.
- Ensure
-
Configure Vite:
- Ensure
vite.config.jsis properly configured with plugins and aliases.
- Ensure
-
Start the backend server:
cd backend npm run dev -
Start the frontend development server:
cd frontend npm run dev
- Open your browser and navigate to the frontend URL (usually
http://localhost:5173). - Sign up for a new account or sign in with an existing account.
- Start creating and sharing your blog posts!
- Explore the platform, discover new content, and engage with other users.
BlogSphere/
βββ backend/
β βββ config/
β β βββ dbConnect.js
β β βββ cloudinaryConfig.js
β β βββ dotenv.config.js
β βββ controllers/
β β βββ blogController.js
β β βββ userController.js
β βββ middlewares/
β β βββ auth.js
β βββ models/
β β βββ blogModel.js
β β βββ userModel.js
β βββ routes/
β β βββ blogRoute.js
β β βββ userRoute.js
β βββ utils/
β β βββ generateToken.js
β β βββ multer.js
β β βββ logger.js
β βββ server.js
β βββ package.json
βββ frontend/
β βββ src/
β β βββ components/
β β βββ context/
β β βββ hooks/
β β βββ pages/
β β βββ react-components/
β β βββ utils/
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β β βββ ...
β βββ public/
β βββ vite.config.js
β βββ tailwind.config.js
β βββ package.json
βββ .gitignore
βββ README.md
βββ package.json
| Method | Endpoint | Description |
|---|---|---|
POST |
/signup |
Create a new user account |
POST |
/signin |
Login and receive JWT token |
GET |
/users |
Fetch all users |
GET |
/users/:username |
Get user by username |
PATCH |
/users/:id |
Update user profile (auth required) |
DELETE |
/users/ |
Delete logged-in user |
GET |
/users/check-username/:username |
Check username availability |
GET |
/verify-email/:verificationToken |
Verify user email |
POST |
/google-auth |
Google OAuth login |
PATCH |
/follow/:creatorId |
Follow/unfollow a creator |
POST |
/users/:username/settings |
Update account settings |
PUT |
/auth/reset-password/:id |
Reset password (auth required) |
PUT |
/auth/forget-password |
Send password reset link |
| Method | Endpoint | Description |
|---|---|---|
GET |
/blogs |
Get all blogs (with filters/pagination) |
GET |
/blogs/:id |
Fetch specific blog details |
POST |
/blogs |
Create a blog post (auth + image upload) |
PUT |
/blogs/:id |
Edit a blog post (author only) |
DELETE |
/blogs/:id |
Delete a blog post (author only) |
POST |
/blogs/like/:id |
Like/unlike a blog |
PATCH |
/save-blog/:id |
Save/unsave a blog |
GET |
/search-query |
Search blogs |
GET |
/tag/:tagName |
Filter blogs by tag |
| Method | Endpoint | Description |
|---|---|---|
POST |
/blogs/comment/:id |
Add a comment to a blog |
PUT |
/blogs/edit-comment/:id |
Edit comment |
DELETE |
/blogs/comment/:id |
Delete comment |
PATCH |
/blogs/like-comment/:id |
Like/unlike a comment |
POST |
/comment/:parentCommentId/:id |
Reply to a comment (nested) |
To ensure BloomVerse can handle real-world usage efficiently, the appβs architecture and deployment pipeline are designed with scalability, maintainability, and performance in mind.
- Code Splitting & Lazy Loading: Reduces bundle size by loading components on demand.
- CDN Caching: Static assets served via Vercel CDN for global fast delivery.
- Environment-Based Config: Frontend consumes API via
VITE_BACKEND_URL, supporting development, staging, and production environments. - Responsive UI: Built with Tailwind CSS and Shadcn UI, ensuring smooth rendering across all screen sizes and devices.
- Modular Architecture: Controllers, routes, and middleware are fully modular, allowing future conversion into microservices.
- MongoDB Atlas: Provides automatic scaling, backups, and global distribution.
- Load Balancing: Easily scalable horizontally using NGINX or AWS Load Balancer.
- Media Handling: Cloudinary CDN offloads image delivery, reducing backend load.
- Security: Implemented bcrypt for password hashing, JWT for secure authentication, and environment-based secret management.
- Frontend: Deployed on Vercel with automatic caching, build optimization, and instant rollback capabilities.
- Backend: Hosted on Render, with potential to migrate to Docker or AWS EC2 for advanced scaling.
- Error Monitoring: Logging middleware using Winston and error tracking with Sentry ensure scalable observability.
- Introduce Redis caching for trending posts and session management.
- Implement message queues (e.g., Kafka or RabbitMQ) for asynchronous tasks like email delivery and notifications.
- CI/CD: Easy integration with GitHub Actions for automated testing and continuous deployment.
- Containerize the app using Docker, and deploy via Kubernetes for automatic load balancing and scaling.
- Add GraphQL API support for efficient and flexible data querying.
π‘ With this architecture, BloomVerse can scale both vertically (by increasing resources) and horizontally (by adding nodes), while maintaining high performance, security, and reliability.
We welcome contributions to BlogSphere! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive commit messages.
- Push your changes to your fork.
- Submit a pull request to the main repository.
This project is licensed under the MIT License.
Thank you for checking out BloomVerse! We hope you find it useful and enjoyable.
This is written by readme.ai, your go-to platform for generating beautiful and informative README files.