How asvittal17/cloudforge works
CloudForge is a web platform for managing cloud projects, describing infrastructure, generating Terraform, validating and planning changes, and staging deployment behind approval. Users enter through the React app, which routes to project and infrastructure workflows; its API client calls FastAPI, whose routers own authentication, project data, AI generation, and Terraform operations. Terraform generation, validation, planning, and application are distinct backend stages. The source index documents key module references, but unsampled implementation details are not inferred; edges reflect only shown calls, imports, or API routes.
Main entry points: terraform.py Terraform routes · App.tsx Route shell · main.py FastAPI entry · api.ts API client
Components 31
Web application
- Route shell
frontend/src/App.tsx - Project dashboard
frontend/src/pages/Dashboard.tsx - Project details
frontend/src/pages/ProjectDetails.tsx - AI builder
frontend/src/pages/AIInfrastructure.tsx - Terraform workspace
frontend/src/pages/Terraform.tsx - API client
frontend/src/services/api.ts - Code viewer
frontend/src/components/CodeViewer.tsx - Workflow stepper
frontend/src/components/WorkflowStepper.tsx - Navigation bar
frontend/src/components/Navbar.tsx - Icon set
frontend/src/components/Icons.tsx - Theme state
frontend/src/context/ThemeContext.tsx
API workflows
- FastAPI entry
backend/app/main.py - Authentication routes
backend/app/routers/auth.py - Project routes
backend/app/routers/projects.py - Infrastructure routes
backend/app/routers/infrastructure.py - AI routes
backend/app/routers/ai.py - AI infrastructure synthesis
backend/app/services/ai_infrastructure.py
Terraform lifecycle
- Terraform generator
backend/app/services/terraform_generator.py - Terraform validator
backend/app/services/terraform_validator.py - Terraform planner
backend/app/services/terraform_planner.py - Terraform routes
backend/app/routers/terraform.py - Terraform applier
backend/app/services/terraform_applier.py
Identity and persistence
- Token security
backend/app/core/security.py - Database sessions
backend/app/db/database.py - Session dependency
backend/app/db/dependencies.py - User records
backend/app/models/user.py - Project records
backend/app/models/project.py - Infrastructure records
backend/app/models/infrastructure.py - Terraform artifacts
backend/app/models/terraform_artifact.py
Other components
- CloudForge user
- PostgreSQL
Connections 48
- CloudForge user → Route shell: uses
frontend/src/App.tsx - Route shell → Project dashboard: routes to
frontend/src/App.tsx - Route shell → Project details: routes to
frontend/src/App.tsx - Route shell → AI builder: routes to
frontend/src/App.tsx - Route shell → Terraform workspace: routes to
frontend/src/App.tsx - Route shell → Theme state: provides theme
frontend/src/App.tsx - Project dashboard → API client: loads projects
frontend/src/pages/Dashboard.tsx - Project dashboard → Navigation bar: renders
frontend/src/pages/Dashboard.tsx - Project dashboard → Theme state: reads theme
frontend/src/pages/Dashboard.tsx - Project details → API client: requests project data
frontend/src/pages/ProjectDetails.tsx - Project details → Navigation bar: renders
frontend/src/pages/ProjectDetails.tsx - AI builder → API client: requests AI workflow
frontend/src/pages/AIInfrastructure.tsx - AI builder → Code viewer: renders code
frontend/src/pages/AIInfrastructure.tsx - AI builder → Workflow stepper: renders steps
frontend/src/pages/AIInfrastructure.tsx - Terraform workspace → API client: requests Terraform
frontend/src/pages/Terraform.tsx - Terraform workspace → Code viewer: renders code
frontend/src/pages/Terraform.tsx - Terraform workspace → Workflow stepper: renders steps
frontend/src/pages/Terraform.tsx - Navigation bar → Theme state: toggles theme
frontend/src/components/Navbar.tsx - API client → FastAPI entry: calls HTTP API
frontend/src/services/api.ts - FastAPI entry → Authentication routes: registers routes
backend/app/main.py - FastAPI entry → Project routes: registers routes
backend/app/main.py - FastAPI entry → Infrastructure routes: registers routes
backend/app/main.py - FastAPI entry → Terraform routes: registers routes
backend/app/main.py - FastAPI entry → AI routes: registers routes
backend/app/main.py - Authentication routes → Token security: verifies and issues tokens
backend/app/routers/auth.py - Authentication routes → User records: queries users
backend/app/routers/auth.py - Authentication routes → Session dependency: obtains session
backend/app/routers/auth.py - Project routes → Token security: authenticates requests
backend/app/routers/projects.py - Project routes → Project records: queries projects
backend/app/routers/projects.py - Project routes → Session dependency: obtains session
backend/app/routers/projects.py - Infrastructure routes → Infrastructure records: queries infrastructure
backend/app/routers/infrastructure.py - Infrastructure routes → Project records: checks projects
backend/app/routers/infrastructure.py - Infrastructure routes → Session dependency: obtains session
backend/app/routers/infrastructure.py - AI routes → AI infrastructure synthesis: generates architecture
backend/app/routers/ai.py - AI routes → Terraform generator: generates Terraform
backend/app/routers/ai.py - AI routes → Terraform validator: validates output
backend/app/routers/ai.py - Terraform routes → Terraform generator: generates configuration
backend/app/routers/terraform.py - Terraform routes → Terraform validator: validates configuration
backend/app/routers/terraform.py - Terraform routes → Terraform planner: plans changes
backend/app/routers/terraform.py - Terraform routes → Terraform applier: applies approved artifact
backend/app/routers/terraform.py - Terraform routes → Terraform artifacts: stores artifacts
backend/app/routers/terraform.py - Terraform routes → Infrastructure records: loads infrastructure
backend/app/routers/terraform.py - Terraform routes → Project records: checks ownership
backend/app/routers/terraform.py - Session dependency → Database sessions: creates session
backend/app/db/dependencies.py - User records → Database sessions: uses ORM base
backend/app/models/user.py - Project records → Database sessions: uses ORM base
backend/app/models/project.py - Infrastructure records → Database sessions: uses ORM base
backend/app/models/infrastructure.py - Terraform artifacts → Database sessions: uses ORM base
backend/app/models/terraform_artifact.py