How akash-2615/architect-ai works
ArchitectAI turns a project brief into a streamed, multi-agent architecture debate, then produces a synthesized design and downloadable reports. The principal flow runs from setup through API session creation, debate phases, persistence and SSE updates, to the final architecture view and report downloads. History is a separate user capability. Relationships are based on the README and source-index references; sampled code confirms only some calls, so unsampled subsystem links are omitted where their caller is not evidenced.
Main entry points: routes.py Session API and SSE · engine.py Debate orchestration · App.tsx Page router · DebatePage.tsx Live debate view
Components 21
Web application
- Page router
frontend/src/App.tsx - Brief setup
frontend/src/pages/SetupPage.tsx - Session history
frontend/src/pages/HistoryPage.tsx - Live debate view
frontend/src/pages/DebatePage.tsx - API client
frontend/src/api/client.ts - SSE stream hook
frontend/src/hooks/useSessionStream.ts - Event state store
frontend/src/store/debateStore.ts - Architecture results
frontend/src/components/ResultPanel.tsx - Diagram renderer
frontend/src/components/MermaidDiagram.tsx - Scorecard chart
frontend/src/components/ScorecardChart.tsx
Session API
- Session API and SSE
backend/app/api/routes.py
Debate system
- Debate orchestration
backend/app/debate/engine.py - Agent implementations
backend/app/debate/agents.py - Agent prompts
backend/app/debate/prompts.py - Runtime settings
backend/app/config.py - SSE event publisher
backend/app/services/sse_publisher.py
Persistence and reports
- Session database
backend/app/db/database.py - Session data models
backend/app/db/models.py - PDF and DOCX reports
backend/app/services/document_generator.py
Other components
- Project user
- Anthropic API
Connections 27
- Project user → Page router: opens
frontend/src/App.tsx - Page router → Brief setup: routes to
frontend/src/App.tsx - Page router → Live debate view: routes to
frontend/src/App.tsx - Page router → Session history: routes to
frontend/src/App.tsx - Brief setup → API client: creates session
frontend/src/pages/SetupPage.tsx - Session history → API client: lists sessions
frontend/src/pages/HistoryPage.tsx - Live debate view → SSE stream hook: starts stream
frontend/src/pages/DebatePage.tsx - Live debate view → Event state store: reads state
frontend/src/pages/DebatePage.tsx - Live debate view → Architecture results: renders results
frontend/src/pages/DebatePage.tsx - SSE stream hook → API client: loads session
frontend/src/hooks/useSessionStream.ts - SSE stream hook → Event state store: dispatches events
frontend/src/hooks/useSessionStream.ts - Architecture results → Diagram renderer: renders diagram
frontend/src/components/ResultPanel.tsx - Architecture results → Scorecard chart: renders scorecard
frontend/src/components/ResultPanel.tsx - API client → Session API and SSE: calls API
README.md - Session API and SSE → Debate orchestration: starts debate
backend/app/api/routes.py - Session API and SSE → Session database: reads and writes
backend/app/api/routes.py - Session API and SSE → SSE event publisher: streams events
backend/app/api/routes.py - Debate orchestration → Agent implementations: runs agents
backend/app/debate/engine.py - Agent implementations → Agent prompts: uses prompts
backend/app/debate/agents.py - Agent implementations → Runtime settings: uses settings
backend/app/debate/agents.py - Agent implementations → Anthropic API: calls LLM
README.md - Debate orchestration → Session database: persists debate
backend/app/debate/engine.py - Debate orchestration → SSE event publisher: emits events
backend/app/debate/engine.py - Debate orchestration → PDF and DOCX reports: generates reports
backend/app/debate/engine.py - Session database → Session data models: registers models
backend/app/db/database.py - SSE event publisher → SSE stream hook: delivers SSE
README.md - Session API and SSE → PDF and DOCX reports: serves downloads
README.md