Code Monkey home page Code Monkey logo

blogflux-express-api's Introduction

Blogflux

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.

API Endpoints

User Routes

  • GET /users/ - Get all users
  • POST /users/ - Create a new user
  • PATCH /users/ - Update user details (authentication required)
  • DELETE /users/ - Delete a user (authentication required)
  • POST /users/login - User login
  • GET /users/profile - Get user profile (authentication required)

Post Routes

  • GET /post/ - Get all posts
  • POST /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 blogs
  • GET /post/topblogger - Get top bloggers

Project Structure

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

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/Blogflux.git
    cd Blogflux
  2. Install dependencies:
     npm install
  3. 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
  4. Start the application:
    npm start
    
    

blogflux-express-api's People

Contributors

tariq-monowar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.