Logo Lanfrica

FotsopTalleh/nihd-cameroon

Domain:

digital infrastructure

Record type:

software
Creator:
Fot
Host:
internet health # NIHD — National Internet Health Dashboard ## Complete Implementation Breakdown > **Project:** Final Year B.Tech project — monitoring internet connectivity quality across 10 regions of Cameroon, across 4 ISPs, in real time. --- ## 📚 Library Inventory & Why Each Was Chosen ### Backend (Python / Flask ecosystem) | Library | Why It's Here | |---|---| | **Flask 3.0** | Core web framework. Serves both the HTML pages (Jinja2 templates) and the REST API endpoints. Lightweight enough for a single-developer project but has a mature extension ecosystem. | | **Flask-SQLAlchemy** | ORM layer over SQLAlchemy. Maps Python classes (`Measurement`, `Alert`, `User`, `Download`) to SQL tables, lets you write `Measurement.query.filter(...)` instead of raw SQL. Supports SQLite locally and PostgreSQL in production with zero code changes. | | **Flask-Login** | Session-based authentication. Manages the logged-in user across requests via a secure cookie. Provides `@login_required` decorator and `current_user` proxy. Only needed for protected routes (CSV/PDF download). The dashboard itself is **public** — anyone can view data without an account. | | **Flask-Bcrypt** | Wraps `bcrypt` for password hashing. `bcrypt.generate_password_hash()` on registration, `bcrypt.check_password_hash()` on login. Chosen because bcrypt is adaptive (the work factor can be increased as hardware gets faster). | | **Flask-SocketIO** | WebSocket support for real-time live updates. When the probe agent finishes a measurement cycle, it emits events directly to all connected browser tabs — no polling required. | | **Flask-WTF / WTForms** | CSRF protection and form validation on the auth forms. Prevents cross-site request forgery on login/register. | | **SQLAlchemy 2.0** | The underlying ORM. `db.session.bulk_save_objects(batch)` is used in the seeder for fast batch inserts (thousands of rows at once). | | **eventlet** | An async I/O library that monkey-patches Python's stdlib (`socket`, `ssl`, `threading`, etc.) …