# shakti8808/karya architecture

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

- Interactive diagram: https://gitdiagram.com/shakti8808/karya
- Repository: https://github.com/shakti8808/karya

## Overview

Karya is currently a Flask/Jinja website and frontend workspace preview, not an implemented agent platform. The working user flow is to open the workspace, enter a project goal, save it in browser localStorage, and see the project rendered in the workspace. The README describes coordinated research, analysis, creation, and organization agents as the product vision, while its MVP architecture and roadmap mark orchestration, persistence, and authentication integrations as planned. Edges reflect the sampled route and browser code; unsampled page wiring is included only where the README documents it.

Main entry points: [`app.py`](https://github.com/shakti8808/karya/blob/main/app.py) (Flask routes), [`static/src/workspace.ts`](https://github.com/shakti8808/karya/blob/main/static/src/workspace.ts) (Project workflow), [`static/src/auth.ts`](https://github.com/shakti8808/karya/blob/main/static/src/auth.ts) (Demo sign-in), [`static/src/landing.ts`](https://github.com/shakti8808/karya/blob/main/static/src/landing.ts) (Landing interactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Flask application"]
  node_flask["Flask routes<br/>[app.py]"]
end

subgraph group_site["Public website"]
  node_landing["Landing page<br/>[index.html]"]
  node_landing_ui["Landing interactions<br/>[landing.ts]"]
  node_about["About page<br/>[about.html]"]
  node_about_ui["About interactions<br/>[about.js]"]
  node_early["Early-access page<br/>[early-access.html]"]
  node_early_ui["Early-access interactions<br/>[early-access.ts]"]
end

subgraph group_access["Access and pricing"]
  node_pricing["Pricing page<br/>[pricing.html]"]
  node_pricing_ui["Localized pricing<br/>[pricing.ts]"]
  node_auth["Sign-in page<br/>[auth.html]"]
  node_auth_ui["Demo sign-in<br/>[auth.ts]"]
end

subgraph group_workspace["Workspace preview"]
  node_workspace_page["Workspace page<br/>[workspace.html]"]
  node_workspace_ui["Project workflow<br/>[workspace.ts]"]
end

node_visitor(("Visitor"))
node_local_storage[("Browser localStorage")]

node_visitor -->|"requests pages"| node_flask
node_flask -->|"renders"| node_landing
node_flask -->|"renders"| node_about
node_flask -->|"renders"| node_pricing
node_flask -->|"renders"| node_early
node_flask -->|"renders"| node_auth
node_flask -->|"renders"| node_workspace_page
node_visitor -->|"tries sample prompts"| node_landing_ui
node_landing_ui -->|"navigates waitlist"| node_early
node_visitor -->|"chooses country"| node_pricing_ui
node_pricing_ui -->|"saves country"| node_local_storage
node_visitor -->|"starts demo sign-in"| node_auth_ui
node_auth_ui -->|"sets demo session"| node_local_storage
node_auth_ui -->|"navigates to app"| node_flask
node_visitor -->|"submits project goal"| node_workspace_ui
node_workspace_ui -->|"reads and saves projects"| node_local_storage
node_workspace_ui -->|"renders project view"| node_workspace_page
node_workspace_ui -->|"sign-out navigates"| node_flask

click node_flask "https://github.com/shakti8808/karya/blob/main/app.py"
click node_landing "https://github.com/shakti8808/karya/blob/main/templates/index.html"
click node_landing_ui "https://github.com/shakti8808/karya/blob/main/static/src/landing.ts"
click node_about "https://github.com/shakti8808/karya/blob/main/templates/about.html"
click node_about_ui "https://github.com/shakti8808/karya/blob/main/static/js/about.js"
click node_early "https://github.com/shakti8808/karya/blob/main/templates/early-access.html"
click node_early_ui "https://github.com/shakti8808/karya/blob/main/static/src/early-access.ts"
click node_pricing "https://github.com/shakti8808/karya/blob/main/templates/pricing.html"
click node_pricing_ui "https://github.com/shakti8808/karya/blob/main/static/src/pricing.ts"
click node_auth "https://github.com/shakti8808/karya/blob/main/templates/auth.html"
click node_auth_ui "https://github.com/shakti8808/karya/blob/main/static/src/auth.ts"
click node_workspace_page "https://github.com/shakti8808/karya/blob/main/templates/workspace.html"
click node_workspace_ui "https://github.com/shakti8808/karya/blob/main/static/src/workspace.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_flask toneBlue
class node_landing,node_landing_ui,node_about,node_about_ui,node_early,node_early_ui,node_local_storage toneAmber
class node_pricing,node_pricing_ui,node_auth,node_auth_ui toneMint
class node_workspace_page,node_workspace_ui toneRose
class node_visitor toneIndigo
```

## Components

### Flask application

- [Flask routes](https://github.com/shakti8808/karya/blob/main/app.py): `app.py`

### Public website

- [Landing page](https://github.com/shakti8808/karya/blob/main/templates/index.html): `templates/index.html`
- [Landing interactions](https://github.com/shakti8808/karya/blob/main/static/src/landing.ts): `static/src/landing.ts`
- [About page](https://github.com/shakti8808/karya/blob/main/templates/about.html): `templates/about.html`
- [About interactions](https://github.com/shakti8808/karya/blob/main/static/js/about.js): `static/js/about.js`
- [Early-access page](https://github.com/shakti8808/karya/blob/main/templates/early-access.html): `templates/early-access.html`
- [Early-access interactions](https://github.com/shakti8808/karya/blob/main/static/src/early-access.ts): `static/src/early-access.ts`

### Access and pricing

- [Pricing page](https://github.com/shakti8808/karya/blob/main/templates/pricing.html): `templates/pricing.html`
- [Localized pricing](https://github.com/shakti8808/karya/blob/main/static/src/pricing.ts): `static/src/pricing.ts`
- [Sign-in page](https://github.com/shakti8808/karya/blob/main/templates/auth.html): `templates/auth.html`
- [Demo sign-in](https://github.com/shakti8808/karya/blob/main/static/src/auth.ts): `static/src/auth.ts`

### Workspace preview

- [Workspace page](https://github.com/shakti8808/karya/blob/main/templates/workspace.html): `templates/workspace.html`
- [Project workflow](https://github.com/shakti8808/karya/blob/main/static/src/workspace.ts): `static/src/workspace.ts`

### Other components

- **Visitor**
- **Browser localStorage**

## Connections

- Visitor → Flask routes: requests pages (evidence: `README.md`)
- Flask routes → Landing page: renders (evidence: `app.py`)
- Flask routes → About page: renders (evidence: `app.py`)
- Flask routes → Pricing page: renders (evidence: `app.py`)
- Flask routes → Early-access page: renders (evidence: `app.py`)
- Flask routes → Sign-in page: renders (evidence: `app.py`)
- Flask routes → Workspace page: renders (evidence: `app.py`)
- Visitor → Landing interactions: tries sample prompts (evidence: `static/src/landing.ts`)
- Landing interactions → Early-access page: navigates waitlist (evidence: `static/src/landing.ts`)
- Visitor → Localized pricing: chooses country (evidence: `static/src/pricing.ts`)
- Localized pricing → Browser localStorage: saves country (evidence: `static/src/pricing.ts`)
- Visitor → Demo sign-in: starts demo sign-in (evidence: `static/src/auth.ts`)
- Demo sign-in → Browser localStorage: sets demo session (evidence: `static/src/auth.ts`)
- Demo sign-in → Flask routes: navigates to app (evidence: `static/src/auth.ts`)
- Visitor → Project workflow: submits project goal (evidence: `static/src/workspace.ts`)
- Project workflow → Browser localStorage: reads and saves projects (evidence: `static/src/workspace.ts`)
- Project workflow → Workspace page: renders project view (evidence: `static/src/workspace.ts`)
- Project workflow → Flask routes: sign-out navigates (evidence: `static/src/workspace.ts`)
