Developer Guide¶
This section covers the technical internals of Mirabelle for developers who need to extend, debug, or operate the system.
In This Section¶
| Page | Contents |
|---|---|
| Ports & Services | Every service, port, and how to check/restart them |
| Database Schema | Every table in every domain, with columns, types, and relationships |
| Multi-Tenancy | How the master DB + tenant DB model works end to end |
| Authentication & Security | JWT, OAuth providers, token lifecycle, role guards |
| Allocation Engine Internals | Score-based allocation algorithm, 8-pass engine, CH result schema |
| Replay Engine Internals | Iterative supply+allocation replay, planning_date override, stock evolution, API endpoints |
| Firm Supply Orders — Internals | ERP-originated firm orders: loading, merge with planned orders, FEFO simulation |
| Backend Code Walkthrough | FastAPI setup, dependency injection, endpoint patterns, process logging |
| Frontend Code Walkthrough | React 18 SPA, state management, component hierarchy |
| Data Pipeline Code | Step-by-step pipeline walkthrough: ETL → Forecast → MEIO → Supply |
| Causal SQL Engine | SQL-first causal demand engine: CTE chain, failure rate waterfall, deployment filtering, override handling, parity testing |
| Historization — Archive Date Model | Freeze, archive_date, pipeline_version_index, CH partitioning |
| Planning Date System | Virtual "today" per pipeline, resolution chain, business logic rules, CH DEFAULT caveat |
| Segment & Parameter SQL Tests | SQL verification for segmentation membership, parameter resolution, and MEIO multi-parameter assignment |
Before you dive in
Read Architecture first for the big-picture data flow. The developer guide assumes familiarity with the pipeline concept (pipeline_id + scenario_id) documented there.