Database Metadata Architecture¶
Internal layout¶
Source root: src/md_generator/db (64 Python modules detected).
Subpackages and areas: adapters, api, cli, config, core, mcp.
Component diagram¶
flowchart TB
CLI[CLI_md-db] --> Core[Core_engine]
API[FastAPI_optional] --> Core
Core --> Writers[Markdown_writers]
Core --> Assets[Asset_handlers]
Core --> Integrations[External_libraries]
Dependency graph (logical)¶
- Inputs: Postgres, MySQL, Oracle, SQLite, Mongo, Access, Elasticsearch/OpenSearch clusters and offline JSON bundles
- Outputs: Schema docs, ERD, Markdown ZIP; Elasticsearch indices, templates, pipelines, ILM/SLM, search templates, alias and dependency graphs
- Optional extras:
dbfrompyproject.toml - Cross-module: See
integration.mdfor delegated converters and shared job patterns.
Threading and async¶
- CLI runs synchronously in the invoking process.
- FastAPI routes may use background tasks or threads for long jobs.
- Domain modules (
db,graph,log,codeflow) expose SSE/event streams for progress.