Problem Definition
Find a problem people will pay for.
Problem Definition, Business Models & The Vibe PRD
π― Lesson Overview
- What You're Going to Do: Learn how to identify real problems, choose a business model (B2B/B2C/SaaS), select your tech stack, and write a Cursor-ready Product Requirement Document (PRD).
- What You Will Learn: First-principles problem discovery, B2B vs B2C business models, Tech Stack Selection Matrix, and why PRDs are mandatory in Vibe Coding.
- Outcome & Importance: Prevents AI tools from hallucinating wrong architectures, unneeded dependencies, or useless features.
π 1. What is a Problem & How to Find One?
A great software product does not start with an idea for an app; it starts with a specific human suffering through a costly manual process.
Pain vs. Privilege (Hair-on-Fire vs. Vitamin)
VITAMIN (Nice-to-Have): "An AI that writes cute birthday poems." (Zero willingness to pay) HAIR-ON-FIRE (Must-Have): "A tool that converts 50 PDF vendor invoices into QuickBooks entries." (User pays $199/mo to save 20 hours/week)
The 3-Step Problem Discovery Framework:
- Identify the Bottleneck: Look for tasks people do in Excel, Google Docs, or manual copy-pasting for >5 hours every week.
- Verify Willingness to Pay: Are businesses already spending money on manual contractors, hiring interns, or buying clunky legacy tools?
- Target a Specific Persona: Never build for "everyone". Build for "Small Law Firms with 2-10 Lawyers handling real estate closings."
π 2. Why Do You Need a PRD in Vibe Coding?
In traditional development, a PRD is a document for human developers to read. In Vibe AI Engineering, your PRD is Prompt Zeroβthe foundational context fed into Cursor, Windsurf, or Antigravity.
Without a PRD: You type "Build me a resume app" into Cursor. Cursor creates 15 files, installs 20 random npm packages, uses an outdated API version, and forgets to add database storage.
With a PRD: Cursor reads your
docs/prd.mdsystem contract, follows your explicit tech stack, enforces your Pydantic schemas, and builds clean, bug-free production code on the first try.
πΌ 3. Business Models: B2B, B2C, D2C, SaaS & Micro-SaaS
Before selecting tools, you must define how your product creates and captures financial value:
| Model | Full Name | Target Buyer | Typical Pricing | Why Solo Vibe Coders Choose It |
|---|---|---|---|---|
| B2B | Business-to-Business | Companies, Finance Teams, Agencies | βΉ2,000 β βΉ50,000/mo (500/mo) | Recommended: High willingness to pay; clear ROI; low customer churn. |
| B2C | Business-to-Consumer | Individual Consumers, Students | βΉ99 β βΉ499/mo (15/mo) | Hard for solo builders: Needs high viral volume; high customer churn. |
| D2C | Direct-to-Consumer | Physical Brand Shoppers | Per-item sale | E-commerce focused; inventory & shipping logistics required. |
| SaaS | Software as a Service | Recurring Subscribers | Monthly/Annual Subscription | Predictable recurring revenue (MRR). |
| Micro-SaaS | Niche Single-Feature SaaS | Specialized Professionals | βΉ499 β βΉ2,499/mo | Perfect for Vibe Coding: 1 sharp feature, 1 target audience, built in 1 week. |
| PaaS | Platform as a Service | Developers / Enterprises | Usage-based | Complex infrastructure (e.g., Supabase, Vercel, Twilio). |
| Marketplace | Two-Sided Platform | Buyers & Sellers | Transaction Fee (10-20%) | High complexity (chicken-and-egg problem) but highly scalable once established. (e.g. Uber, Airbnb) |
| B2B2C | Business to Business to Consumer | Intermediaries & End Users | License + Revenue Share | You sell to a business, who then offers it to their consumers. (e.g. Affirm, Instacart) |
| Open Source (Commercial) | Open Core | Enterprise IT, Developers | Free Core / Paid Enterprise | Build trust via free community edition, charge for premium security/hosting features. |
βοΈ 4. Tech Stack Selection Matrix
How do you choose your frontend, backend, database, and cloud provider? Use this decision tree:
βββββββββββββββββββββββββββββββββββββββββββ β What is the core nature of your AI app? β ββββββββββββββββββββββ¬βββββββββββββββββββββ β ββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ βΌ βΌ [Heavy Data / RAG / Python AI] [Rapid Web UI / Dashboard] - Frontend: Next.js (TypeScript) - Frontend: Lovable / Vite + React - Backend: FastAPI (Python 3.11) - Backend: Next.js API Routes / Node.js - Database: Supabase Postgres + pgvector - Database: Supabase / SQLite - Hosting: Railway / Render (Backend) + Vercel (FE) - Hosting: Vercel / Netlify
1. Languages
- TypeScript (TS): Strongly Recommended. Catches 80% of bugs before you even run the code. Mandatory for AI coding because LLMs generate better code when types are explicit.
- JavaScript (JS): Easier for absolute beginners, but harder to scale and refactor. AI might hallucinate variable structures.
2. Frontend Frameworks
- Next.js: Industry standard for full-stack React. Best for SEO, Server-Side Rendering (SSR), and production apps. Use this 90% of the time.
- React (Vite): Best for single-page applications (SPAs) or internal dashboards where SEO doesn't matter. Extremely fast local development.
- Angular: Enterprise-heavy, opinionated framework. Steeper learning curve, usually overkill for solo Vibe Coders unless you already know it.
- Remix: Great alternative to Next.js focusing on web standards and nested routing. Excellent data loading patterns.
3. Backend & API
- FastAPI (Python): Best for AI apps. Native Pydantic support makes connecting LLMs and vector databases incredibly easy.
- Node.js (Express/NestJS): Perfect if you want to write everything in one language (TypeScript/JavaScript). Great for WebSockets and I/O heavy apps.
- Java Spring Boot / C# .NET: Heavy enterprise backends. Excellent for banking, insurance, and large corporate systems, but too slow for agile solo MVP development.
- API Paradigms:
- REST API: Standard, easy to cache, stateless. Use for 95% of standard CRUD apps.
- GraphQL: Best when the frontend needs to fetch complex, deeply nested relational data without over-fetching.
- WebSockets: Mandatory for real-time features (chat apps, live AI typing streams, multiplayer dashboards).
4. Database Layer (SQL vs NoSQL)
- SQL (PostgreSQL): The gold standard. Strict schema, relational data. Use PostgreSQL (via Supabase) for 99% of apps. Supports vector search (
pgvector) for AI. - NoSQL (MongoDB): Schema-less documents. Best for unstructured data (e.g., scraping raw JSON, varied catalogs) where the data shape constantly changes.
5. Cloud & Hosting
- Vercel: Free hosting for frontend (Next.js/React). Zero configuration, automatic previews on GitHub push.
- AWS / Azure / GCP: The "Big 3" enterprise clouds. Extremely powerful but complex. AWS is standard, Azure is great for enterprise/C#, GCP is excellent for ML/Data. Avoid for early MVPs due to configuration overhead.
π 5. Understanding the PRD & Standardized Cursor-Ready Template (docs/prd.md)
What exactly is in a PRD?
A Product Requirement Document is the blueprint of your software. Without it, you are asking AI to build a house without giving it a floor plan. An end-to-end PRD MUST contain:
- Executive Summary: What is it, who is it for, and what is the business model?
- Success Metrics: How do we know the app works? (e.g., "Generates a response in <3s").
- Tech Stack Contract: Explicitly telling AI which languages and frameworks to use (e.g., "Use Next.js App Router, NOT Pages Router").
- Data Schemas: Exact Pydantic/TypeScript interfaces defining how data moves between the frontend and backend.
- System Boundaries: What shouldn't the app do? Security guardrails.
Save the template below into docs/prd.md in your repository root:
## Product Requirement Document (PRD): [Project Name] ## 1. Executive Summary & Business Model - **Product Name**: [e.g. Career Copilot] - **Target Audience**: [e.g. Job Applicants applying for Tech Roles] - **Business Model**: B2B / B2C Micro-SaaS - **Target Subscription Price**: βΉ499 / month ($9.99/mo) ## 2. Core Problem & Success Metric - **Problem Statement**: Candidates spend 2+ hours manually editing resumes for each job posting. - **Measurable Outcome**: Produce a tailored, truthful application plan in under 10 minutes. ## 3. Technical Stack Contract - **Frontend**: Next.js (App Router), TypeScript, TailwindCSS, Lucide Icons - **Backend**: Python 3.11, FastAPI, Async Pydantic v2 - **Database**: Supabase PostgreSQL + `pgvector` - **LLM Engine**: OpenAI `gpt-4o-mini` (Fast Path) & Anthropic `claude-3-5-sonnet` (Analysis Path) - **Deployment**: Vercel (Frontend) + Railway (Backend API) ## 4. Core Input/Output Pydantic Schemas ```python from pydantic import BaseModel, Field class JobAnalysisRequest(BaseModel): user_id: str = Field(..., description="Unique user ID") resume_text: str = Field(..., description="Raw extracted text of resume") job_description: str = Field(..., description="Target job description") class JobAnalysisResponse(BaseModel): match_score: int = Field(..., ge=0, le=100) missing_keywords: list[str] tailored_bullet_points: list[str] estimated_reading_time_min: float
5. System Boundaries & Guardrails
- MUST NOT allow API keys to be exposed in frontend code or client network requests.
- MUST sanitize all user inputs and strip PII before transmitting data to external LLM providers.
- Response latency MUST be under 3 seconds for initial resume analysis.
--- ## π‘ Key Takeaway > A well-structured PRD is 80% of Vibe AI Engineering. When your PRD specifies tech stack, business model, and Pydantic schemas, AI coding IDEs can scaffold production-grade code in minutes without confusion.
Finished this lesson?
Mark it complete to advance your curriculum progress.