# nithinrajboppudi31-lgtm/webtoai architecture

> Architecture diagram of the GitHub repository nithinrajboppudi31-lgtm/webtoai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nithinrajboppudi31-lgtm/webtoai
- Repository: https://github.com/nithinrajboppudi31-lgtm/webtoai

## Overview

WEBTO AI is an AI-assisted web application builder. Users enter a prompt in the workspace; the backend generates project code through Gemini and manages project data, while the workspace supports preview and source export. The product also exposes project, template, discovery, history, deployment, account, and billing areas. Evidence is partial: several page implementations and most server routes were not sampled, so their detailed wiring is omitted.

Main entry points: [`webto-ai/src/App.jsx`](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/App.jsx) (App router), [`server/index.js`](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/index.js) (API server), [`webto-ai/src/pages/Workspace.jsx`](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Workspace.jsx) (AI workspace), [`webto-ai/src/pages/Credits.jsx`](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Credits.jsx) (Credits and billing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["App router<br/>[App.jsx]"]
  node_workspace["AI workspace<br/>[Workspace.jsx]"]
  node_projects["Projects<br/>[Projects.jsx]"]
  node_templates["Templates<br/>[Templates.jsx]"]
  node_explore["Explore<br/>[Explore.jsx]"]
  node_history["Build history<br/>[History.jsx]"]
  node_deployments["Deployments<br/>[Deployments.jsx]"]
  node_credits["Credits and billing<br/>[Credits.jsx]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_preview["Public preview<br/>[App.jsx]"]
  node_login["Login and signup<br/>[Login.jsx]"]
  node_settings["Settings<br/>[Settings.jsx]"]
end

subgraph group_server["Backend services"]
  node_server["API server<br/>[index.js]"]
  node_ai["Code and chat generation<br/>[aiService.js]"]
end

subgraph group_state["Persistent state"]
  node_db[("Application records<br/>[schema.prisma]")]
end

node_user(("User"))
node_gemini["Google Gemini"]
node_razorpay["Razorpay"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_workspace
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_templates
node_app -->|"routes to"| node_explore
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_deployments
node_app -->|"routes to"| node_credits
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_preview
node_workspace -->|"requests API"| node_server
node_server -->|"calls generation"| node_ai
node_ai -->|"generates with"| node_gemini
node_server -->|"reads and writes"| node_db
node_auth -->|"fetches profile"| node_server
node_credits -->|"requests payment"| node_server
node_server -->|"creates checkout"| node_razorpay
node_preview -->|"fetches published project"| node_server
node_server -->|"updates deployment"| node_db

click node_app "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/App.jsx"
click node_workspace "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Workspace.jsx"
click node_projects "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Projects.jsx"
click node_templates "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Templates.jsx"
click node_explore "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Explore.jsx"
click node_history "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/History.jsx"
click node_deployments "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Deployments.jsx"
click node_credits "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Credits.jsx"
click node_auth "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/context/AuthContext.jsx"
click node_server "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/index.js"
click node_ai "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/services/aiService.js"
click node_db "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/prisma/schema.prisma"
click node_preview "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/App.jsx"
click node_login "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Login.jsx"
click node_settings "https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Settings.jsx"

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_app,node_workspace,node_projects,node_templates,node_explore,node_history,node_deployments,node_credits,node_auth,node_preview,node_login,node_settings,node_user toneBlue
class node_server,node_ai toneAmber
class node_db toneMint
class node_gemini,node_razorpay toneIndigo
```

## Components

### Web application

- [App router](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/App.jsx): `webto-ai/src/App.jsx`
- [AI workspace](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Workspace.jsx): `webto-ai/src/pages/Workspace.jsx`
- [Projects](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Projects.jsx): `webto-ai/src/pages/Projects.jsx`
- [Templates](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Templates.jsx): `webto-ai/src/pages/Templates.jsx`
- [Explore](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Explore.jsx): `webto-ai/src/pages/Explore.jsx`
- [Build history](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/History.jsx): `webto-ai/src/pages/History.jsx`
- [Deployments](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Deployments.jsx): `webto-ai/src/pages/Deployments.jsx`
- [Credits and billing](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Credits.jsx): `webto-ai/src/pages/Credits.jsx`
- [Authentication state](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/context/AuthContext.jsx): `webto-ai/src/context/AuthContext.jsx`
- [Public preview](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/App.jsx): `webto-ai/src/App.jsx`
- [Login and signup](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Login.jsx): `webto-ai/src/pages/Login.jsx`
- [Settings](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/webto-ai/src/pages/Settings.jsx): `webto-ai/src/pages/Settings.jsx`

### Backend services

- [API server](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/index.js): `server/index.js`
- [Code and chat generation](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/services/aiService.js): `server/services/aiService.js`

### Persistent state

- [Application records](https://github.com/nithinrajboppudi31-lgtm/webtoai/blob/main/server/prisma/schema.prisma): `server/prisma/schema.prisma`

### Other components

- **User**
- **Google Gemini**
- **Razorpay**

## Connections

- User → App router: uses
- App router → AI workspace: routes to
- App router → Projects: routes to
- App router → Templates: routes to
- App router → Explore: routes to
- App router → Build history: routes to
- App router → Deployments: routes to
- App router → Credits and billing: routes to
- App router → Login and signup: routes to
- App router → Settings: routes to
- App router → Public preview: routes to
- AI workspace → API server: requests API
- API server → Code and chat generation: calls generation
- Code and chat generation → Google Gemini: generates with
- API server → Application records: reads and writes
- Authentication state → API server: fetches profile
- Credits and billing → API server: requests payment
- API server → Razorpay: creates checkout
- Public preview → API server: fetches published project
- API server → Application records: updates deployment
