Backend Module Map

Backend Module Map An architecture diagram generated by Archify. src/main.py · FastAPI app + lifespan · Architecture component src/main.py FastAPI app + lifespan Core routers · src/routers/*.py (+ /v1) · Architecture component Core routers src/routers/*.py (+ /v1) Curation routers · scoped by project · Architecture component Curation routers scoped by project Core services · inference / search / faces · Architecture component Core services inference / search / faces Curation services · curation/ (import, reprocess) · Architecture component Curation services curation/ (import, reprocess) Training · jobs / arbiter / promote · Architecture component Training jobs / arbiter / promote Detection · cascade + profiles · Architecture component Detection cascade + profiles Labeling · vlm_client / labeler · Architecture component Labeling vlm_client / labeler Clients · Triton pool / OpenSearch / OCC · Architecture component Clients Triton pool / OpenSearch / OCC src/config/ · dataclasses + projects · Architecture component src/config/ dataclasses + projects Workers · scripts/curation/ · Architecture component Workers scripts/curation/ Projects · lifecycle / combine · Architecture component Projects lifecycle / combine Config store · packs / profiles / keymap · Architecture component Config store packs / profiles / keymap mount mount /curation /train/* ingest prefix + indexes import import Legend HTTP layer Services Clients Config Workers

Services before routers

  • • src/services/ has no FastAPI dependency and is tested on its own
  • • Routers are thin HTTP adapters

Config, not forks

  • • CurationConfig, RegionFields, DetectionProfile and RegionStatus hold everything domain-specific
  • • Per-project prompt packs, profiles and VLM choice live in the config store, not in env vars
  • • Deployment OP_* variables are read at process start

One wire vocabulary

  • • wire.py turns storage fields into region_*, vlm_*, classifier_* names; a region is an element of region_boxes
  • • OCC helpers and the lock rule keep human and imported labels safe from automated writers