# aditipawar0302/generative-ai-software-development-platform architecture

> Architecture diagram of the GitHub repository aditipawar0302/generative-ai-software-development-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aditipawar0302/generative-ai-software-development-platform
- Repository: https://github.com/aditipawar0302/generative-ai-software-development-platform

## Overview

Forge is an AI app-building platform: users describe an application in a workspace, receive streamed generated or improved code, inspect it in a live preview, and manage saved projects. The graph also captures authentication, credit/pricing, export, and project-management capabilities documented in the README. Source excerpts establish the main workspace, API, persistence, and preview relationships; unsampled implementation details are not inferred.

Main entry points: [`components/WorkspaceClient.tsx`](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/WorkspaceClient.tsx) (Workspace controller), [`app/api/gen-ai-code/route.ts`](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/api/gen-ai-code/route.ts) (Generate app API), [`app/api/improve/route.ts`](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/api/improve/route.ts) (Improve app API), [`actions/projects.ts`](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/actions/projects.ts) (Project operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace authoring"]
  node_home["Product landing<br/>[page.tsx]"]
  node_workspace_page["Workspace route<br/>[page.tsx]"]
  node_workspace_client["Workspace controller"]
  node_chat["Chat interaction<br/>[ChatPanel.tsx]"]
  node_code_panel["Code, preview, export<br/>[CodePanel.tsx]"]
  node_mobile_blocker["Mobile restriction<br/>[MobileBlocker.tsx]"]
  node_sandpack{{"Sandpack runtime"}}
end

subgraph group_generation["AI generation"]
  node_generate_api["Generate app API<br/>[route.ts]"]
  node_improve_api["Improve app API<br/>[route.ts]"]
  node_gemini{{"Gemini AI"}}
  node_cline_agent{{"Cline agent"}}
end

subgraph group_projects["Projects and accounts"]
  node_auth_pages["Sign-in and sign-up<br/>[page.tsx]"]
  node_projects_page["Project list route<br/>[page.tsx]"]
  node_project_actions["Project operations<br/>[projects.ts]"]
  node_project_card["Project card<br/>[ProjectCard.tsx]"]
  node_delete_modal["Project deletion UI"]
  node_header["Account and credits<br/>[Header.tsx]"]
  node_pricing["Plans and checkout<br/>[PricingModal.tsx]"]
  node_workspace_actions["Workspace persistence<br/>[workspace.ts]"]
end

subgraph group_platform["Shared platform"]
  node_database[("PostgreSQL database<br/>[prisma.ts]")]
  node_auth_service{{"Clerk authentication"}}
  node_workspace_types["Workspace data types<br/>[workspace.ts]"]
  node_project_types["Project data types<br/>[project.ts]"]
  node_plan_types["Plan types<br/>[plans.ts]"]
  node_credit_config["Credit and plan config<br/>[constants.ts]"]
end

node_user(("Developer"))

node_user -->|"visits"| node_home
node_home -->|"offers sign-in"| node_auth_pages
node_user -.->|"opens workspace"| node_workspace_page
node_workspace_page -->|"renders"| node_workspace_client
node_workspace_client -->|"renders"| node_chat
node_workspace_client -->|"renders"| node_code_panel
node_workspace_client -->|"renders"| node_mobile_blocker
node_workspace_client -.->|"requests generation"| node_generate_api
node_workspace_client -->|"requests improvements"| node_improve_api
node_generate_api -->|"generates code"| node_gemini
node_improve_api -->|"runs agent"| node_cline_agent
node_generate_api -->|"saves workspace and credits"| node_database
node_improve_api -->|"saves updates and credits"| node_database
node_code_panel -->|"renders live preview"| node_sandpack
node_code_panel -->|"exports app archive"| node_user
node_projects_page -->|"loads projects"| node_project_actions
node_projects_page -->|"renders cards"| node_project_card
node_project_card -->|"deletes project"| node_project_actions
node_project_card -->|"opens deletion UI"| node_delete_modal
node_project_actions -->|"reads and deletes workspaces"| node_database
node_workspace_page -->|"loads workspace"| node_workspace_actions
node_workspace_actions -->|"reads and writes workspace"| node_database
node_header -->|"opens pricing"| node_pricing
node_header -->|"checks account"| node_auth_service
node_pricing -->|"authenticates checkout"| node_auth_service
node_generate_api -->|"checks identity"| node_auth_service
node_improve_api -->|"checks identity"| node_auth_service
node_generate_api -->|"uses generation cost"| node_credit_config
node_improve_api -->|"uses generation cost"| node_credit_config
node_workspace_client -->|"uses workspace data"| node_workspace_types
node_generate_api -->|"uses file and message data"| node_workspace_types
node_improve_api -->|"uses file data"| node_workspace_types
node_project_actions -->|"returns project summaries"| node_project_types
node_header -->|"uses plan types"| node_plan_types
node_pricing -->|"displays configured plans"| node_credit_config

click node_home "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/page.tsx"
click node_auth_pages "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/(auth)/sign-in/%5B%5B...sign-in%5D%5D/page.tsx"
click node_workspace_page "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/(main)/workspace/page.tsx"
click node_workspace_client "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/WorkspaceClient.tsx"
click node_chat "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/ChatPanel.tsx"
click node_code_panel "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/CodePanel.tsx"
click node_mobile_blocker "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/MobileBlocker.tsx"
click node_generate_api "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/api/gen-ai-code/route.ts"
click node_improve_api "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/api/improve/route.ts"
click node_projects_page "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/(main)/projects/page.tsx"
click node_project_actions "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/actions/projects.ts"
click node_project_card "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/ProjectCard.tsx"
click node_delete_modal "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/DeleteProjectModal.tsx"
click node_header "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/Header.tsx"
click node_pricing "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/PricingModal.tsx"
click node_workspace_actions "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/actions/workspace.ts"
click node_database "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/lib/prisma.ts"
click node_workspace_types "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/types/workspace.ts"
click node_project_types "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/types/project.ts"
click node_plan_types "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/types/plans.ts"
click node_credit_config "https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/lib/constants.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_workspace_page,node_workspace_client,node_chat,node_code_panel,node_mobile_blocker,node_sandpack toneBlue
class node_generate_api,node_improve_api,node_gemini,node_cline_agent toneAmber
class node_auth_pages,node_projects_page,node_project_actions,node_project_card,node_delete_modal,node_header,node_pricing,node_workspace_actions toneMint
class node_database,node_auth_service,node_workspace_types,node_project_types,node_plan_types,node_credit_config toneRose
class node_user toneIndigo
```

## Components

### Workspace authoring

- [Product landing](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/page.tsx): `app/page.tsx`
- [Workspace route](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/(main)/workspace/page.tsx): `app/(main)/workspace/page.tsx`
- [Workspace controller](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/WorkspaceClient.tsx): `components/WorkspaceClient.tsx`
- [Chat interaction](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/ChatPanel.tsx): `components/ChatPanel.tsx`
- [Code, preview, export](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/CodePanel.tsx): `components/CodePanel.tsx`
- [Mobile restriction](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/MobileBlocker.tsx): `components/MobileBlocker.tsx`
- **Sandpack runtime**

### AI generation

- [Generate app API](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/api/gen-ai-code/route.ts): `app/api/gen-ai-code/route.ts`
- [Improve app API](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/api/improve/route.ts): `app/api/improve/route.ts`
- **Gemini AI**
- **Cline agent**

### Projects and accounts

- [Sign-in and sign-up](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/(auth)/sign-in/%5B%5B...sign-in%5D%5D/page.tsx): `app/(auth)/sign-in/[[...sign-in]]/page.tsx`
- [Project list route](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/app/(main)/projects/page.tsx): `app/(main)/projects/page.tsx`
- [Project operations](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/actions/projects.ts): `actions/projects.ts`
- [Project card](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/ProjectCard.tsx): `components/ProjectCard.tsx`
- [Project deletion UI](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/DeleteProjectModal.tsx): `components/DeleteProjectModal.tsx`
- [Account and credits](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/Header.tsx): `components/Header.tsx`
- [Plans and checkout](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/components/PricingModal.tsx): `components/PricingModal.tsx`
- [Workspace persistence](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/actions/workspace.ts): `actions/workspace.ts`

### Shared platform

- [PostgreSQL database](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/lib/prisma.ts): `lib/prisma.ts`
- **Clerk authentication**
- [Workspace data types](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/types/workspace.ts): `types/workspace.ts`
- [Project data types](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/types/project.ts): `types/project.ts`
- [Plan types](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/types/plans.ts): `types/plans.ts`
- [Credit and plan config](https://github.com/aditipawar0302/generative-ai-software-development-platform/blob/main/lib/constants.ts): `lib/constants.ts`

### Other components

- **Developer**

## Connections

- Developer → Product landing: visits (evidence: `app/page.tsx`)
- Product landing → Sign-in and sign-up: offers sign-in (evidence: `app/page.tsx`)
- Developer → Workspace route: opens workspace
- Workspace route → Workspace controller: renders (evidence: `app/(main)/workspace/page.tsx`)
- Workspace controller → Chat interaction: renders (evidence: `components/WorkspaceClient.tsx`)
- Workspace controller → Code, preview, export: renders (evidence: `components/WorkspaceClient.tsx`)
- Workspace controller → Mobile restriction: renders (evidence: `components/WorkspaceClient.tsx`)
- Workspace controller → Generate app API: requests generation
- Workspace controller → Improve app API: requests improvements (evidence: `components/WorkspaceClient.tsx`)
- Generate app API → Gemini AI: generates code (evidence: `app/api/gen-ai-code/route.ts`)
- Improve app API → Cline agent: runs agent (evidence: `app/api/improve/route.ts`)
- Generate app API → PostgreSQL database: saves workspace and credits (evidence: `app/api/gen-ai-code/route.ts`)
- Improve app API → PostgreSQL database: saves updates and credits (evidence: `app/api/improve/route.ts`)
- Code, preview, export → Sandpack runtime: renders live preview (evidence: `components/CodePanel.tsx`)
- Code, preview, export → Developer: exports app archive (evidence: `components/CodePanel.tsx`)
- Project list route → Project operations: loads projects (evidence: `app/(main)/projects/page.tsx`)
- Project list route → Project card: renders cards (evidence: `app/(main)/projects/page.tsx`)
- Project card → Project operations: deletes project (evidence: `components/ProjectCard.tsx`)
- Project card → Project deletion UI: opens deletion UI (evidence: `components/ProjectCard.tsx`)
- Project operations → PostgreSQL database: reads and deletes workspaces (evidence: `actions/projects.ts`)
- Workspace route → Workspace persistence: loads workspace (evidence: `app/(main)/workspace/page.tsx`)
- Workspace persistence → PostgreSQL database: reads and writes workspace (evidence: `actions/workspace.ts`)
- Account and credits → Plans and checkout: opens pricing (evidence: `components/Header.tsx`)
- Account and credits → Clerk authentication: checks account (evidence: `components/Header.tsx`)
- Plans and checkout → Clerk authentication: authenticates checkout (evidence: `components/PricingModal.tsx`)
- Generate app API → Clerk authentication: checks identity (evidence: `app/api/gen-ai-code/route.ts`)
- Improve app API → Clerk authentication: checks identity (evidence: `app/api/improve/route.ts`)
- Generate app API → Credit and plan config: uses generation cost (evidence: `app/api/gen-ai-code/route.ts`)
- Improve app API → Credit and plan config: uses generation cost (evidence: `app/api/improve/route.ts`)
- Workspace controller → Workspace data types: uses workspace data (evidence: `components/WorkspaceClient.tsx`)
- Generate app API → Workspace data types: uses file and message data (evidence: `app/api/gen-ai-code/route.ts`)
- Improve app API → Workspace data types: uses file data (evidence: `app/api/improve/route.ts`)
- Project operations → Project data types: returns project summaries (evidence: `actions/projects.ts`)
- Account and credits → Plan types: uses plan types (evidence: `components/Header.tsx`)
- Plans and checkout → Credit and plan config: displays configured plans (evidence: `components/PricingModal.tsx`)
