I Make $60K/Month with 4 Apps

0) One-time setup prompt (sets the vibe + rules)

Paste this first in Cursor Chat:

You are my senior full-stack engineer. We’re building a production-ready MVP fast (2 weeks vibe). 
Tech: Next.js (App Router) + TypeScript + React + Tailwind. Use server actions where sensible.
Priorities: (1) working end-to-end MVP, (2) clean architecture, (3) security & privacy basics, (4) simple UX.

Build iteratively: each step should include:
- Files to create/edit (with full code)
- How to run locally
- A quick manual test checklist

If you’re unsure, make a reasonable assumption and proceed.

1) Define the MVP spec (so Cursor stops guessing)

Create a concise PRD for an MVP “Real-time Interview Copilot”.
Core flow:
1) user signs up / logs in
2) user buys credits (no subscription)
3) user starts a “Session”
4) web app captures mic audio, streams to transcription provider, shows live transcript
5) user selects an “Interview Mode” (behavioral / system design / coding / sales etc.)
6) app shows AI-generated suggested answers in real time based on transcript + mode + user resume/role
7) session ends, transcript + AI suggestions saved, credits deducted by minutes

Include non-goals, data model, and acceptance criteria.
Then propose an implementation plan in 10 milestones.

2) Scaffold the repo

Initialize the Next.js app (App Router) with TypeScript + Tailwind.
Add ESLint, Prettier, and a basic layout with:
- landing page
- auth pages
- dashboard (protected)
- session page (protected)
Return exact commands + file tree + code.

3) Add authentication (pick one and implement)

Option A (fast): Clerk. Option B: NextAuth + Postgres.
Prompt (Clerk example):

Implement auth using Clerk.
Requirements:
- protected routes: /dashboard, /session/*
- user menu + sign out
- middleware protection
Update the UI to show “Start Session” and “Buy Credits” buttons when logged in.
Provide all code changes.

4) Add database + schema

Add Postgres + Prisma.
Design schema for:
- User (or map to auth provider userId)
- CreditBalance
- CreditTransaction (purchase, usage, adjustment)
- Session (status, startedAt, endedAt, mode, role, company, notes)
- TranscriptChunk (sessionId, ts, speaker?, text)
- AISuggestion (sessionId, ts, content, type)

Create migrations and seed script.

5) Implement “credits” billing (no subscription)

(Transcript mentions credit-based monetization + “no subscription” banner vibe.)

Implement credit-based billing:
- Define “1 credit = 1 minute” (round up per minute)
- Add pricing packages (e.g., 30, 60, 120 credits)
- Use Stripe Checkout for one-time payments
- Webhook to confirm payment and create CreditTransaction + update balance
- Dashboard shows current credits + transaction history
Include a simple “Buy Credits” page and success/cancel pages.

6) Build the session UX (without real-time yet)

Create the Session setup UI:
- mode dropdown (Behavioral, System Design, Coding, Leadership, Sales)
- role text input (e.g., “Frontend Engineer”)
- company input (optional)
- “paste job description” textarea (optional)
- “paste resume / brag doc” textarea (optional)
- Start Session button -> creates Session row, navigates to /session/[id]

On /session/[id], show:
- live transcript panel (empty for now)
- AI suggestions panel (empty for now)
- timer + credit burn indicator
- End Session button
Wire up create/end session with server actions and Prisma.

7) Real-time audio capture in browser (Web Audio)

Implement browser mic capture on /session/[id]:
- Ask for permission
- Show mic level meter
- Start/Stop mic
- Capture audio in chunks suitable for streaming to a transcription API
Keep all audio processing client-side; only send chunks to our backend route for streaming.
Add careful cleanup on unmount.

8) Streaming transcription integration (Speechmatics-style)

(Transcript explicitly mentions Speechmatics for transcription.)
If you don’t have Speechmatics keys, you can ask Cursor to build an adapter + a mock provider first.

Implement a transcription provider adapter layer:
- interface TranscriptionProvider { startSession(); sendAudioChunk(); onTranscript(callback); stop(); }
Add a SpeechmaticsProvider implementation (websocket streaming).
Also add a MockProvider that emits fake transcript for local dev.

On the server:
- create /api/transcribe that upgrades to websocket (or use Next.js route + ws server) to relay audio to provider
- broadcast transcript chunks back to client in real time
Persist TranscriptChunk rows as they arrive (throttle writes).

On the client:
- display partial + final transcript nicely with timestamps.
Provide full code.

9) Real-time AI suggestions (OpenAI) with “mode prompts”

(Transcript says they used ChatGPT for answers.)

Implement AI suggestions in near real-time:
- Every time transcript grows by ~N characters or every ~10s, generate new suggestions
- Use OpenAI Responses API (or Chat Completions) server-side only
- Input = recent transcript window + mode + role + company + job description + resume
- Output types:
  1) “Suggested Answer” (what to say next)
  2) “Follow-up Question” (what interviewer might ask)
  3) “Key Points” (bullets)

Prevent spamming: debounce + concurrency lock per session.
Store AISuggestion rows, stream results back to client.
Include prompt templates per mode in a dedicated file.

10) Credit metering + enforcement

Add credit metering:
- Start a timer when mic starts
- Deduct credits per minute (rounded up)
- Hard stop when credits run out (end session + disable mic)
- Create usage CreditTransaction entries
Make this authoritative server-side (don’t trust client timer).
Add a server “heartbeat” every 15s that validates session + credits.

11) Polish: landing page + “no subscription” positioning

Create a clean landing page that clearly explains:
- Real-time transcription
- AI suggestions during interviews
- Credit-based, no subscription
- Privacy note (what we store, what we don’t)
Add pricing section + CTA buttons.
Keep it minimal and modern.

12) Privacy + security basics

Add privacy & security improvements:
- Don’t log raw audio; only transcript text (configurable)
- Encrypt sensitive fields at rest (job description/resume) or provide “do not store” toggle
- Rate limiting on AI endpoints
- Basic abuse prevention (max session length, max tokens)
- Add Terms & Privacy pages

13) Deployment (Vercel + Postgres + Stripe + envs)

Prepare for deployment on Vercel:
- environment variables checklist
- webhook config
- database provisioning steps
- production build fixes
- observability: simple error logging (Sentry optional)
Provide a deployment runbook.