LifeLine-ICT is a digital infrastructure management platform that supports the Uganda University ICT department. The system tracks strategic ICT projects, inventory assets, IoT deployments, and the maintenance activities that keep digital services reliable for students and researchers. The repository contains code for the IoT device layer, the backend APIs, and supporting documentation so faculties can adapt the platform to their own campuses.
The solution comprises five collaborating layers:
- IoT layer – ESP32-based sensor nodes send telemetry to a lightweight Flask
logger (
iot/logging). - Backend APIs – A FastAPI service (
backend/app) exposes CRUD endpoints for projects, resources, locations, maintenance tickets, and sensor sites. - GIS & Analytics – Future modules will combine telemetry and asset data to power dashboards and risk assessments.
- Frontend – Web dashboards and mobile apps consume the backend APIs.
- Deployment – Infrastructure-as-code scripts will package the stack for on campus or cloud hosting.
Consult docs/backend_crud_plan.md for the architectural rationale that guided
issue #5 (CRUD API implementation).
iot/– Firmware sketches and logging scripts for field sensors.backend/– FastAPI application, domain models, services, and tests.docs/– Supplemental guides and design notes.- Additional directories (frontend, gis, deployment) will be filled as the broader initiative matures.
- Python 3.11+
piporuvfor dependency management- Optional:
uvicornCLI for local development
python -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txtuvicorn backend.app.main:app --reloadThe service listens on http://127.0.0.1:8000 by default. OpenAPI
documentation is available at http://127.0.0.1:8000/docs.
| Entity | Base Path | Notes |
|---|---|---|
| Projects | /api/v1/projects |
CRUD with pagination & search |
| ICT Resources | /api/v1/resources |
Validates project/location references and enforces ticket rules |
| Locations | /api/v1/locations |
CRUD with geo metadata |
| Maintenance Tickets | /api/v1/maintenance-tickets |
Requires resolution metadata when closing a ticket |
| Sensor Sites | /api/v1/sensor-sites |
Links IoT deployments to resources, projects, and locations |
Each list endpoint accepts limit, offset, and search query parameters and
returns pagination metadata to keep API consumers informed.
pytest backend/testsThe suite provisions an in-memory SQLite database and covers both service-level rules (such as blocking resource deletion while tickets remain open) and API contracts.
This project uses Alembic for database migrations.
To create a new migration, run:
alembic revision --autogenerate -m "<migration_message>"To apply migrations to the database, run:
alembic upgrade headThe backend models capture the following relationships:
- Projects aggregate ICT resources and sensor sites.
- Resources optionally link to projects and locations, and can host sensor deployments.
- Maintenance tickets belong to resources and require closure notes when marked resolved.
Consult the service-layer docstrings for detailed business rules and institutional context.
- Create an issue or pick an existing one (see
issues.md). - Branch from
main:git checkout -b feature/your-feature. - Follow the layered structure (
api,services,repositories,models) to keep contributions organised. - Write tests and run
pytest backend/testsbefore opening a pull request. - Document behaviour changes in code docstrings or the project docs.
MIT, Apache
Muwanga Erasto Kosea, Ouma Ronald