How abtvenkat/ds-modelforge works
DS-ModelForge is a web application for designing SAP Datasphere data models from user requirements. Users configure a Datasphere connection, scan and explore its catalog, submit a modeling request, review generated views and lineage on the canvas, and export artifacts. The backend exposes API routes and a run/agent workflow, with persistent run and catalog state. The file tree and source index support these major stages, but most agent and builder implementations were not excerpted, so their internal calls are not expanded.
Main entry points: client.ts API client · main.py FastAPI app · App.tsx Application shell · catalog.py Catalog routes
Components 33
Web client
- Application shell
frontend/src/App.tsx - Connections
frontend/src/pages/ConnectionsPage.tsx - Catalog browser
frontend/src/pages/CatalogPage.tsx - Requirement chat
frontend/src/pages/ChatRequirementPage.tsx - Model canvas
frontend/src/components/canvas/DatasphereCanvas.tsx - Playbook review
frontend/src/components/canvas/DataspherePlaybookModal.tsx - Export page
frontend/src/pages/ExportPage.tsx - API client
frontend/src/api/client.ts - UI state
frontend/src/store/useStore.ts
API and workflow
- FastAPI app
backend/app/main.py - Authentication routes
backend/app/api/v1/auth_routes.py - Connection routes
backend/app/api/v1/connections.py - Catalog routes
backend/app/api/v1/catalog.py - Chat routes
backend/app/api/v1/chat.py - Run routes
backend/app/api/v1/runs.py - View routes
backend/app/api/v1/views.py - Export routes
backend/app/api/v1/export.py - Run updates
backend/app/api/v1/websocket.py
Modeling services
- Agent graph
backend/app/agent/graph.py - Agent steps
backend/app/agent/nodes.py - LLM service
backend/app/agent/llm.py - Catalog profiler
backend/app/ds/profiler.py - Playbook builder
backend/app/services/playbook_builder.py - Model validator
backend/app/services/validator.py - Artifact renderer
backend/app/services/renderer_service.py - Export service
backend/app/services/export_service.py
Persistence
- Catalog and run records
backend/app/models/catalog.py - Run and view specs
backend/app/models/run.py - PostgreSQL
backend/app/core/database.py
External systems
- Datasphere reader
backend/app/ds/reader.py
Other components
- Modeler
- SAP Datasphere
- LLM provider
Connections 43
- Modeler → Application shell: uses
frontend/src/App.tsx - Application shell → Connections: routes to
frontend/src/App.tsx - Application shell → Catalog browser: routes to
frontend/src/App.tsx - Application shell → Requirement chat: routes to
frontend/src/App.tsx - Application shell → Model canvas: routes to
frontend/src/App.tsx - Application shell → Export page: routes to
frontend/src/App.tsx - Application shell → UI state: reads
frontend/src/App.tsx - Connections → API client: requests
frontend/src/pages/ConnectionsPage.tsx - Catalog browser → API client: requests
frontend/src/pages/CatalogPage.tsx - Requirement chat → API client: submits request
frontend/src/pages/ChatRequirementPage.tsx - Model canvas → API client: requests data
frontend/src/components/canvas/DatasphereCanvas.tsx - Model canvas → Playbook review: opens
frontend/src/components/canvas/DatasphereCanvas.tsx - Model canvas → UI state: reads and updates
frontend/src/components/canvas/DatasphereCanvas.tsx - Playbook review → API client: requests
frontend/src/components/canvas/DataspherePlaybookModal.tsx - Export page → API client: requests export
frontend/src/pages/ExportPage.tsx - API client → Connection routes: calls
frontend/src/api/client.ts - API client → Catalog routes: calls
frontend/src/api/client.ts - API client → Run routes: calls
frontend/src/api/client.ts - API client → Export routes: calls
frontend/src/api/client.ts - FastAPI app → Authentication routes: mounts
backend/app/main.py - FastAPI app → Connection routes: mounts
backend/app/main.py - FastAPI app → Catalog routes: mounts
backend/app/main.py - FastAPI app → Chat routes: mounts
backend/app/main.py - FastAPI app → Run routes: mounts
backend/app/main.py - FastAPI app → View routes: mounts
backend/app/main.py - FastAPI app → Export routes: mounts
backend/app/main.py - FastAPI app → Run updates: mounts
backend/app/main.py - Catalog routes → Datasphere reader: reads source catalog
backend/app/api/v1/catalog.py - Catalog routes → Catalog profiler: profiles data
backend/app/api/v1/catalog.py - Catalog routes → Catalog and run records: queries and stores
backend/app/api/v1/catalog.py - Datasphere reader → SAP Datasphere: reads remotely
backend/app/ds/reader.py - Run routes → Agent graph: starts workflow
backend/app/api/v1/runs.py - Run routes → Playbook builder: builds playbook
backend/app/api/v1/runs.py - Run routes → Run and view specs: persists run state
backend/app/api/v1/runs.py - Chat routes → LLM service: sends prompt
backend/app/api/v1/chat.py - Chat routes → Model validator: validates model
backend/app/api/v1/chat.py - Agent graph → Agent steps: dispatches steps
- LLM service → LLM provider: requests completions
- Artifact renderer → Run and view specs: reads view specs
backend/app/services/renderer_service.py - Export routes → Export service: delegates export
- Export service → SAP Datasphere: adapts artifacts
backend/app/services/export_service.py - PostgreSQL → Catalog and run records: stores records
backend/app/models/catalog.py - PostgreSQL → Run and view specs: stores run state
backend/app/models/run.py