How vivekkumar080404/vibecodeeditor works
This repository is a web-based coding playground: users sign in, reach a project dashboard, open a playground, edit template files, and run a preview in a browser-based WebContainer with a terminal. The graph keeps project management, authentication, editing, and execution distinct, with persistence and template loading as supporting layers. The starter collection is represented because it is a substantial product asset. Some connections are limited to the shown excerpts and source-index references; unsampled implementations are not assumed to have inspected behavior.
Main entry points: [id]/page.tsx Playground page · webcontainer-preview.tsx Preview and setup · route.ts Template API · dashboard/page.tsx Project dashboard
Components 20
Identity
- Sign-in UI
features/auth/components/signin-form-client.tsx - Auth service
auth.ts - Auth endpoint
app/api/auth/[...nextauth]/route.ts
Projects
- Project dashboard
app/dashboard/page.tsx - Project actions
features/dashboard/actions/index.ts - Project table
features/dashboard/components/project-table.tsx - Template picker
features/dashboard/components/template-selection-modal.tsx
Code Editing
- Playground page
app/playground/[id]/page.tsx - File explorer state
features/playground/components/actions/hooks/useFileExplorer.tsx - Template file tree
features/playground/components/actions/template-file-tree.tsx - Code editor
features/playground/components/actions/playground-editor.tsx - Playground data hook
features/playground/components/actions/hooks/usePlayground.tsx
Execution Runtime
- WebContainer hook
features/webContainers/hooks/useWebContainer.ts - Preview and setup
features/webContainers/components/webcontainer-preview.tsx - Terminal
features/webContainers/components/terminal.tsx
Templates and Data
- Template API
app/api/template/[id]/route.ts - Template JSON conversion
features/playground/libs/path-to-json.ts - Starter templates
vibecode-starters - Application database
lib/db.ts
Other components
- User
Connections 22
- User → Sign-in UI: signs in
features/auth/components/signin-form-client.tsx - Sign-in UI → Auth service: authenticates with
features/auth/components/signin-form-client.tsx - User → Project dashboard: opens
- Project dashboard → Project actions: loads projects
app/dashboard/page.tsx - Project dashboard → Project table: renders
app/dashboard/page.tsx - Project actions → Application database: queries
features/dashboard/actions/index.ts - Project table → Template picker: offers template selection
- User → Playground page: opens project
- Playground page → Playground data hook: loads project data
app/playground/[id]/page.tsx - Playground page → File explorer state: manages open files
app/playground/[id]/page.tsx - Playground page → Template file tree: renders files
app/playground/[id]/page.tsx - Playground page → Code editor: renders active editor
app/playground/[id]/page.tsx - Playground page → WebContainer hook: boots runtime
app/playground/[id]/page.tsx - Playground page → Preview and setup: renders preview
app/playground/[id]/page.tsx - File explorer state → Playground data hook: saves template data
features/playground/components/actions/hooks/useFileExplorer.tsx - Playground data hook → Template JSON conversion: loads template structure
features/playground/components/actions/hooks/usePlayground.tsx - Template API → Application database: reads playground
app/api/template/[id]/route.ts - Template API → Template JSON conversion: converts template structure
app/api/template/[id]/route.ts - Template API → Starter templates: reads template files
- WebContainer hook → Preview and setup: provides runtime instance
- Preview and setup → Terminal: streams process output
features/webContainers/components/webcontainer-preview.tsx - Preview and setup → Starter templates: mounts project files