# abhishek2006-create/codevyaas architecture

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

- Interactive diagram: https://gitdiagram.com/abhishek2006-create/codevyaas
- Repository: https://github.com/abhishek2006-create/codevyaas

## Overview

CodeVyaas combines a browser coding workspace with a separate Docker-backed execution service. The primary flow is editing code, requesting execution, and viewing output or errors; the product also provides a WebContainer project playground, saved/shared snippets, AI debugging, authentication, and subscription features. Sampled source confirms the editor store calls the Judge API directly, while a separate Next.js execution route also proxies requests to it. Convex and several product branches are represented from the tree and README; their detailed call wiring was not sampled.

Main entry points: [`src/app/(root)/_components/EditorPanel.tsx`](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/_components/EditorPanel.tsx) (Code editor), [`src/store/useCodeEditorStore.ts`](https://github.com/abhishek2006-create/codevyaas/blob/main/src/store/useCodeEditorStore.ts) (Editor state), [`codevyaas-judge-api/src/dockerRunner.js`](https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/dockerRunner.js) (Docker runner), [`src/app/(root)/playground/components/playground-client.tsx`](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/components/playground-client.tsx) (Workspace client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coding["Code execution"]
  node_editor["Code editor<br/>[EditorPanel.tsx]"]
  node_editorstate["Editor state"]
  node_execroute["Execution proxy<br/>[route.ts]"]
  node_judge["Judge API<br/>[server.js]"]
  node_runner["Docker runner<br/>[dockerRunner.js]"]
  node_languages["Language support<br/>[languages.js]"]
  node_output["Results panel<br/>[OutputPanel.tsx]"]
  node_docker["Docker runtime"]
end

subgraph group_playground["Project playground"]
  node_playpage["Playground<br/>[page.tsx]"]
  node_playclient["Workspace client"]
  node_fileexplorer["File explorer"]
  node_webhook["Container setup<br/>[useWebContainer.ts]"]
  node_webservice["WebContainer service"]
  node_templateapi["Template endpoint<br/>[route.ts]"]
  node_templates["Starter templates<br/>[App.jsx]"]
end

subgraph group_sharing["Snippets and profiles"]
  node_snippets[("Snippet data<br/>[snippets.ts]")]
  node_snippetpages["Snippet pages<br/>[page.tsx]"]
  node_profile["User profile<br/>[page.tsx]"]
  node_convex[("Convex schema<br/>[schema.ts]")]
end

subgraph group_platform["Identity and plans"]
  node_auth["Clerk identity"]
  node_userdata[("User data<br/>[users.ts]")]
  node_plans["Pricing interface<br/>[page.tsx]"]
  node_billing["Billing integration<br/>[lemonSqueezy.ts]"]
end

subgraph group_assistance["AI assistance"]
  node_chat["Debug assistant<br/>[route.ts]"]
  node_ollama["Ollama model"]
end

node_developer(("Developer"))

node_developer -->|"writes code"| node_editor
node_editor -->|"updates editor"| node_editorstate
node_editorstate -->|"submits code"| node_judge
node_editorstate -->|"updates results"| node_output
node_editor -.->|"posts code"| node_execroute
node_execroute -->|"forwards request"| node_judge
node_judge -->|"dispatches execution"| node_runner
node_runner -->|"checks language"| node_languages
node_runner -->|"runs code"| node_docker
node_developer -->|"opens workspace"| node_playpage
node_playpage -->|"loads workspace"| node_playclient
node_playclient -->|"manages files"| node_fileexplorer
node_playclient -->|"starts preview"| node_webhook
node_webhook -->|"sets up container"| node_webservice
node_developer -->|"requests template"| node_templateapi
node_templateapi -->|"loads starter"| node_templates
node_developer -->|"browses snippets"| node_snippetpages
node_snippetpages -.->|"snippet operations"| node_snippets
node_snippets -->|"uses schema"| node_convex
node_developer -->|"views profile"| node_profile
node_profile -.->|"user operations"| node_userdata
node_userdata -->|"uses schema"| node_convex
node_developer -->|"authenticates"| node_auth
node_developer -->|"views plans"| node_plans
node_plans -.->|"initiates upgrade"| node_billing
node_developer -->|"requests debugging"| node_chat
node_chat -->|"sends context"| node_ollama

click node_editor "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/_components/EditorPanel.tsx"
click node_editorstate "https://github.com/abhishek2006-create/codevyaas/blob/main/src/store/useCodeEditorStore.ts"
click node_execroute "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/api/execute/route.ts"
click node_judge "https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/server.js"
click node_runner "https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/dockerRunner.js"
click node_languages "https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/languages.js"
click node_output "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/_components/OutputPanel.tsx"
click node_playpage "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/%5Bid%5D/page.tsx"
click node_playclient "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/components/playground-client.tsx"
click node_fileexplorer "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/hooks/useFileExplorer.tsx"
click node_webhook "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/webcontainers/hooks/useWebContainer.ts"
click node_webservice "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/webcontainers/service/webContainerService.ts"
click node_templateapi "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/api/template/%5Btemplate%5D/route.ts"
click node_templates "https://github.com/abhishek2006-create/codevyaas/blob/main/src/templates/react/src/App.jsx"
click node_snippets "https://github.com/abhishek2006-create/codevyaas/blob/main/convex/snippets.ts"
click node_snippetpages "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/snippets/page.tsx"
click node_profile "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/profile/page.tsx"
click node_convex "https://github.com/abhishek2006-create/codevyaas/blob/main/convex/schema.ts"
click node_auth "https://github.com/abhishek2006-create/codevyaas/blob/main/src/components/providers/ConvexClientProvider.tsx"
click node_userdata "https://github.com/abhishek2006-create/codevyaas/blob/main/convex/users.ts"
click node_plans "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/pricing/page.tsx"
click node_billing "https://github.com/abhishek2006-create/codevyaas/blob/main/convex/lemonSqueezy.ts"
click node_chat "https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/api/chat/route.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_editor,node_editorstate,node_execroute,node_judge,node_runner,node_languages,node_output,node_docker toneBlue
class node_playpage,node_playclient,node_fileexplorer,node_webhook,node_webservice,node_templateapi,node_templates toneAmber
class node_snippets,node_snippetpages,node_profile,node_convex toneMint
class node_auth,node_userdata,node_plans,node_billing toneRose
class node_chat,node_ollama,node_developer toneIndigo
```

## Components

### Code execution

- [Code editor](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/_components/EditorPanel.tsx): `src/app/(root)/_components/EditorPanel.tsx`
- [Editor state](https://github.com/abhishek2006-create/codevyaas/blob/main/src/store/useCodeEditorStore.ts): `src/store/useCodeEditorStore.ts`
- [Execution proxy](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/api/execute/route.ts): `src/app/api/execute/route.ts`
- [Judge API](https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/server.js): `codevyaas-judge-api/src/server.js`
- [Docker runner](https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/dockerRunner.js): `codevyaas-judge-api/src/dockerRunner.js`
- [Language support](https://github.com/abhishek2006-create/codevyaas/blob/main/codevyaas-judge-api/src/languages.js): `codevyaas-judge-api/src/languages.js`
- [Results panel](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/_components/OutputPanel.tsx): `src/app/(root)/_components/OutputPanel.tsx`
- **Docker runtime**

### Project playground

- [Playground](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/%5Bid%5D/page.tsx): `src/app/(root)/playground/[id]/page.tsx`
- [Workspace client](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/components/playground-client.tsx): `src/app/(root)/playground/components/playground-client.tsx`
- [File explorer](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/hooks/useFileExplorer.tsx): `src/app/(root)/playground/hooks/useFileExplorer.tsx`
- [Container setup](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/webcontainers/hooks/useWebContainer.ts): `src/app/(root)/playground/webcontainers/hooks/useWebContainer.ts`
- [WebContainer service](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/(root)/playground/webcontainers/service/webContainerService.ts): `src/app/(root)/playground/webcontainers/service/webContainerService.ts`
- [Template endpoint](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/api/template/%5Btemplate%5D/route.ts): `src/app/api/template/[template]/route.ts`
- [Starter templates](https://github.com/abhishek2006-create/codevyaas/blob/main/src/templates/react/src/App.jsx): `src/templates/react/src/App.jsx`

### Snippets and profiles

- [Snippet data](https://github.com/abhishek2006-create/codevyaas/blob/main/convex/snippets.ts): `convex/snippets.ts`
- [Snippet pages](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/snippets/page.tsx): `src/app/snippets/page.tsx`
- [User profile](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/profile/page.tsx): `src/app/profile/page.tsx`
- [Convex schema](https://github.com/abhishek2006-create/codevyaas/blob/main/convex/schema.ts): `convex/schema.ts`

### Identity and plans

- [Clerk identity](https://github.com/abhishek2006-create/codevyaas/blob/main/src/components/providers/ConvexClientProvider.tsx): `src/components/providers/ConvexClientProvider.tsx`
- [User data](https://github.com/abhishek2006-create/codevyaas/blob/main/convex/users.ts): `convex/users.ts`
- [Pricing interface](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/pricing/page.tsx): `src/app/pricing/page.tsx`
- [Billing integration](https://github.com/abhishek2006-create/codevyaas/blob/main/convex/lemonSqueezy.ts): `convex/lemonSqueezy.ts`

### AI assistance

- [Debug assistant](https://github.com/abhishek2006-create/codevyaas/blob/main/src/app/api/chat/route.ts): `src/app/api/chat/route.ts`
- **Ollama model**

### Other components

- **Developer**

## Connections

- Developer → Code editor: writes code
- Code editor → Editor state: updates editor
- Editor state → Judge API: submits code
- Editor state → Results panel: updates results
- Code editor → Execution proxy: posts code
- Execution proxy → Judge API: forwards request
- Judge API → Docker runner: dispatches execution
- Docker runner → Language support: checks language
- Docker runner → Docker runtime: runs code
- Developer → Playground: opens workspace
- Playground → Workspace client: loads workspace
- Workspace client → File explorer: manages files
- Workspace client → Container setup: starts preview
- Container setup → WebContainer service: sets up container
- Developer → Template endpoint: requests template
- Template endpoint → Starter templates: loads starter
- Developer → Snippet pages: browses snippets
- Snippet pages → Snippet data: snippet operations
- Snippet data → Convex schema: uses schema
- Developer → User profile: views profile
- User profile → User data: user operations
- User data → Convex schema: uses schema
- Developer → Clerk identity: authenticates
- Developer → Pricing interface: views plans
- Pricing interface → Billing integration: initiates upgrade
- Developer → Debug assistant: requests debugging
- Debug assistant → Ollama model: sends context
