# pradesha3112/c-bud architecture

> Architecture diagram of the GitHub repository pradesha3112/c-bud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pradesha3112/c-bud
- Repository: https://github.com/pradesha3112/c-bud

## Overview

This repository is an AI-assisted web app builder: users request a new app or a change, and the service maintains generated project files and offers a preview. The visible code distinguishes planning, editing, and review, with mode routing selecting the planner or editor. It also exposes session information, undo, and progress/result streaming. The excerpts do not show the complete request handler or agent orchestration, so those links are omitted; the README is empty.

Main entry points: [`app.py`](https://github.com/pradesha3112/c-bud/blob/main/app.py) (Flask service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Generation workflow"]
  node_router["Mode router<br/>[app.py]"]
  node_planner["App planner<br/>[app.py]"]
  node_editor["Code editor<br/>[app.py]"]
  node_reviewer["Code reviewer<br/>[app.py]"]
end

subgraph group_runtime["Web app runtime"]
  node_web["Flask service<br/>[app.py]"]
  node_sessions[("Session state<br/>[app.py]")]
  node_preview["Preview renderer<br/>[app.py]"]
  node_events["Progress stream<br/>[app.py]"]
end

node_user(("User"))
node_model["Groq model API"]

node_router -->|"selects create"| node_planner
node_router -->|"selects edit"| node_editor
node_web -->|"reads session"| node_sessions
node_web -->|"renders preview"| node_preview
node_preview -->|"reads files"| node_sessions
node_web -->|"streams updates"| node_events
node_user -.->|"sends requests"| node_web
node_planner -.->|"requests completion"| node_model
node_editor -.->|"requests completion"| node_model

click node_web "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_router "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_planner "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_editor "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_reviewer "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_sessions "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_preview "https://github.com/pradesha3112/c-bud/blob/main/app.py"
click node_events "https://github.com/pradesha3112/c-bud/blob/main/app.py"

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_router,node_planner,node_editor,node_reviewer,node_user toneBlue
class node_web,node_sessions,node_preview,node_events toneAmber
class node_model toneMint
```

## Components

### Generation workflow

- [Mode router](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`
- [App planner](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`
- [Code editor](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`
- [Code reviewer](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`

### Web app runtime

- [Flask service](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`
- [Session state](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`
- [Preview renderer](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`
- [Progress stream](https://github.com/pradesha3112/c-bud/blob/main/app.py): `app.py`

### Other components

- **User**
- **Groq model API**

## Connections

- Mode router → App planner: selects create (evidence: `app.py`)
- Mode router → Code editor: selects edit (evidence: `app.py`)
- Flask service → Session state: reads session (evidence: `app.py`)
- Flask service → Preview renderer: renders preview (evidence: `app.py`)
- Preview renderer → Session state: reads files (evidence: `app.py`)
- Flask service → Progress stream: streams updates (evidence: `app.py`)
- User → Flask service: sends requests
- App planner → Groq model API: requests completion
- Code editor → Groq model API: requests completion
