How dexterhere04/appdev_ai works
Flutter Cloud Builder is a browser IDE for editing Flutter web projects, with authenticated project storage, real-SDK builds, live preview/dev mode, and optional AI scaffolding. The main loop runs from browser editing through backend file operations and build or hot-reload, then returns a preview. The graph preserves auth, project/workspace, build, preview/dev, and AI stages plus metadata and process-safety layers. Edges are limited to README statements and source-index references or excerpts; unsampled frontend and dev internals are not expanded.
Main entry points: server.py FastAPI Assembly · workspace.py Project Files · db.py Metadata Store · deps.py Auth and Ownership
Components 31
Browser IDE
- App Entry
frontend/src/app/page.tsx - Auth Context
frontend/src/context/AuthContext.tsx - Build Context
frontend/src/context/BuildContext.tsx - Workspace UI
frontend/src/components/WorkspaceLayout.tsx - Code Editor
frontend/src/components/IDE.tsx - API Client
frontend/src/lib/api.ts - Preview Pane
frontend/src/components/PreviewPane.tsx
Backend API
- FastAPI Assembly
backend/server.py - Auth Routes
backend/routers/auth.py - Project Routes
backend/routers/projects.py - File Routes
backend/routers/files.py - Release Build
backend/routers/build.py - Dev Lifecycle
backend/routers/dev.py - Preview Serving
backend/routers/preview.py - AI Route
backend/routers/ai.py
AI Generation
- AI Apply Pipeline
backend/ai_pipeline.py - Agent Coordinator
backend/ai_agents/coordinator.py - Agent Runtime
backend/ai_agents/base.py - Gemini Configuration
backend/gemini_config.py
State and Runtime
- Metadata Store
backend/db.py - User and Project Models
backend/models - Project Files
backend/workspace.py - Session Security
backend/security.py - Auth and Ownership
backend/routers/deps.py - Preview Tokens
backend/preview_token.py - Process Environment
backend/envpolicy.py - Cleanup Loop
backend/lifecycle.py - Backend Config
backend/config.py - Rate Limiting
backend/ratelimit.py
Other components
- Developer
- Flutter SDK
Connections 48
- Developer → App Entry: uses
README.md - App Entry → Auth Context: provides session
README.md - App Entry → Build Context: provides project state
README.md - Build Context → Workspace UI: drives workspace
README.md - Workspace UI → Code Editor: hosts editor
README.md - Build Context → Preview Pane: feeds preview
README.md - Auth Context → API Client: calls
- Build Context → API Client: calls
- API Client → FastAPI Assembly: HTTP API
README.md - FastAPI Assembly → Auth Routes: registers
backend/server.py - FastAPI Assembly → Project Routes: registers
backend/server.py - FastAPI Assembly → File Routes: registers
backend/server.py - FastAPI Assembly → Release Build: registers
backend/server.py - FastAPI Assembly → Preview Serving: registers
backend/server.py - FastAPI Assembly → Dev Lifecycle: registers
backend/server.py - FastAPI Assembly → AI Route: registers
backend/server.py - Auth Routes → Metadata Store: manages sessions
backend/routers/auth.py - Auth Routes → Session Security: hashes credentials
backend/routers/auth.py - Auth Routes → Rate Limiting: checks limits
backend/routers/auth.py - Auth and Ownership → Metadata Store: resolves ownership
backend/routers/deps.py - Auth and Ownership → Session Security: hashes session token
backend/routers/deps.py - Project Routes → Auth and Ownership: requires user
backend/routers/projects.py - Project Routes → Metadata Store: manages projects
backend/routers/projects.py - Project Routes → Project Files: provisions files
README.md - File Routes → Auth and Ownership: requires ownership
backend/routers/files.py - File Routes → Project Files: reads and writes
backend/routers/files.py - Release Build → Auth and Ownership: requires project
backend/routers/build.py - Release Build → Project Files: builds project files
README.md - Release Build → Flutter SDK: runs release build
README.md - Release Build → Preview Tokens: mints access token
backend/routers/build.py - Preview Serving → Preview Tokens: verifies access
backend/routers/preview.py - Preview Serving → Metadata Store: looks up project
backend/routers/preview.py - Preview Serving → Project Files: serves built files
backend/routers/preview.py - Preview Pane → Preview Serving: loads preview
README.md - Dev Lifecycle → Project Files: runs dev project
- Dev Lifecycle → Flutter SDK: starts hot reload
README.md - AI Route → Auth and Ownership: requires user
backend/routers/ai.py - AI Route → AI Apply Pipeline: runs generation
backend/routers/ai.py - AI Apply Pipeline → Agent Coordinator: runs agent stages
backend/ai_pipeline.py - AI Apply Pipeline → Project Files: validates and writes files
backend/ai_pipeline.py - Agent Coordinator → Agent Runtime: uses agent classes
backend/ai_agents/coordinator.py - Agent Runtime → Gemini Configuration: gets model runtime
backend/ai_agents/base.py - Metadata Store → User and Project Models: constructs records
backend/db.py - Project Files → Backend Config: reads workspace root
backend/workspace.py - Metadata Store → Backend Config: reads database path
backend/db.py - Project Files → Process Environment: configures subprocess
backend/workspace.py - FastAPI Assembly → Cleanup Loop: starts cleanup
backend/server.py - Cleanup Loop → Metadata Store: scans project records
backend/lifecycle.py