How mizcausevic-dev/semantic-metrics-catalog works
Semantic Metrics Catalog is a FastAPI application for governing metric definitions: it loads sample contracts, derives catalog, ownership, freshness, and review views, and publishes both operator-facing pages and a JSON-LD catalog. The central workflow runs from HTTP requests through route handlers to the semantic service and YAML source; the service also builds contract, owner, summary, and export payloads. README documents these capabilities, while sampled code confirms the service and route wiring. The rendering excerpt is partial, so page-to-service details beyond visible calls are kept at module level.
Main entry points: semantic_service.py Catalog service · main.py FastAPI routes · render.py Page renderer · sample_metrics_catalog.yml Metric contracts
Components 16
HTTP interface
- FastAPI routes
app/main.py - Sample API payload
app/services/semantic_service.py - API responses
app/main.py
Metric governance
- Catalog service
app/services/semantic_service.py - Metric contracts
app/data/sample_metrics_catalog.yml - Catalog & stats
app/services/semantic_service.py - Contract board
app/services/semantic_service.py - Owner lanes
app/services/semantic_service.py - Dashboard summary
app/services/semantic_service.py - Metric lookup
app/services/semantic_service.py
Operator surfaces
- Page renderer
app/render.py - Governance pages
app/render.py
Semantic publication
- JSON-LD export
app/services/semantic_service.py
Other components
- Operator
- API consumer
- AI / retrieval
Connections 27
- Operator → FastAPI routes: requests pages
- API consumer → FastAPI routes: requests data
- AI / retrieval → FastAPI routes: requests export
- FastAPI routes → Page renderer: renders pages
- Page renderer → Catalog service: queries data
- FastAPI routes → Catalog service: dispatches requests
- Catalog service → Catalog & stats: builds catalog
- Catalog & stats → Metric contracts: reads YAML
- Catalog & stats → Owner lanes: derives owners
- Catalog service → Contract board: builds board
- Contract board → Catalog & stats: reads catalog
- Catalog service → Owner lanes: builds lanes
- Owner lanes → Catalog & stats: reads catalog
- Catalog service → Dashboard summary: builds summary
- Dashboard summary → Catalog & stats: reads catalog
- Catalog service → Metric lookup: looks up metric
- Metric lookup → Catalog & stats: searches catalog
- Catalog service → Sample API payload: assembles sample
- Sample API payload → Dashboard summary: includes summary
- Sample API payload → Contract board: includes board
- Sample API payload → Owner lanes: includes lanes
- Catalog service → JSON-LD export: builds export
- JSON-LD export → Catalog & stats: reads catalog
- Page renderer → Governance pages: renders surfaces
- FastAPI routes → API responses: returns payloads
- API responses → API consumer: sends data
- JSON-LD export → AI / retrieval: publishes catalog