This project allows company owners to manage their branches. Owners can list and edit all branches, while employees can only view and list branches. This system includes a back-end solution built using Node.js, Express, and Sequelize for database management.
- Overview
- Use-Case Diagram
- Database Diagram
- Prerequisites
- Part 1: Diagrams
- Part 2: Setup
- API Endpoints
- Environment Variables
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/Etkiny/mindBehind-backend.git
-
Create a
.env
file in the project root directory and add your database credentials:DB_HOST=your_db_host DB_USER=your_db_user DB_PASSWORD=your_db_password DB_NAME=your_db_name DB_PORT=3306
Replace
your_db_host
,your_db_user
,your_db_password
, andyour_db_name
with your actual database credentials. -
Start the services using Docker Compose:
docker-compose up -d
GET /api/branches
: List all branches (accessible by Owners, Employees, Customers)GET /api/branches/:id
: Get a branch by ID (accessible by Owners, Employees, Customers)PUT /api/branches/:id
: Update a branch by ID (accessible by Owners)
The application uses the following environment variables, which should be set in a .env
file:
DB_HOST
: Database hostDB_USER
: Database userDB_PASSWORD
: Database passwordDB_NAME
: Database nameDB_PORT
: Database port (default: 3306)