# csyqlz/vozeb-pro architecture

> Architecture diagram of the GitHub repository csyqlz/vozeb-pro, 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/csyqlz/vozeb-pro
- Repository: https://github.com/csyqlz/vozeb-pro

## Overview

VOZEB PRO is a Next.js AI-creation platform combining a unified Agent, collaborative-style Canvas workflows, short-drama production, publishing, and commercial administration. The principal user flow runs from a creation request through model selection, persistent generation, media results, and reuse in a session. Canvas and drama provide distinct production branches; published works and billing are separate user journeys. PostgreSQL and configurable media storage underpin the application. Major feature links are documented in the README; source excerpts provide more specific evidence for image-task scheduling and settings persistence.

Main entry points: [`web/src/app/(user)/drama/[id]/page.tsx`](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/drama/%5Bid%5D/page.tsx) (Drama production), [`web/src/app/api/image-tasks/route.ts`](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/image-tasks/route.ts) (Generation tasks), [`web/src/app/(user)/create/page.tsx`](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/create/page.tsx) (Creation Agent), [`web/scripts/generation-worker.mjs`](https://github.com/csyqlz/vozeb-pro/blob/main/web/scripts/generation-worker.mjs) (Generation worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creation["AI creation"]
  node_create_ui["Creation Agent<br/>[page.tsx]"]
  node_generation_api["Generation tasks<br/>[route.ts]"]
  node_task_support["Model routing"]
  node_task_worker["Generation worker"]
  node_provider{{"AI providers"}}
end

subgraph group_production["Production workspaces"]
  node_canvas["Canvas workspace"]
  node_canvas_agent["Canvas Agent runs<br/>[route.ts]"]
  node_drama["Drama production<br/>[page.tsx]"]
  node_drama_analysis["Script analysis<br/>[route.ts]"]
  node_drama_render["Drama rendering<br/>[route.ts]"]
end

subgraph group_platform["Platform services"]
  node_media["Generated media"]
  node_postgres[("PostgreSQL")]
  node_auth_settings["Account and settings"]
  node_media_storage["Media storage"]
  node_s3[("S3-compatible storage")]
end

subgraph group_commerce["Business operations"]
  node_billing["Billing and checkout<br/>[route.ts]"]
  node_admin["Operations admin<br/>[page.tsx]"]
end

subgraph group_publishing["Publishing and community"]
  node_works["Works publishing<br/>[route.ts]"]
  node_gallery["Public gallery<br/>[page.tsx]"]
end

node_user(("Creator"))

node_user -->|"creates with"| node_create_ui
node_create_ui -->|"submits task"| node_generation_api
node_generation_api -->|"resolves config"| node_task_support
node_generation_api -->|"schedules task"| node_task_worker
node_task_worker -.->|"runs generation"| node_provider
node_task_worker -.->|"stores results"| node_media
node_create_ui -->|"continues in"| node_canvas
node_user -->|"edits canvas"| node_canvas
node_canvas -->|"starts run"| node_canvas_agent
node_canvas_agent -->|"creates subtasks"| node_generation_api
node_user -->|"builds drama"| node_drama
node_drama -->|"analyzes script"| node_drama_analysis
node_drama -->|"renders production"| node_drama_render
node_drama_render -.->|"generates media"| node_provider
node_drama -.->|"uses assets"| node_media
node_auth_settings -->|"persists settings"| node_postgres
node_media_storage -.->|"stores objects"| node_s3
node_media_storage -.->|"tracks media"| node_postgres
node_user -->|"purchases credits"| node_billing
node_admin -->|"configures models"| node_auth_settings
node_user -->|"publishes work"| node_works
node_works -->|"appears in"| node_gallery

click node_create_ui "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/create/page.tsx"
click node_generation_api "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/image-tasks/route.ts"
click node_task_support "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/image-tasks/image-task-support.ts"
click node_task_worker "https://github.com/csyqlz/vozeb-pro/blob/main/web/scripts/generation-worker.mjs"
click node_media "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/services/server-media-storage.ts"
click node_canvas "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/canvas/%5Bid%5D/canvas-client-page.tsx"
click node_canvas_agent "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/agent/runs/route.ts"
click node_drama "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/drama/%5Bid%5D/page.tsx"
click node_drama_analysis "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/drama/analyze/route.ts"
click node_drama_render "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/drama/render/route.ts"
click node_auth_settings "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/lib/auth/postgres-auth-settings-service.ts"
click node_media_storage "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/lib/server/object-storage-service.ts"
click node_billing "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/billing/orders/route.ts"
click node_admin "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/admin/page.tsx"
click node_works "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/works/route.ts"
click node_gallery "https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/gallery/page.tsx"

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_create_ui,node_generation_api,node_task_support,node_task_worker,node_provider toneBlue
class node_canvas,node_canvas_agent,node_drama,node_drama_analysis,node_drama_render toneAmber
class node_media,node_postgres,node_auth_settings,node_media_storage,node_s3 toneMint
class node_billing,node_admin toneRose
class node_works,node_gallery,node_user toneIndigo
```

## Components

### AI creation

- [Creation Agent](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/create/page.tsx): `web/src/app/(user)/create/page.tsx`
- [Generation tasks](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/image-tasks/route.ts): `web/src/app/api/image-tasks/route.ts`
- [Model routing](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/image-tasks/image-task-support.ts): `web/src/app/api/image-tasks/image-task-support.ts`
- [Generation worker](https://github.com/csyqlz/vozeb-pro/blob/main/web/scripts/generation-worker.mjs): `web/scripts/generation-worker.mjs`
- **AI providers**

### Production workspaces

- [Canvas workspace](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/canvas/%5Bid%5D/canvas-client-page.tsx): `web/src/app/(user)/canvas/[id]/canvas-client-page.tsx`
- [Canvas Agent runs](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/agent/runs/route.ts): `web/src/app/api/agent/runs/route.ts`
- [Drama production](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/(user)/drama/%5Bid%5D/page.tsx): `web/src/app/(user)/drama/[id]/page.tsx`
- [Script analysis](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/drama/analyze/route.ts): `web/src/app/api/drama/analyze/route.ts`
- [Drama rendering](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/drama/render/route.ts): `web/src/app/api/drama/render/route.ts`

### Platform services

- [Generated media](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/services/server-media-storage.ts): `web/src/services/server-media-storage.ts`
- **PostgreSQL**
- [Account and settings](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/lib/auth/postgres-auth-settings-service.ts): `web/src/lib/auth/postgres-auth-settings-service.ts`
- [Media storage](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/lib/server/object-storage-service.ts): `web/src/lib/server/object-storage-service.ts`
- **S3-compatible storage**

### Business operations

- [Billing and checkout](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/billing/orders/route.ts): `web/src/app/api/billing/orders/route.ts`
- [Operations admin](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/admin/page.tsx): `web/src/app/admin/page.tsx`

### Publishing and community

- [Works publishing](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/api/works/route.ts): `web/src/app/api/works/route.ts`
- [Public gallery](https://github.com/csyqlz/vozeb-pro/blob/main/web/src/app/gallery/page.tsx): `web/src/app/gallery/page.tsx`

### Other components

- **Creator**

## Connections

- Creator → Creation Agent: creates with
- Creation Agent → Generation tasks: submits task
- Generation tasks → Model routing: resolves config (evidence: `web/src/app/api/image-tasks/route.ts`)
- Generation tasks → Generation worker: schedules task (evidence: `web/src/app/api/image-tasks/route.ts`)
- Generation worker → AI providers: runs generation
- Generation worker → Generated media: stores results
- Creation Agent → Canvas workspace: continues in
- Creator → Canvas workspace: edits canvas
- Canvas workspace → Canvas Agent runs: starts run
- Canvas Agent runs → Generation tasks: creates subtasks
- Creator → Drama production: builds drama
- Drama production → Script analysis: analyzes script
- Drama production → Drama rendering: renders production
- Drama rendering → AI providers: generates media
- Drama production → Generated media: uses assets
- Account and settings → PostgreSQL: persists settings (evidence: `web/src/lib/auth/postgres-auth-settings-service.ts`)
- Media storage → S3-compatible storage: stores objects
- Media storage → PostgreSQL: tracks media
- Creator → Billing and checkout: purchases credits
- Operations admin → Account and settings: configures models
- Creator → Works publishing: publishes work
- Works publishing → Public gallery: appears in
