Blogflux is a blogging platform that allows users to create, update, and delete blog posts. Users can also rate blogs, comment, and view top blogs and bloggers. The platform features authentication and authorization mechanisms to ensure secure access and interaction.
GET /users/
- Get all usersPOST /users/
- Create a new userPATCH /users/
- Update user details (authentication required)DELETE /users/
- Delete a user (authentication required)POST /users/login
- User loginGET /users/profile
- Get user profile (authentication required)
GET /post/
- Get all postsPOST /post/
- Create a new post (authentication required)PATCH /post/:id
- Update a post (authentication required)DELETE /post/:id
- Delete a post (authentication required)POST /post/like/:id
- Like or unlike a post (authentication required)POST /post/comment/:id
- Create a comment on a post (authentication required)DELETE /post/comment/:postId/:commentId
- Delete a comment (authentication required)GET /post/topblogs
- Get top blogsGET /post/topblogger
- Get top bloggers
├── config
│ ├── config.js
│ └── db.js
├── controllers
│ ├── posts.controllers.js
│ ├── users.controllers.js
│ └── verifyUser.js
├── models
│ ├── posts.models.js
│ └── users.models.js
├── routes
│ ├── posts.routes.js
│ └── users.routes.js
├── app.js
├── index.js
├── .env
├── package-lock.json
├── package.json
└── README.md
- Clone the repository:
git clone https://github.com/your-username/Blogflux.git cd Blogflux
- Install dependencies:
npm install
- Set up environment variables:
DBURL=your_mongodb_connection_string PORT=your_port_number SECRET_KEY=your_jwt_secret_key IMGBB_API_KEY=your_imgbb_api_key
- Start the application:
npm start