π Unified County Services API (UCS-API)
A modular, API-first backend designed to digitize public service delivery across Kenyan counties.
π Explore API Docs β’ π Report Bug β’ β¨ Request Feature
π§© About The Project
The UCS-API serves as the digital backbone for public service delivery in Kenya. It provides a scalable suite of backend APIs to accelerate digitization across counties.
Key goals:
- πΌ Reduce redundant development work across counties
- π Promote standardized, efficient e-governance
- βοΈ Provide infrastructure for secure and scalable public services
β Built With
- NestJS β Scalable Node.js framework
- TypeScript β Type-safe development
- PostgreSQL β Relational database
- TypeORM β Object-relational mapper
- Docker β Containerization
- Redis & BullMQ β Queued background jobs
- Passport.js β Authentication strategies
- Swagger (OpenAPI) β Beautiful auto-generated API docs
π― Key Features
| β Feature | π Description |
|---|---|
| Authentication & RBAC | Secure login system with roles (Citizen, Officer, Admin) |
| User Registry | Full CRUD for citizen/staff accounts |
| Service Catalog | Dynamic creation of county services |
| Request Management | Submit, track, and process service requests |
| Audit Trails | Critical action logging for compliance |
| Secure File Uploads | Document upload via Cloudinary |
| Payment Gateway | M-Pesa STK Push integration via Daraja API (In Progress) |
| Notification Engine | SMS/Email queuing framework (In Progress) |
π Getting Started
Prerequisites
Ensure you have:
- Node.js
v18+ - Docker & Docker Compose
- npm or yarn ### Why no NGIX Here for LB at horizontal scaling Render already: -Automatically assigns domains
-Provides HTTPS and TLS support
-Manages environment variables
-Proxies HTTP traffic to the service
Installation
git clone https://github.com/collinsomwoyo/county-api.git
cd county-api
npm install
cp .env.example .env
Edit your .env file with your credentials.
Start Services
docker-compose up -d
π§ͺ Running the App
Development
npm run start:dev
Server runs on http://localhost:3001.
Production
npm run build
npm run start:prod
π API Reference
Explore the Swagger documentation at:
http://localhost:3001/api
π£ Roadmap
β Phase 1: Foundation
- Project scaffolding, Docker setup, JWT auth
β Phase 2: Core Services
- Service catalog, request workflow, audit logs
β³ Phase 3: Integrations
- Secure uploads, M-Pesa payments, job queues
π Phase 4: Polish & Deployment
- Analytics, CI/CD, cloud deployment
π€ Contributing
I welcome contributions!
# Fork the repo
git checkout -b feature/AmazingFeature
git commit -m 'Add AmazingFeature'
git push origin feature/AmazingFeature
Then open a Pull Request.
β Donβt forget to star the repo if you like the project!
π License
Distributed under the MIT License.
See LICENSE.txt for details.
π¬ Contact
Collins Omwoyo β collinsomwoyo@gmail.com
GitHub: https://github.com/collinsomwoyo/county-api
Log in or sign up for Devpost to join the conversation.