Skip to content

This api recreates a fictional database where clients can register, log and create appointments with the different services that the tattoo studio provides.

Notifications You must be signed in to change notification settings

ariusvi/backend_services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Old Ink api 🎨

tattoo_img Welcome to the Old Ink's api documentation. This api recreates a fictional database where clients can register, log and create appointments with the different services that the tattoo studio provides.

Table of Contents 📂

Stack ⚓

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

DataBase MySQL 🌐

database_image

Local installation 💻

  1. Clone the repository $ git clone https://github.com/ariusvi/backend_services

  2. Install dependencies $ npm install --y

  3. Start Express on the server $ npm run dev

  4. Run migrations $ npm run run-migrations

  5. The HTTP folder includes all routes that can be imported into Thunder Client

Routes 👾

The routes worked for the project are:

AUTHENTICATION (AUTH)

  • Register a user. POST /api/auth/register body:
{
  "first_name": "name",
  "last_name": "surname",
  "email": "[email protected]",
  "password": "123456"
} 
  • Login user:
    POST /api/auth/login body:
{
    "email": "[email protected]",
    "password": "123456"
} 

USERS User routes include:

  • Get all system users being Super_admin
    Login as superadmin: POST /api/auth/login

body:

{
    "email": "[email protected]",
    "password": "123456"
} 

auth:

token

get all users: GET /api/users

auth:

token

  • View user profile

GET /api/users/profile

auth:

token

  • Edit username

PUT /api/users/profile

auth:

token

SERVICES Service routes include:

  • See all services

GET /api/services

APPOINTMENTS Appointment routes include:

  • Create a new appointment

POST /api/appointments

body:

{
    "serviceId": "4",
    "dateAppointment": "2024-03-04 13:30:00"
} 

auth:

token

  • See your appointments

GET /api/appointments

body:

{
    "id":"4"
} 

auth:

token

  • See the appointment by id

GET /api/appointments/:id

body:

{
    "id":"12"
} 

auth:

token

  • Update an appointment

PUT /api/appointments

body:

{
    "serviceId": "1",
    "userId": "4"
} 

auth:

token

Author ✒️

  • Ana Rius - student FSD

Acknowledgements 🙏

Special thanks to Daniel Tarazona for his incredible work as a teacher and above all for his infinite patience in helping to resolve any doubts and calm the panic.
Thanks to my classmates:
Pedro for his patience and help, especially to confirm that I understand things.
Marina for her moral support, joint laughter and tears, as well as her help.

About

This api recreates a fictional database where clients can register, log and create appointments with the different services that the tattoo studio provides.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published