Skip to content
An application to book appointments. 🚧
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
src
.editorconfig
.env.example
.env.test
.eslintrc.js
.gitignore
.prettierrc
.sequelizerc
README.md
jest.config.js
nodemon.json
package.json
yarn.lock

README.md

Welcome to Bookets API Project 👋

Version License: MIT Twitter: priscribeiro

An application to help people to create appointments.

-----------------------------------------------------

🏠 Homepage

➤ Getting Started

Spend a minute reading this getting started guide to setup and run the API correctly.

Installation

To install the API run the following command on your terminal:

yarn

or

npm install

Run the app

Run the command

yarn dev

and go to the http://localhost:8888 endpoint.

Run tests

To run tests, type the following command on your terminal:

yarn test

-----------------------------------------------------

➤ REST API

Use a Postgres instance with Docker

Use the postgres:11 image instead

docker run --name some-postgres-name -e POSTGRES_PASSWORD=mysecretpassword -d postgres:11

Use a Mongo instance with Docker

docker run --name some-mongo-name -p 27017:27017 -d -t mongo

Use a Redis instance with Docker

docker run --name some-redis-name -p 6379:6379 -d -t redis:alpine

Features

  • RESTful routing
  • Models with proper relationships
  • Controllers/Models etc with proper separation of concerns
  • JWT Authentication
  • RESTful errors

Requests

Users

POST

POST http://localhost:8888/users

{
  "name": "user03",
  "email": "user03@email.com",
  "password": "123456",
  "provider": true
}

PUT

PUT http://localhost:8888/users

{
  "email": "user01.1@email.com",
  "password": "123456",
  "confirmPassword": "123456"

}

Providers

GET

Provide Bearer Token

GET http://localhost:8888/providers

Session

POST

POST http://localhost:8888/sessions

{
  "email": "user01@email.com",
  "password": "123456",
}

Appointments

POST

Provide Bearer Token

POST http://localhost:8888/appointments

{
  "provider_id":4,
  "date": "2019-11-05T12:00:00-03:00"
}

GET

Provide Bearer Token

GET http://localhost:8888/appointments

DELETE

Provide Bearer Token

DELETE http://localhost:8888/appointments/{id}

Schedule

GET

Provide Bearer Token

GET http://localhost:8888/schedule

Notifications

GET

Provide Bearer Token

GET http://localhost:8888/notifications

-----------------------------------------------------

Author

👤 Priscilla Ribeiro

Show your support

Give a ⭐️ if this project helped you!

Buy Me a Coffee at ko-fi.com

You can’t perform that action at this time.