Skip to content

khashvin/ams

Repository files navigation

Appointment Booking System

Installation

npm install

Setup

cp .env.example .env
  1. Update the .env file with a random secret for JWT
  2. Create the database and run the migrations
npm run migrate
  1. Seed the database with the initial data (Appointment Slots)
npm run seed

Running the app

npm run dev

View Database with (Drizzle Studio)

npm run studio

API Endpoints

Get All Available Slots

Endpoint

GET /api/v1/slots

Get Available Slots for a Specific Date

Endpoint

GET /api/v1/slots?dateTime=2024-04-04 10:00:00

Get User Bookings

Endpoint

GET /api/v1/bookings

Book an Appointment

Endpoint

POST /api/v1/bookings

Body

{
  "dateTime": "2024-04-04 10:00:00"
}

Cancel an Appointment

Endpoint

DELETE /api/v1/bookings

Body

{
  "dateTime": "2024-04-04 10:00:00"
}

Update an Appointment

Endpoint

PATCH /api/v1/bookings

Body

{
  "dateTime": "2024-04-04 10:00:00"
}

About

Appointment Management System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published