A full-stack Appointment Booking System for Umurenge (Sector) services in Rwanda, enabling citizens to book appointments via USSD and web, while providing sector staff with dashboards, analytics, and digital queue management.
# βοΈ Umurenge Appointment System β Backend API
## π Overview
This is the backend service for the **Umurenge Appointment Booking System**, built with **NestJS** and **PostgreSQL**. It powers appointment booking via USSD and web platforms, manages sector services, and provides APIs for the admin dashboard.
---
## π Features
### π
Appointment Management
* Create and manage appointments
* Queue number generation
* Appointment status tracking (booked, served, cancelled, missed)
### π± USSD Integration
* USSD flow handling (*123#)
* Session management
* Service selection and booking via basic phones
### π€ User & Staff Management
* Role-based access (Admin, Staff, Super Admin)
* Staff assignment to services
* Availability tracking
### π§Ύ Services Management
* Sector-based service listing
* Service provider assignment
* Daily appointment limits
### π Notifications
* Sector announcements
* Staff availability updates
### π° Monetization
* Subscription plans (Free, Basic, Premium)
* Payment tracking (Mobile Money / Bank)
### π Support System
* Ticket creation and management
* Admin/staff responses
---
## π§± Tech Stack
* **NestJS**
* **Sequelize ORM**
* **PostgreSQL**
* Class Validator & DTOs
---
## π Project Structure
```
src/
βββ modules/
β βββ users/
β βββ staff/
β βββ districts/
β βββ sectors/
β βββ services/
β βββ appointments/
β βββ ussd/
β βββ notifications/
β βββ payments/
β βββ subscriptions/
β βββ support/
β
βββ config/
βββ database/
βββ main.ts
```
---
## π οΈ Getting Started
### 1. Install Dependencies
```bash
npm install
```
---
### 2. Configure Environment
Create `.env` file:
```env
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASS=your_password
DB_NAME=umurenge_db
```
---
### 3. Run the Server
```bash
npm run start:dev
```
Server runs on:
```
localhost
```
---
## π‘ API Endpoints (Examples)
```
POST /ussd β Handle USSD requests
GET /appointments β List appointments
POS β¦