Logo Lanfrica

alinafekamwendo/malawi-districts-api

Domaine:

geospatial

Type de record:

software
Créateur:
ali
HĂ´te:
REST API for Malawi district administrative and cultural data built with NestJS and Prisma. # 🇲🇼 Malawi Districts Information API A structured, relational REST API built with **NestJS** and **Prisma** that provides comprehensive administrative and cultural information about districts in Malawi. This project demonstrates production-level backend architecture, relational modeling, and scalable API design. --- ## 🚀 Overview The Malawi Districts Information API models hierarchical and relational geographic data including: * Districts * Traditional Authorities (TAs) * Group Village Headmen (GVHs) * Villages * Council Wards * Popular Features (lakes, rivers, markets, mountains) * Dominant Tribes * Dominant Languages The API is designed to power a frontend (e.g., a Next.js application) that allows users to search and explore district-level information. --- ## 🏗 Architecture This project follows **modular NestJS architecture** and clean separation of concerns. ``` Controller → Service → Prisma → Database ``` ### Key Architectural Concepts * Dependency Injection * DTO-based validation * Structured REST resource design * Proper relational modeling (1:N, N:N) * Global Prisma module * Scalable module-based structure --- ## 🛠 Tech Stack | Layer | Technology | | ----------------- | --------------- | | Backend Framework | NestJS | | ORM | Prisma | | Database | PostgreSQL | | Validation | class-validator | | API Architecture | REST | | Language | TypeScript | --- ## 🗄 Database Design ### Relationship Structure ``` District ├── Traditional Authority │ ├── Group Village Head │ │ └── Village ├── Council Wards ├── Features ├── Dominant Tribes (Many-to-Many) └── Dominant Languages (Many-to-Many) ``` ### Modeling Features * UUID primary keys * Enumerations (Region, FeatureType) * Join tables for many-to-many relationships * Normalized schema design * Referential integrity enforced via Prisma --- ## 📡 API Endpoints ### Districts | Method | Endpoi …