Architecture Overview
This is a single monorepo (Visory-Analytics/pipelines) containing Python data pipelines, an Airflow orchestration project, and standalone web apps, tied together by a UV workspace for Python dependency resolution.
Top-level layout
Section titled “Top-level layout”| Directory | Contains |
|---|---|
apps/ |
Deployable applications with their own lifecycle (mx_fuels_reporting_app, financial-flows) |
packages/ |
Shared, versioned Python packages consumed by projects/orchestration (db, utils, vcl) |
orchestration/ |
Astronomer/Airflow project — DAGs, dbt/Cosmos, database includes, its own uv.lock |
projects/ |
Data science / analytics projects, DVC-versioned |
scripts/ |
Workspace bootstrapping and scaffolding (workspace-setup/, project-init.sh, app-init.sh) |
templates/ |
Scaffolding templates for new apps/projects |
docs/ |
This Astro/Starlight documentation site |
web/site/ |
Visory’s Business website |
App vs. Project vs. Package
Section titled “App vs. Project vs. Package”- Package (
packages/*): a shared, importable Python library versioned independently (e.g.utils,vcl,db). Workspace members, referenced with{ workspace = true }by anything that depends on them.orchestration/instead vendors pre-built wheels of these packages since it has its own separateuv.lock. - Project (
projects/*): a DVC-versioned data science / analytics deliverable — pipelines, notebooks, models. Scaffolded withscripts/project-init.sh, which runsuv init --lib . --project .anddvc init --subdir. Projects are UV workspace members ([tool.uv.workspace] members = ["packages/*", "projects/*"]) and can depend onutils/vcl/dbdirectly. - App (
apps/*): a standalone, deployable application with its own release lifecycle, scaffolded withscripts/app-init.sh(uv init --app . --no-workspace). Apps are not UV workspace members — they either bundle shared packages as wheels or vendor their own dependencies (e.g.apps/mx_fuels_reporting_app/apps/webis a self-contained Next.js app with no Python dependency at all).
UV workspace
Section titled “UV workspace”The root pyproject.toml defines the workspace:
[tool.uv.workspace]members = ["packages/*", "projects/*"]exclude = ["projects/2025_permit_ratification"]
[tool.uv.sources]vcl = { workspace = true }utils = { workspace = true }mx-com-reporting = { workspace = true }orchestration/ deliberately sits outside this workspace — it resolves shared packages from pre-built wheels in orchestration/include/wheels/ instead, since the Airflow runtime has different dependency constraints than local dev.
- Repo Map — directory-by-directory detail
- CI/CD — how branches map to deploys
- Identity & Security — the Azure identity model