An open API service indexing awesome lists of open source software.

https://github.com/xenios7/healthcare-booking

End-to-end medical appointments platform.
https://github.com/xenios7/healthcare-booking

booking healthcare koyeb postgresql react spring-boot

Last synced: about 2 months ago
JSON representation

End-to-end medical appointments platform.

Awesome Lists containing this project

README

          

# ๐Ÿฅ Healthcare Booking App

End-to-end medical appointments platform โ€” patients book visits, doctors manage availability, admins oversee operations.

---

## ๐Ÿงท Repositories

- **API:** https://github.com/Xenios7/Healthcare-Booking-Api
- **Web:** https://github.com/Xenios7/Healthcare-Booking-Frontend

> Looking for implementation details? See each repoโ€™s README. This hub is the product page.

---

## ๐Ÿš€ Live Demo (Cloud-only)

Everything runs in the cloud โ€” **no local setup required**.

- **Web:** https://medicalbooking.koyeb.app/
- **API:** https://medicalbooking-api.koyeb.app/ โ†’ Swagger at `/swagger-ui`
- **Region/Platform:** Frankfurt (eu-central-1) on Koyeb
- **Database:** Postgres v17 (`ep-cold-scene-a2ffs6hj.eu-central-1.pg.koyeb.app`)

> โš ๏ธ Local development is **optional** and not needed for trying the app. This README is **cloud-first** because the frontend points to the cloud API.

---

## โœจ Features

- ๐Ÿ“… Appointment booking flow (create, confirm, cancel)
- ๐Ÿ‘ฅ Role-based access (patient / doctor / admin)
- ๐Ÿ—“๏ธ Doctor availability & calendar view
- ๐Ÿ” JWT authentication
- ๐Ÿ“œ OpenAPI/Swagger documentation
- ๐ŸŒ Cloud deployment on Koyeb (web + API + DB)

---

## ๐Ÿงฐ Tech Stack

- **Backend:** Spring Boot, PostgreSQL, JWT
- **Frontend:** React
- **Infra:** Koyeb (Web, API, DB)

---

## ๐ŸŽฅ Demo Video

Place your video under `docs/` and it will appear here.

- **High quality (download/preview):** `docs/demo.mov`
- **Best browser compatibility:** convert a copy to MP4 โ†’ `docs/demo.mp4`

Your browser does not support the video tag.
Download the demo video.

---

## ๐Ÿ“ธ Screenshots

Put images in `docs/screens/` (use any filenames). A few examples:

- `docs/screens/landing.png`
- `docs/screens/booking.png`
- `docs/screens/calendar.png`
- `docs/screens/admin.png`

> ๐Ÿ’ก Tip: Keep images ~1200px wide for crisp rendering. PNG for UI, SVG/PNG for diagrams.

---

## ๐Ÿง  Architecture

Export your diagram to `docs/architecture.png`.

**Flow:** Web (React) โ†’ API (Spring Boot) โ†’ PostgreSQL
**Auth:** JWT (role-based endpoints)
**Deploy:** Koyeb (Frankfurt, eu-central-1)

![Architecture](docs/architecture.png)

---

## ๐Ÿ—„๏ธ Database

## ๐Ÿงฉ ERD
![ERD โ€“ Booking API](ERD_BookingAPI.png)

![ERD](docs/erd.png)

### ๐Ÿ“‹ Entities & Tables (baseline)

> Replace/extend with your exact fields as implemented.

#### `users`
| field | type | notes |
|---------------|--------------|--------------------------------|
| id | UUID (PK) | |
| email | varchar(255) | unique |
| password_hash | varchar(255) | |
| role | enum | `PATIENT` `DOCTOR` `ADMIN` |
| created_at | timestamptz | default now() |
| updated_at | timestamptz | |

#### `patients`
| field | type | notes |
|--------------|------------------------|-------------------|
| id | UUID (PK/FKโ†’users.id) | one-to-one user |
| first_name | varchar(100) | |
| last_name | varchar(100) | |
| dob | date | |
| phone | varchar(30) | |
| insurance_no | varchar(100) | nullable |

#### `doctors`
| field | type | notes |
|----------------|------------------------|-----------------------|
| id | UUID (PK/FKโ†’users.id) | one-to-one user |
| specialization | varchar(120) | |
| bio | text | nullable |
| clinic_id | UUID (FKโ†’clinics.id) | nullable |

#### `clinics`
| field | type | notes |
|---------|----------------|-------|
| id | UUID (PK) | |
| name | varchar(150) | |
| address | text | |
| phone | varchar(30) | |

#### `availability_slots`
| field | type | notes |
|--------------|------------------------|---------------------------------------|
| id | UUID (PK) | |
| doctor_id | UUID (FKโ†’doctors.id) | |
| start_time | timestamptz | |
| end_time | timestamptz | |
| is_recurring | boolean | default false |
| rrule | varchar(255) | RFC 5545 rule if recurring (optional) |

#### `appointments`
| field | type | notes |
|------------|--------------------------|----------------------------------------------|
| id | UUID (PK) | |
| patient_id | UUID (FKโ†’patients.id) | |
| doctor_id | UUID (FKโ†’doctors.id) | |
| start_time | timestamptz | |
| end_time | timestamptz | |
| status | enum | `PENDING` `CONFIRMED` `CANCELLED` `COMPLETED`|
| notes | text | nullable |
| created_at | timestamptz | default now() |

#### `notifications` (optional)
| field | type | notes |
|---------|-----------------------|-------------------------------|
| id | UUID (PK) | |
| user_id | UUID (FKโ†’users.id) | |
| channel | enum | `EMAIL` `SMS` `PUSH` |
| type | varchar(50) | e.g., `APPT_CONFIRMED` |
| payload | jsonb | |
| status | enum | `QUEUED` `SENT` `FAILED` |
| sent_at | timestamptz | nullable |

---

## ๐Ÿ“š API Docs

- **Prod Swagger:** `https://medicalbooking-api.koyeb.app/swagger-ui`
- **OpenAPI JSON:** `https://medicalbooking-api.koyeb.app/v3/api-docs`

> ๐Ÿงช Local Swagger links are omitted because this project is cloud-first and the frontend targets the cloud API.

---

## โ˜๏ธ Deployment (Koyeb)

- **Web:** `healthcare-booking-frontend` โ†’ https://medicalbooking.koyeb.app/
- **API:** `healthcare-booking-api` โ†’ https://medicalbooking-api.koyeb.app/
- **Database:** Postgres v17 โ†’ `ep-cold-scene-a2ffs6hj.eu-central-1.pg.koyeb.app`

> ๐Ÿ”’ Make sure secrets (DB URL/creds, JWT secret, etc.) are stored in Koyeb and **not** committed.

---

## ๐Ÿ—‚๏ธ Project Structure (Hub)

```
.
โ”œโ”€ docs/
โ”‚ โ”œโ”€ architecture.png
โ”‚ โ”œโ”€ erd.png
โ”‚ โ”œโ”€ demo.mov # optional (original)
โ”‚ โ”œโ”€ demo.mp4 # recommended for inline playback
โ”‚ โ””โ”€ screens/
โ”‚ โ”œโ”€ landing.png
โ”‚ โ”œโ”€ booking.png
โ”‚ โ”œโ”€ calendar.png
โ”‚ โ””โ”€ admin.png
โ””โ”€ README.md
```

---

## ๐Ÿ” Security Notes

- Never commit secrets or `.env` files
- Use a strong `JWT` secret in production; rotate periodically
- HTTPS/TLS handled by Koyeb (use the HTTPS URLs)

---

## โ“ FAQ

- **Why isnโ€™t there a local โ€œdocker compose upโ€ here?**
The app is **cloud-first** and the frontend points to the **cloud API**. You can use the live demo without any local setup.

- **Can I still run locally later?**
Yes โ€” if you add local envs and point the frontend to a local API; thatโ€™s outside the scope of this README since the current code targets the cloud API.