Transforming medicine accessibility in Rwanda by connecting patients with pharmacies and providing a smarter way to find essential medications.
# Rwanda E-Pharmacy - Backend MVP
A production-ready, secure, scalable **National Digital Health Platform** backend that enables:
- π§ββοΈ **Patients** to locate medicines in real-time, reserve stock, manage prescriptions & medication reminders
- π **Pharmacies** to digitize inventory management, track stock, and serve customers
- ποΈ **Ministry of Health** to monitor national medicine availability, shortages, and public health trends
---
## π οΈ Technology Stack
| Layer | Technology |
| -------------- | ----------------------------------------------------------------- |
| Framework | **NestJS 11** (TypeScript) |
| ORM | **Prisma 7** (with Driver Adapter for PostgreSQL) |
| Database | **PostgreSQL** (optimized for Neon/Render) |
| Auth | **JWT** + **Refresh Token Rotation**, **Passport.js**, **bcrypt** |
| Validation | **class-validator**, **class-transformer** |
| Documentation | **Swagger/OpenAPI** (`@nestjs/swagger`) |
| File Uploads | **Multer** (with type/size validation) |
| Scheduled Jobs | **@nestjs/schedule** |
| Security | **Helmet**, **CORS**, **Rate Limiting** (@nestjs/throttler) |
| Logging | Request, Error, Auth, and Audit Logs |
| Deployment | **Render** compatible |
---
## ποΈ System Architecture
**Modular Monolith** β every feature is isolated in its own NestJS module (Controller β Service β DTO β Entity), so any module can later be extracted into a microservice without breaking changes.
### π¦ Implemented Feature Modules
| Module | Description |
| ---------------- | -- β¦