- Description 🏛️
- Stack ⚙️
- Features
- Endpoints
- DataBase 📖
- Installation
- Implementation
- Link 🎯
- Developer 👋
1. Description
The project consists of developing a REST API for managing appointments in a tattoo studio. The API will allow users to perform operations such as creating, listing, updating and deleting services, managing users and appointments.
2. Stack
3. Features
- User Registration and Login
- User Management
- Service Management
- Appointment Management
4. Endpoints
Method | URI | Action |
---|---|---|
POST | /api/auth/register |
User Registration |
POST | /api/auth/login |
User login |
Method | URI | Action | Rol |
---|---|---|---|
GET | /api/users |
View all users | Super Admin |
GET | /api/users/profile |
View user profile | |
PUT | /api/users/profile |
Modify profile information | |
GET | /api/[email protected] |
Filter user by email | Super Admin |
DELETE | /api/users/:id |
Delete user | Super Admin |
PUT | /api/users/:id/role |
Role change | Super Admin |
GET | /api/users/tattoo_artist |
List all tattoo artists | Super Admin |
Method | URI | Action | Rol |
---|---|---|---|
POST | /api/appointments |
Create appointment | |
PUT | /api/appointments |
Update my appointment | |
GET | /api/appointments/:id |
Retrieve appointment | |
GET | /api/appointments |
View my own appointments |
Method | URI | Action | Rol |
---|---|---|---|
GET | /api/services |
View my own appointments | |
POST | /api/services |
Create appointment | Super Admin |
PUT | /api/services/:id |
Update my appointment | Super Admin |
GET | /api/services/:id |
Retrieve appointment | Super Admin |
5. DataBase 📖
6. Installation
In order to use this project, follow the following steps:
- Open your terminal or command line and run the following command to clone the repository from GitHub
git clone https://github.com/annahico/PROJECT-Tattoo.git
- Once the repository is cloned, access the project directory.
- Open the project folder in your favorite text editor or IDE and open the terminal
- Run the following command to install the project and all required packages.
npm install
- Create a .env file and copy what is in .env.example, but based on the information from your local database instance.
- Place the credentials and name of the database in the config file.
- Create Database
- Run migrations
npm run migrate
- Run Seeders
npm run seed
- Run Project
npm run dev
- Now in Postman you can consult each of the endpoints.
8. Link 🎯
https://github.com/annahico/PROJECT-Tattoo