How wasp-lang/vibe-coding-video works
Project type and purpose
• This is a full-stack web application (“Vibe Coding Budget App”) built with Wasp (a DSL that wires together React, Node.js, and Prisma/PostgreSQL).
• Purpose: a collaborative, envelope-style budgeting tool with user auth, transactions, and team features.
File structure
• Top level:
• main.wasp – the Wasp DSL entrypoint defining pages, routes, operations (queries/actions), auth
• schema.prisma & migrations/… – database schema and migration history (PostgreSQL via Prisma)
• src/ – custom client & server code
• src/features/ – feature-based vertical slices (auth, tasks, users, chats, dashboard, settings)
• src/components/ – shared UI components (Shadcn/ui + custom)
• src/config, src/context, src/hooks – global config (fonts, queries, server), React contexts, utility hooks
• Build and deploy scripts: package.json, vite.config.ts, tailwind.config.cjs, .env, Wasp CLI commands.
Extract architectural insights from README
• Wasp orchestrates boilerplate for auth, DB, build, and runtime.
• Workflow follows vertical-slice incremental delivery (PRD → plan → schema → operations → server logic → UI → test → docs).
• UI uses Shadcn-admin components on top of Tailwind/Vite/React.
• Database powered by Prisma, migrations driven by Wasp.
Main components & their interactions
a. Frontend (React + Vite + TypeScript + Shadcn/UI + Tailwind)
b. Backend (Node.js server generated by Wasp, with custom logic in src/features/*)
c. Wasp DSL engine (main.wasp) – compiles & wires up frontend, backend, Prisma
d. Prisma ORM – maps JS/TS calls to PostgreSQL queries
e. PostgreSQL database (running in Docker or local)
f. Auxiliary dev tools – Wasp CLI (db start, migrate, start), migrations folder
g. External/dev-time AI tools (Cursor, Gemini) – not in runtime but part of the developer workflow
Data‐flow:
• User → React UI pages/components
• UI → calls Wasp‐generated GraphQL/REST operations (defined in main.wasp) over HTTP
• Backend handlers → use Prisma client to read/write Postgres
• Backend → returns results → UI updates
• Wasp CLI/migrations → manage DB schema lifecycle
Architectural patterns & design principles
• Vertical-slice feature organization (each feature folder contains UI, data, context)
• Clear separation of concerns: UI components vs. feature pages vs. server logic vs. data models
• Declarative DSL (Wasp) to automate integration: reduces boilerplate and enforces conventions
• Stateless frontend, stateless server functions (operations), stateful Postgres DB
• Context providers (theme, font, search) for cross-cutting concerns
Elements
• UI → Server operations → DB → Server → UI
• Wasp CLI → migrations → DB
• Wasp DSL → generates Server & Client code
• Backend in another (e.g., green)