Playbook
Django as the Ops Analysis API (Application Programming Interface) Layer (Django As The Ops Analysis API Layer)
Python/Django serves PostGIS–Mongo–ES reads to MFEs and the control plane as safe JSON contracts.
Logistics Django API & Delivery
Part 1 of 8
Django analysis/API layer, contracts with MFEs, self-hosted GitLab CE → EC2 pipelines, and continuous security scanning.
An analysis notebook is not an API (Application Programming Interface)
EDA and ML start in notebooks; production needs Django (or equivalent) with versioned endpoints, auth, and pagination. Maps and booking remotes consume that layer.
PostGIS / Mongo / ES / OSRM edge
↓
Django Analysis API
↙ ↘
Control Plane MFE remotes
This series connects API boundaries, GitLab CE→EC2 delivery, and continuous pentesting.
Concepts, defined where they first appear
📦 Analysis API
Django read/analysis endpoints consumed by MFEs and the control plane.
📦 Closed Network CI
Pipelines on self-hosted GitLab CE runners inside a closed network.
📦 Artifact
Versioned deploy package shipped to EC2.
📦 Continuous Pentest
Open-source security scanning in the pipeline (ProjectDiscovery ecosystem).
Self-hosted GitLab CE in a closed network ships packages to EC2 via pipeline.
Why Django
Fast serialization, ops-friendly admin needs, proximity to the Python ML ecosystem.
What gets exposed
Hotspots, route deltas, geofence read models — never raw ERP rows.
Consumers
Wait geofence, expedition map, and booking desk share the auth contract.
The mappings that get confused most often
❌ Cron a notebook and call it an API
✓ Production APIs need versioning and auth
❌ Let each MFE write its own SQL
✓ One analysis API protects the contract
❌ Pentest once a year
✓ Continuous scanning belongs in the pipeline
A checklist for auditing your own system
- Which endpoints are in public OpenAPI?
- Which remote shares auth?
- Who pushes signed artifacts to EC2?
- Was the last security scan in the pipeline?
- Do frontends carry correlation IDs on 5xx?
What to take away from this part
- Django analysis API is the frontend’s read gateway.
- Delivery is closed GitLab CE → EC2 discipline.
- Security scanning is part of delivery.
The path from notebook to production goes through an API.
FAQ
Frequently asked questions
What is Analysis API?
Django read/analysis endpoints consumed by MFEs and the control plane.
What is Closed Network CI?
Pipelines on self-hosted GitLab CE runners inside a closed network.
Is it true that "Cron a notebook and call it an API"?
Production APIs need versioning and auth
What does this part lock in?
This series connects API boundaries, GitLab CE→EC2 delivery, and continuous pentesting. EDA and ML start in notebooks; production needs Django (or equivalent) with versioned endpoints, auth, and pagination. Maps and booking remotes consume that layer.
Engineering Principles Learned
- Analysis results ship through versioned APIs.
- MFE and control plane share one contract.
- Delivery and security live in the same pipeline.
Continue reading
Continue reading
Next in series
API (Application Programming Interface) Boundaries for MFE (Module Federation) and Control Plane
API Boundaries for MFE and Control Plane — a production lesson from an ABC Logistics backend/data platform.
Same series
GitLab CE Pipelines to EC2 in a Closed Network
GitLab CE Pipelines to EC2 in a Closed Network — a production lesson from an ABC Logistics backend/data platform.
Same series
Immutable Artifacts and Rollback Discipline
Immutable Artifacts and Rollback Discipline — a production lesson from an ABC Logistics backend/data platform.