/api-clinica-dentista

Primary LanguageJavaScriptMIT LicenseMIT

DENTAL CLINIC API 🦷

This API tries to emulate in a simplified form a dental clinic and it's appointments.

start

Write the following commands line:

  • npm i -> Install all dependencies needed from package.json. You can take a look here
  • docker-compose up -> We have here mysql and phpMyAdmin services.
  • docker rm -f $(docker ps -aq) -> If you want to delete those services once installed
  • npm start -> Server up on port 3001.

DB design 🗃️

db_model_1
We wanted to start with a basic example (KISS), with a clean design for in a future continue adding more specifications.

CRUD with postman

Here you can check CRUD methods we have implemented:
Run in Postman

endpoints

POST:
-Customer register: http://localhost:3001/signup
Customer login: http://localhost:3001/signin
Customer appointment: http://localhost:3001/appointments
GET:
All customers registered: http://localhost:3001/customers/
Get a customer by ID: http://localhost:3001/customers/:id
Show all appointments (pending and not): http://localhost:3001/appointments
Show only pending appointments: http://localhost:3001/appointments/pending
Show only pending appointments from an specific customer: http://localhost:3001/appointments/customers/:customerId
DELETE:
Delete a customer by ID: http://localhost:3001/customers/:id
Delete only pending appointments: http://localhost:3001/appointments/pending/:id

technologies used 🛠️

JS nodejs sequelize postman docker phpmyadmin mysql

dependencies

  • bcrypt
  • express
  • install
  • jsonwebtoken
  • mysql2
  • nodemon
  • sequelize

authors 🧐

@vicGeo
@Kronapsys

🔝 TO THE TOP 🔝