Raw Beats documentation
Technical guide for the application stack, REST API, product features, SEO, testing, and development tools. Use the sidebar to browse sections — each group has its own submenu.
Architecture
Raw Beats is a full-stack beat marketplace. The Nuxt 3 frontend lives at the repo root; the Express API runs from api/. On Vercel, both deploy as a single project via Vercel Services (web + api). Data is stored in PostgreSQL (Neon) through Prisma. Media files use Cloudflare R2 in production.
Browser (Vue 3 + Pinia)
↓ useApi / $fetch → /api/*
Express API (api/src/index.ts)
↓ Prisma Client
PostgreSQL (Neon)
↓ R2 / local storage
Audio & cover assets (/audio, /storage)
Nitro (server/routes/) — health, robots.txt, sitemap.xmlDocumentation sections
Stack → Frontend
Nuxt, Vue, Tailwind, Pinia, composables
Stack → Backend
Express routes, JWT auth, Socket.IO
Stack → Database
Prisma models, migrations, Neon
Stack → Deployment
Vercel Services, env vars, R2, DEPLOY.md
Stack → SEO
Meta tags, sitemap, robots, JSON-LD
API
Full REST endpoint reference
Features
Marketplace, dashboard, purchases, messaging
Dev → Storybook
Isolated UI components, port 6006
Dev → Testing
Vitest, Playwright, coverage layers
Repo structure
pages/— file-based routes (public, auth, dashboard, docs)components/— reusable UI (beats, dashboard,components/ui/,components/docs/)composables/— shared client logic (auth, API, audio,useSeo)utils/— pure helpers (seo.ts,slugify.ts,docsNav.ts)stores/— Pinia stores (messages)api/src/routes/— Express REST handlersapi/prisma/— schema and migrationsserver/routes/— Nitro routes (health, robots, sitemap)tests/— Vitest unit/API/component tests and Playwright e2e.storybook/— Storybook 8 config.cursor/rules/— agent rules (SEO, testing, Storybook)
Useful commands
npm run dev # Nuxt dev server (port 3000)
npm run api:dev # Express API (port 4000)
npm run dev:full # Both in parallel
npm run storybook # Storybook (port 6006)
npm test # Vitest (unit + API + components)
npm run test:e2e # Playwright smoke (builds first)
npm run test:all # Vitest + Playwright
npm run db:push # Prisma schema push (root prisma/)
cd api && npx prisma db push # API schema push