# goyal-chintan/project-lumos architecture

> Architecture diagram of the GitHub repository goyal-chintan/project-lumos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/goyal-chintan/project-lumos
- Repository: https://github.com/goyal-chintan/project-lumos

## Overview

1. **What this repository is**
   Lumos is a **Python middleware framework** for catalog metadata operations, not a catalog UI itself. Its job is to automate metadata hygiene around a downstream catalog, with **DataHub as the current platform adapter**. The architecture is centered on repeatable CLI-driven workflows that ingest, enrich, link, version, and extract metadata.

2. **Main runtime entry point**
   The operational entry point is `framework_cli.py`. It drives commands like ingestion, ownership assignment, lineage updates, enrichment, version scans, and reporting. This makes the system **batch/job-oriented**, with runs controlled by JSON templates and YAML settings rather than a long-lived web server.

3. **Orchestration boundary**
   The `core/controllers` layer is the coordination boundary. Controllers such as ingestion, enrichment, lineage, ownership, versioning, and data-job lineage translate CLI commands into service calls. They isolate command-level concerns from the domain-specific feature logic.

4. **Feature/service layer**
   The `feature/` directory holds the business capabilities:
   - **ingestion**: ingest metadata from source files and storage systems
   - **enrichment**: add descriptions, tags, properties, documentation
   - **lineage**: dataset and data-job lineage
   - **ownership**: users, groups, and ownership assignments
   - **versioning**: scan datasets and apply bulk updates
   - **profiling / dq_services / rbac**: supporting governance and policy functions
   - **extraction**: report generation and export
   Each feature is implemented as a service module, so the system is modular by domain rather than by transport.

5. **Ingestion architecture**
   Ingestion is backed by handler plugins under `feature/ingestion/handlers`. The handlers support multiple source types, including **CSV, Avro, Parquet, S3, MongoDB**, and related partitioning cases. This layer converts heterogeneous source formats into a normalized representation before the metadata is pushed downstream.

6. **Platform abstraction and adapter layer**
   The `core/platform` package defines the boundary to external catalog systems. It includes a **platform interface**, a **factory**, and a **DataHub implementation** (`impl/datahub_service.py`, `impl/datahub_handler.py`). This is the main portability seam: the rest of Lumos can stay catalog-agnostic while the adapter handles DataHub-specific API details.

7. **Shared infrastructure**
   The `core/common` package provides reusable plumbing:
   - configuration loading and environment settings
   - base interfaces for services/adapters
   - URN builders for stable entity identity
   - an emitter for outgoing platform events/updates
   - utility helpers
   This is the repository’s shared foundation and keeps feature modules from duplicating identifier and config logic.

8. **End-to-end data flow**
   The typical flow is:
   **CLI command → controller → feature service → source handler or extractor → platform adapter/emitter → DataHub**
   For reporting/extraction, the flow reverses at the end:
   **catalog/platform data → extractor services → CSV/Excel/visualization outputs**.
   That makes Lumos both a write-side automation layer and a read-side reporting layer.

9. **Extraction and reporting subsystem**
   The extraction stack under `feature/extraction` contains specialized extractors for schema, lineage, ownership, governance, profiling, quality, usage, and impact. Exporters in `feature/extraction/export` produce **CSV, Excel, and chart-based outputs**, which makes the framework useful for audits, reviews, and governance reporting outside the catalog UI.

10. **Configuration model**
   The repo is configuration-driven. Global runtime settings live in `configs/global_settings.yaml`, team-specific settings are under `configs/team_configurations`, and repeatable run templates live in `sample_configs_and_templates/`. The sample data directories show that the framework is intended to be exercised with real files and partitioned datasets, not only synthetic mocks.

11. **Validation and delivery controls**
   The project has strong automation around quality: GitHub Actions workflows, pre-commit hooks, unit and integration tests, and repo-specific standards/docs. Architecturally, this means the framework is designed to keep its command flows and adapter behavior stable as features evolve.

12. **Documented future direction**
   The README and docs describe a planned split into a **Spring Boot control plane** plus **Python workers**, connected through **Redis Streams**. That is a roadmap, not the current runtime. Today the repo is a single Python framework; the planned direction mainly clarifies the intended future boundary between orchestration and data-processing work.

13. **How to diagram it**
   For an architecture diagram, the key boxes are:
   - CLI entrypoint
   - controller orchestration layer
   - feature modules by domain
   - ingestion handlers and extraction exporters
   - shared common utilities/config
   - platform adapter layer with DataHub as the current external system
   - configuration/templates/sample data as inputs
   This captures the repository’s actual boundaries and data movement without implying a web app or service mesh.

Main entry points: [`framework_cli.py`](https://github.com/goyal-chintan/project-lumos/blob/main/framework_cli.py) (CLI), [`core/platform`](https://github.com/goyal-chintan/project-lumos/tree/main/core/platform) (Platform API), [`core/common`](https://github.com/goyal-chintan/project-lumos/tree/main/core/common) (Common), [`feature/ingestion/ingestion_service.py`](https://github.com/goyal-chintan/project-lumos/blob/main/feature/ingestion/ingestion_service.py) (Ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_entry["Runtime"]
  node_n_cli["CLI<br/>entrypoint<br/>[framework_cli.py]"]
end

subgraph group_grp_core["Core"]
  node_n_ctrl_ingest["Ingestion Ctrl<br/>controller"]
  node_n_ctrl_enrich["Enrichment Ctrl<br/>controller"]
  node_n_ctrl_lineage["Lineage Ctrl<br/>controller"]
  node_n_ctrl_owner["Ownership Ctrl<br/>controller"]
  node_n_ctrl_version["Version Ctrl<br/>controller"]
  node_n_ctrl_djlineage["Job Lineage Ctrl<br/>controller"]
  node_n_common["Common<br/>shared core"]
  node_n_platform_iface["Platform API<br/>boundary"]
  node_n_datahub["DataHub Adapter<br/>[datahub_service.py]"]
  node_n_datahub_ext[("DataHub<br/>external catalog")]
end

subgraph group_grp_features["Features"]
  node_n_ingestion["Ingestion"]
  node_n_ingest_handlers["Source Handlers<br/>plugin layer"]
  node_n_enrichment["Enrichment"]
  node_n_lineage["Lineage"]
  node_n_owner["Ownership"]
  node_n_version["Versioning<br/>[version_service.py]"]
  node_n_extract["Extraction<br/>reporting"]
end

subgraph group_grp_inputs["Inputs"]
  node_n_configs["Configs<br/>runtime inputs"]
  node_n_templates["Templates"]
  node_n_samples[("Sample Data<br/>input data")]
end

subgraph group_grp_outputs["Outputs"]
  node_n_export["Exporters<br/>output"]
end

node_n_cli -->|"ingest"| node_n_ctrl_ingest
node_n_cli -->|"enrich"| node_n_ctrl_enrich
node_n_cli -->|"lineage"| node_n_ctrl_lineage
node_n_cli -->|"ownership"| node_n_ctrl_owner
node_n_cli -->|"versioning"| node_n_ctrl_version
node_n_cli -->|"job lineage"| node_n_ctrl_djlineage
node_n_ctrl_ingest -->|"calls"| node_n_ingestion
node_n_ctrl_enrich -->|"calls"| node_n_enrichment
node_n_ctrl_lineage -->|"calls"| node_n_lineage
node_n_ctrl_owner -->|"calls"| node_n_owner
node_n_ctrl_version -->|"calls"| node_n_version
node_n_ctrl_djlineage -->|"calls"| node_n_lineage
node_n_ingestion -->|"uses"| node_n_ingest_handlers
node_n_ingestion -->|"publishes"| node_n_platform_iface
node_n_enrichment -->|"updates"| node_n_platform_iface
node_n_lineage -->|"updates"| node_n_platform_iface
node_n_owner -->|"updates"| node_n_platform_iface
node_n_version -->|"scans/updates"| node_n_platform_iface
node_n_extract -->|"reads"| node_n_platform_iface
node_n_platform_iface -->|"implements"| node_n_datahub
node_n_datahub -->|"targets"| node_n_datahub_ext
node_n_common -->|"supports"| node_n_cli
node_n_common -->|"supports"| node_n_ctrl_ingest
node_n_common -->|"supports"| node_n_platform_iface
node_n_configs -->|"configures"| node_n_cli
node_n_templates -->|"drives"| node_n_cli
node_n_samples -->|"feeds"| node_n_ingest_handlers
node_n_extract -->|"exports"| node_n_export

click node_n_cli "https://github.com/goyal-chintan/project-lumos/blob/main/framework_cli.py"
click node_n_ctrl_ingest "https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/ingestion_controller.py"
click node_n_ctrl_enrich "https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/enrichment_controller.py"
click node_n_ctrl_lineage "https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/lineage_controller.py"
click node_n_ctrl_owner "https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/ownership_controller.py"
click node_n_ctrl_version "https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/version_controller.py"
click node_n_ctrl_djlineage "https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/data_job_lineage_controller.py"
click node_n_common "https://github.com/goyal-chintan/project-lumos/tree/main/core/common"
click node_n_platform_iface "https://github.com/goyal-chintan/project-lumos/tree/main/core/platform"
click node_n_datahub "https://github.com/goyal-chintan/project-lumos/blob/main/core/platform/impl/datahub_service.py"
click node_n_ingestion "https://github.com/goyal-chintan/project-lumos/blob/main/feature/ingestion/ingestion_service.py"
click node_n_ingest_handlers "https://github.com/goyal-chintan/project-lumos/tree/main/feature/ingestion/handlers"
click node_n_enrichment "https://github.com/goyal-chintan/project-lumos/tree/main/feature/enrichment"
click node_n_lineage "https://github.com/goyal-chintan/project-lumos/tree/main/feature/lineage"
click node_n_owner "https://github.com/goyal-chintan/project-lumos/blob/main/feature/ownership/ownership_service.py"
click node_n_version "https://github.com/goyal-chintan/project-lumos/blob/main/feature/versioning/version_service.py"
click node_n_extract "https://github.com/goyal-chintan/project-lumos/tree/main/feature/extraction"
click node_n_export "https://github.com/goyal-chintan/project-lumos/tree/main/feature/extraction/export"
click node_n_configs "https://github.com/goyal-chintan/project-lumos/blob/main/configs/global_settings.yaml"
click node_n_templates "https://github.com/goyal-chintan/project-lumos/tree/main/sample_configs_and_templates"
click node_n_samples "https://github.com/goyal-chintan/project-lumos/tree/main/sample-data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n_cli toneBlue
class node_n_ctrl_ingest,node_n_ctrl_enrich,node_n_ctrl_lineage,node_n_ctrl_owner,node_n_ctrl_version,node_n_ctrl_djlineage,node_n_common,node_n_platform_iface,node_n_datahub,node_n_datahub_ext toneAmber
class node_n_ingestion,node_n_ingest_handlers,node_n_enrichment,node_n_lineage,node_n_owner,node_n_version,node_n_extract toneMint
class node_n_configs,node_n_templates,node_n_samples toneRose
class node_n_export toneIndigo
```

## Components

### Runtime

CLI entrypoint and command orchestration

- [CLI](https://github.com/goyal-chintan/project-lumos/blob/main/framework_cli.py): entrypoint · Command-line runner for all workflows · `framework_cli.py`

### Core

Shared plumbing, controllers, and platform boundary

- [Ingestion Ctrl](https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/ingestion_controller.py): controller · Coordinates ingestion commands · `core/controllers/ingestion_controller.py`
- [Enrichment Ctrl](https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/enrichment_controller.py): controller · Coordinates enrichment commands · `core/controllers/enrichment_controller.py`
- [Lineage Ctrl](https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/lineage_controller.py): controller · Coordinates lineage commands · `core/controllers/lineage_controller.py`
- [Ownership Ctrl](https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/ownership_controller.py): controller · Coordinates ownership commands · `core/controllers/ownership_controller.py`
- [Version Ctrl](https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/version_controller.py): controller · Coordinates versioning and scan commands · `core/controllers/version_controller.py`
- [Job Lineage Ctrl](https://github.com/goyal-chintan/project-lumos/blob/main/core/controllers/data_job_lineage_controller.py): controller · Coordinates data-job lineage commands · `core/controllers/data_job_lineage_controller.py`
- [Common](https://github.com/goyal-chintan/project-lumos/tree/main/core/common): shared core · Config, URNs, emitters, and base interfaces · `core/common`
- [Platform API](https://github.com/goyal-chintan/project-lumos/tree/main/core/platform): boundary · Catalog platform interface and factory seam · `core/platform`
- [DataHub Adapter](https://github.com/goyal-chintan/project-lumos/blob/main/core/platform/impl/datahub_service.py): adapter · Concrete integration for DataHub · `core/platform/impl/datahub_service.py`
- **DataHub**: external catalog · Downstream catalog system

### Features

Domain services for metadata operations

- [Ingestion](https://github.com/goyal-chintan/project-lumos/blob/main/feature/ingestion/ingestion_service.py): service · Ingests source metadata into normalized form · `feature/ingestion/ingestion_service.py`
- [Source Handlers](https://github.com/goyal-chintan/project-lumos/tree/main/feature/ingestion/handlers): plugin layer · CSV, Avro, Parquet, S3, MongoDB handlers · `feature/ingestion/handlers`
- [Enrichment](https://github.com/goyal-chintan/project-lumos/tree/main/feature/enrichment): service · Adds descriptions, tags, properties, and docs · `feature/enrichment`
- [Lineage](https://github.com/goyal-chintan/project-lumos/tree/main/feature/lineage): service · Dataset and data-job lineage workflows · `feature/lineage`
- [Ownership](https://github.com/goyal-chintan/project-lumos/blob/main/feature/ownership/ownership_service.py): service · Ownership assignment and user/group mapping · `feature/ownership/ownership_service.py`
- [Versioning](https://github.com/goyal-chintan/project-lumos/blob/main/feature/versioning/version_service.py): service · Dataset scans and bulk update coordination · `feature/versioning/version_service.py`
- [Extraction](https://github.com/goyal-chintan/project-lumos/tree/main/feature/extraction): reporting · Extracts metadata and governance views · `feature/extraction`

### Inputs

Configuration, templates, and sample data

- [Configs](https://github.com/goyal-chintan/project-lumos/blob/main/configs/global_settings.yaml): runtime inputs · Global and team configuration settings · `configs/global_settings.yaml`
- [Templates](https://github.com/goyal-chintan/project-lumos/tree/main/sample_configs_and_templates): run templates · Reusable command templates for repeatable jobs · `sample_configs_and_templates`
- [Sample Data](https://github.com/goyal-chintan/project-lumos/tree/main/sample-data): input data · Representative source files and partitions · `sample-data`

### Outputs

Reporting and export targets

- [Exporters](https://github.com/goyal-chintan/project-lumos/tree/main/feature/extraction/export): output · CSV, Excel, and visualization output writers · `feature/extraction/export`

## Connections

- CLI → Ingestion Ctrl: ingest · CLI dispatches ingestion commands
- CLI → Enrichment Ctrl: enrich · CLI dispatches enrichment commands
- CLI → Lineage Ctrl: lineage · CLI dispatches lineage commands
- CLI → Ownership Ctrl: ownership · CLI dispatches ownership commands
- CLI → Version Ctrl: versioning · CLI dispatches scan and bulk update commands
- CLI → Job Lineage Ctrl: job lineage · CLI dispatches data-job lineage commands
- Ingestion Ctrl → Ingestion: calls · Controller invokes ingestion service
- Enrichment Ctrl → Enrichment: calls · Controller invokes enrichment services
- Lineage Ctrl → Lineage: calls · Controller invokes lineage services
- Ownership Ctrl → Ownership: calls · Controller invokes ownership service
- Version Ctrl → Versioning: calls · Controller invokes versioning service
- Job Lineage Ctrl → Lineage: calls · Controller reuses lineage services
- Ingestion → Source Handlers: uses · Selects source-specific handlers
- Ingestion → Platform API: publishes · Sends normalized metadata through platform boundary
- Enrichment → Platform API: updates · Applies metadata enrichment through platform boundary
- Lineage → Platform API: updates · Writes lineage relationships through platform boundary
- Ownership → Platform API: updates · Assigns ownership through platform boundary
- Versioning → Platform API: scans/updates · Reads and bulk-updates catalog entities
- Extraction → Platform API: reads · Extracts catalog state through platform boundary
- Platform API → DataHub Adapter: implements · DataHub is the current adapter implementation
- DataHub Adapter → DataHub: targets · Adapter talks to the external catalog
- Common → CLI: supports · Shared config and utilities used by runtime
- Common → Ingestion Ctrl: supports · Controllers rely on common plumbing
- Common → Platform API: supports · Platform boundary uses shared interfaces and emitters
- Configs → CLI: configures · Global settings drive command execution
- Templates → CLI: drives · Templates parameterize repeatable runs
- Sample Data → Source Handlers: feeds · Sample source files exercise ingestion handlers
- Extraction → Exporters: exports · Extracted results are written to output formats
