How ayushgadag/dbscope works
DBScope analyzes proposed schema changes without executing them: migration parsing, optional PostgreSQL metadata verification, static application-source ingestion and dependency tracing, followed by impact and risk assessment. Its FastAPI endpoints expose these capabilities. The React dashboard presents ten analysis views; the README describes its services as a mock-backed prototype with a future live-backend switch. Edges reflect the excerpts, SOURCE INDEX references, or README; frontend-to-backend integration is shown as optional because the prototype does not establish a complete live workflow.
Main entry points: main.py FastAPI Application · analysis_service.py Analysis Orchestrator · service.py Impact Analysis · pages Analysis Views
Components 25
Dashboard
- Analysis Views
frontend/src/pages - Analyze Change
frontend/src/pages/AnalyzeChange.tsx - Overview
frontend/src/pages/Overview.tsx - Dashboard Layout
frontend/src/layouts/DashboardLayout.tsx - Migration Service
frontend/src/services/migrationService.ts - Scanner Service
frontend/src/services/scannerService.ts - HTTP Client
frontend/src/services/api.ts
REST API
- FastAPI Application
backend/dbscope/api/main.py - Migration Routes
backend/dbscope/api/routes/migration.py - Metadata Routes
backend/dbscope/api/routes/metadata.py - Dependency Routes
backend/dbscope/api/routes/dependencies.py - Impact Routes
backend/dbscope/api/routes/impact.py - Risk Routes
backend/dbscope/api/routes/risk.py - Source Routes
backend/dbscope/api/routes/source.py
Analysis Engine
- Analysis Orchestrator
backend/dbscope/analysis_service.py - Migration Parser
backend/dbscope/migration_parser.py - AST Dependency Extractor
backend/dbscope/dependencies/extractor.py - Dependency Graph Builder
backend/dbscope/dependencies/graph_builder.py
Source and Metadata
- Source Connector
backend/dbscope/source/connector.py - PostgreSQL Metadata
backend/dbscope/metadata/service.py
Impact and Risk
- Impact Analysis
backend/dbscope/impact/service.py - Risk Assessment
backend/dbscope/risk/service.py
Other components
- Engineer
- PostgreSQL
- GitHub Repository
Connections 38
- Engineer → Analysis Views: uses
README.md - Analysis Views → Analyze Change: includes
frontend/src/router/index.tsx - Analysis Views → Overview: includes
frontend/src/router/index.tsx - Analysis Views → Dashboard Layout: renders in
frontend/src/router/index.tsx - Analyze Change → Migration Service: requests analysis
frontend/src/pages/AnalyzeChange.tsx - Analyze Change → Scanner Service: uses config
frontend/src/pages/AnalyzeChange.tsx - Overview → Migration Service: loads migration data
frontend/src/pages/Overview.tsx - Overview → Scanner Service: loads scan data
frontend/src/pages/Overview.tsx - Overview → Risk Assessment: loads risk data
frontend/src/pages/Overview.tsx - Migration Service → HTTP Client: sends requests
frontend/src/services/migrationService.ts - Scanner Service → HTTP Client: sends requests
frontend/src/services/scannerService.ts - HTTP Client → FastAPI Application: HTTP requests
frontend/src/services/api.ts - FastAPI Application → Migration Routes: mounts
backend/dbscope/api/main.py - FastAPI Application → Metadata Routes: mounts
backend/dbscope/api/main.py - FastAPI Application → Dependency Routes: mounts
backend/dbscope/api/main.py - FastAPI Application → Impact Routes: mounts
backend/dbscope/api/main.py - FastAPI Application → Risk Routes: mounts
backend/dbscope/api/main.py - FastAPI Application → Source Routes: mounts
backend/dbscope/api/main.py - Migration Routes → Migration Parser: parses SQL
backend/dbscope/api/routes/migration.py - Metadata Routes → PostgreSQL Metadata: inspects schema
backend/dbscope/api/routes/metadata.py - Dependency Routes → Analysis Orchestrator: runs unified analysis
backend/dbscope/api/routes/dependencies.py - Dependency Routes → AST Dependency Extractor: extracts dependencies
backend/dbscope/api/routes/dependencies.py - Dependency Routes → Migration Parser: parses migration
backend/dbscope/api/routes/dependencies.py - Impact Routes → Impact Analysis: assesses impact
backend/dbscope/api/routes/impact.py - Risk Routes → Risk Assessment: scores risk
backend/dbscope/api/routes/risk.py - Source Routes → Source Connector: ingests source
backend/dbscope/api/routes/source.py - Analysis Orchestrator → Migration Parser: parses migration
backend/dbscope/analysis_service.py - Analysis Orchestrator → PostgreSQL Metadata: verifies schema
backend/dbscope/analysis_service.py - Analysis Orchestrator → AST Dependency Extractor: extracts dependencies
backend/dbscope/analysis_service.py - Analysis Orchestrator → Dependency Graph Builder: builds graph
backend/dbscope/analysis_service.py - Analysis Orchestrator → Source Connector: selects source
backend/dbscope/analysis_service.py - AST Dependency Extractor → Dependency Graph Builder: delegates graphing
backend/dbscope/dependencies/extractor.py - Impact Analysis → AST Dependency Extractor: uses dependencies
backend/dbscope/impact/service.py - Impact Analysis → Migration Parser: uses migration data
backend/dbscope/impact/service.py - Impact Analysis → PostgreSQL Metadata: uses metadata
backend/dbscope/impact/service.py - Risk Assessment → Impact Analysis: scores impact report
backend/dbscope/risk/service.py - PostgreSQL Metadata → PostgreSQL: reads catalogs
backend/dbscope/metadata/service.py - Source Connector → GitHub Repository: fetches repository
backend/dbscope/source/connector.py