Skip to content

mobinsha/Coffee-Shop-Server

Repository files navigation

Coffee Shop Server

A backend server for managing a coffee shop application built with Node.js, Express, and MySQL. This server provides APIs for managing users, products, services, and blogs.

Features

  • User Authentication: Secure login with JWT.
  • Product Management: CRUD operations for coffee shop products.
  • Blog Management: Users can add, view, update, and delete blogs.
  • Role-Based Access Control: Admin and user roles for specific API access.

Tech Stack

  • Backend: Node.js, Express.js
  • Forntend: React.js, vite
  • Database: MySQL
  • Authentication: JWT
  • Validation: express-validator

Setup

  1. Clone the repository:
    git clone https://github.com/mobinsha/Coffee-Shop-Server.git
    cd Coffee-Shop-Server
  2. Install dependencies:
    npm install
  3. Run the server:
    npm start
    Server will start on http://localhost:3000.

API Endpoints

Users

  • POST /users/login: User login with JWT authentication.
  • POST /users/register: Register a new user.

Products

  • **GET
  • **GET
  • **POST
  • **PUT
  • **DELETE

Blogs

  • **GET
  • **GET
  • **POST
  • **PUT
  • **DELETE

Service

  • **GET
  • **GET
  • **POST
  • **PUT
  • **DELETE

Recommended

  • **GET

Menu

  • **GET

Database

The database folder contains the SQL backup of the project. To use it:

  1. Import the coffee-shop.sql file into your MySQL database:
    mysql -u [username] -p [database_name] < coffee-shop.sql
    
    

About

server of coffee shop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published