Giter Club home page Giter Club logo

my-brand's Introduction

My Brand Backend

GitHub package.json version API Docs Frontend Repo

Backend services for MyBrand project.


Links

Table of Contents



Description

This repository contains the backend services for MyBrand, a project aimed at managing blogs, users, and their associated data. It provides RESTful APIs for communication with the frontend and handles authentication, database operations, and more.


Features

  • Authentication: Secure user authentication using JSON Web Tokens (JWT).
  • Data Management: CRUD operations for blogs and users, powered by MongoDB with Mongoose.
  • File Uploads: Multer middleware for handling file uploads.
  • Email Verification: Verify user emails using Nodemailer.
  • API Documentation: Swagger UI for easy API reference.

This repository contains the backend services for MyBrand, a project aimed at managing blogs, users, and their associated data. It provides RESTful APIs for communication with the frontend and handles authentication, database operations, and more.


Features

  • Authentication: Secure user authentication using JSON Web Tokens (JWT).
  • Data Management: CRUD operations for blogs and users, powered by MongoDB with Mongoose.
  • File Uploads: Multer middleware for handling file uploads.
  • Email Verification: Verify user emails using Nodemailer.
  • API Documentation: Swagger UI for easy API reference.

Installation

To run the backend locally, follow these steps:

  1. Clone this repository:

    git clone https://github.com/hbapte/MyBrand-Backend.git
    
  2. Install dependencies:

    npm install
    

Usage

  1. To start the server in development mode, use:

    npm run dev
    
  2. For production, build the project first and then start the server:

    npm run build
    npm start
    

API Documentation

API documentation is available using Swagger UI. You can access it https://my-brand-oxuh.onrender.com/api-docs/

Testing

  1. To run tests, use:

    npm run test
    
  2. To run test with coverage summary:

    npm run coverage
    

API Endpoints

API Servers

NO METHOD ENDPOINT STATUS ACCESS DESCRIPTION
1 GET / 200 Public Welcome to the API
2 POST /auth/register 201 Public Register a new user
3 POST /auth/login 201 Public User login
4 POST /blogs 201 Auth Token Add a new blog
5 GET /blogs 200 Public Get all blogs
6 GET /blogs/{id} 200 Public Get a blog by ID
7 PUT /blogs/{id} 200 Auth Token Update a blog by ID
8 DELETE /blogs/{id} 200 Auth Token Delete a blog by ID
9 POST /contact 200 Public Add a new message
10 GET /contact 200 Public Get all messages
11 DELETE /contact/{id} 200 Auth Token Delete a message by ID

License

This project is licensed under the MIT License.

my-brand's People

Contributors

hbapte avatar imgbotapp 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.