How sounak-ghosh03/ai-vibe-code-editor works
Vibecode is a browser-based AI web IDE. A user signs in, creates or selects a starter project, edits its files, requests AI assistance, and runs the project in an in-browser WebContainer with a terminal and preview. The graph preserves the documented template, auth, editing, AI, and execution capabilities; several links are based on README descriptions because their implementation was not sampled.
Main entry points: [id]/page.tsx Playground Page · webcontainer-preview.tsx Run & Preview · path-to-json.ts Template File Tree · dashboard/page.tsx Project Dashboard
Components 21
Identity & Projects
- Sign-in UI
features/auth/components/sign-in-form.tsx - NextAuth
auth.ts - Project Dashboard
app/dashboard/page.tsx - Project Actions
features/dashboard/actions/index.ts - Project Manager
features/dashboard/components/project-table.tsx - Template Picker
components/modal/template-selector-modal.tsx - Starter Projects
vibecode-starters
Playground Authoring
- Template API
app/api/template/[id]/route.ts - Template File Tree
features/playground/lib/path-to-json.ts - Playground Page
app/playground/[id]/page.tsx - Playground State
features/playground/hooks/usePlayground.tsx - File Explorer
features/playground/hooks/useFileExplorer.tsx - Monaco Editor
features/playground/components/playground-editor.tsx - AI Completion API
app/api/code-completion/route.ts - AI Suggestions
features/playground/hooks/useAISuggestion.tsx
Browser Runtime
- WebContainer Hook
features/webcontainers/hooks/useWebContainers.ts - Run & Preview
features/webcontainers/components/webcontainer-preview.tsx - Embedded Terminal
features/webcontainers/components/terminal.tsx
Shared Services
- MongoDB
lib/db.ts
Other components
- Developer
- Ollama LLM
Connections 25
- Developer → Sign-in UI: signs in
README.md - Sign-in UI → NextAuth: starts OAuth
features/auth/components/sign-in-form.tsx - Developer → Project Dashboard: opens projects
- Project Dashboard → Project Actions: loads projects
app/dashboard/page.tsx - Project Dashboard → Project Manager: renders projects
app/dashboard/page.tsx - Project Actions → MongoDB: reads and writes
features/dashboard/actions/index.ts - Developer → Template Picker: chooses starter
- Template Picker → Starter Projects: selects template
README.md - Developer → Playground Page: opens workspace
- Playground Page → Playground State: loads state
app/playground/[id]/page.tsx - Playground State → Template File Tree: uses file tree
features/playground/hooks/usePlayground.tsx - Playground Page → File Explorer: uses explorer
app/playground/[id]/page.tsx - File Explorer → Template File Tree: uses file tree
features/playground/hooks/useFileExplorer.tsx - Playground Page → Monaco Editor: renders editor
app/playground/[id]/page.tsx - Playground Page → Template API: requests template
- Template API → MongoDB: loads playground
app/api/template/[id]/route.ts - Template API → Template File Tree: converts files
app/api/template/[id]/route.ts - Monaco Editor → AI Suggestions: requests assistance
README.md - AI Suggestions → AI Completion API: requests completion
- AI Completion API → Ollama LLM: queries model
README.md - Playground Page → WebContainer Hook: boots runtime
app/playground/[id]/page.tsx - Playground Page → Run & Preview: renders runtime
app/playground/[id]/page.tsx - Run & Preview → Embedded Terminal: renders terminal
features/webcontainers/components/webcontainer-preview.tsx - Run & Preview → Template File Tree: transforms files
features/webcontainers/components/webcontainer-preview.tsx - Run & Preview → Ollama LLM: runs project