How 0llrayll0/pandora-architect works
Pandora Architect is a local repository-analysis application. A user registers a repository, starts an analysis, follows its progress, then explores metrics, dependencies, cycles, hotspots, history, and the architecture map; an optional AI report adds architectural recommendations. The backend discovers and analyzes source, resolves imports, computes graph results, and stores run snapshots in SQLite. The map reflects documented capabilities and indexed modules; some frontend-to-endpoint wiring is represented at the documented interface level because its implementation was not excerpted.
Main entry points: App.tsx Application UI · pipeline.py Analysis pipeline · api.ts API client · ai.py AI routes
Components 27
Web interface
- Application UI
frontend/src/App.tsx - API client
frontend/src/lib/api.ts - Run progress
frontend/src/hooks/useRunProgress.ts - Projects UI
frontend/src/pages/ProjectsPage.tsx - Analysis views
frontend/src/pages/OverviewPage.tsx - File explorer
frontend/src/pages/ExplorerPage.tsx - Run history
frontend/src/pages/HistoryPage.tsx - Architecture map
frontend/src/pages/ArchitectureMapPage.tsx - AI architect
frontend/src/pages/ArchitectPage.tsx - AI settings
frontend/src/pages/SettingsPage.tsx
API and projects
- Project routes
backend/app/routers/projects.py - Analysis routes
backend/app/routers/analysis.py - Explorer routes
backend/app/routers/explorer.py - Graph routes
backend/app/routers/graph.py - AI routes
backend/app/routers/ai.py
Analysis engine
- Analysis pipeline
backend/app/analysis/pipeline.py - File discovery
backend/app/analysis/discovery.py - Python analysis
backend/app/analysis/python_analyzer.py - Import resolver
backend/app/analysis/resolver.py - Dependency graph
backend/app/analysis/graph.py - Metrics and cycles
backend/app/analysis/metrics.py - Architecture heuristics
backend/app/analysis/heuristics.py
Persistence and safety
- Path safeguards
backend/app/security.py - Project and run models
backend/app/models.py - SQLite database
backend/app/db.py
Other components
- Developer
- Optional LLM provider
Connections 33
- Developer → Application UI: uses
- Application UI → API client: requests data
- API client → Project routes: calls project API
- API client → Analysis routes: calls analysis API
- API client → Explorer routes: calls explorer API
- API client → Graph routes: calls graph API
- API client → AI routes: calls AI API
- Application UI → Projects UI: presents
- Application UI → Analysis views: presents
- Application UI → File explorer: presents
- Application UI → Run history: presents
- Application UI → Architecture map: presents
- Application UI → AI architect: presents
- Application UI → AI settings: presents
- Project routes → Analysis pipeline: starts analysis
backend/app/analysis/pipeline.py - Analysis routes → Analysis pipeline: serves run results
backend/app/routers/analysis.py - Explorer routes → Path safeguards: validates paths
backend/app/routers/explorer.py - Graph routes → Dependency graph: computes cycles
backend/app/routers/graph.py - AI routes → Architecture heuristics: builds findings
backend/app/routers/ai.py - AI routes → Metrics and cycles: uses graph metrics
backend/app/routers/ai.py - AI routes → Dependency graph: uses dependency graph
backend/app/routers/ai.py - AI routes → Optional LLM provider: requests narrative
- Analysis pipeline → Path safeguards: configures exclusions
backend/app/analysis/pipeline.py - Analysis pipeline → File discovery: discovers files
backend/app/analysis/pipeline.py - Analysis pipeline → Python analysis: parses source
backend/app/analysis/pipeline.py - Analysis pipeline → Import resolver: resolves imports
backend/app/analysis/pipeline.py - Analysis pipeline → Metrics and cycles: computes metrics
backend/app/analysis/pipeline.py - Analysis pipeline → SQLite database: writes run snapshot
backend/app/analysis/pipeline.py - Analysis pipeline → Project and run models: creates records
backend/app/analysis/pipeline.py - SQLite database → Project and run models: persists
backend/app/db.py - File discovery → Path safeguards: checks file access
backend/app/analysis/discovery.py - Metrics and cycles → Dependency graph: measures
backend/app/analysis/metrics.py - Architecture heuristics → Dependency graph: evaluates
backend/app/analysis/heuristics.py