Migrate IHR API

1. Project Goals

The goal of this project is to modernize and simplify the Internet Health Report (IHR) API by replacing its outdated Django 2.2.27 implementation with FastAPI, a lightweight, high-performance, asynchronous framework that provides built-in interactive API documentation via Swagger UI.

This migration will:

By implementing these architectural changes, the project aims to improve performance, simplify maintenance, and provide a cleaner, more modular codebase for future development.

2. Implementation

This project follows a Controller-Service-Repository architecture for modularity, scalability, and maintainability. The layers are clearly separated for cleaner code and easier testing.

Project Architecture

2.1. API Endpoints Migration

Migrated the following endpoints from Django to FastAPI:

2.2. Dockerization

Containerized the application with Docker to provide a consistent, portable runtime environment for all deployment setups.

3. Merged Pull Requests

The merged pull requests that contain my work:

  1. PR #33 – Added data migration steps
  2. PR #32 – Updated allowed CORS origins
  3. PR #31 – Return recent results when timebin fields are not provided
  4. PR #30 – Added page size to .env file
  5. PR #29 – Added /hegemony, /hegemony/countries and /hegemony/prefixes endpoints
  6. PR #22 – Added /disco/events, /tr_hegemony and /hegemony/alarms endpoints
  7. PR #17 – Added network delay and metis endpoints and removed link endpoints
  8. PR #15 – Added /network_delay/locations endpoint
  9. PR #13 – Added link forwarding endpoint
  10. PR #11 – Added /link/delay endpoint
  11. PR #9 – Added /networks endpoint
  12. PR #8 – Removed some foreign key constraints and returned some primary keys to integer
  13. PR #6 – Added database models and /hegemony/cones endpoint
  14. PR #2 – Country endpoint