Building the MVP with AI (Week 2)
This is the week you build your product. Not a mockup. Not a prototype. A working product that users can sign up for, experience value, and pay.
One week sounds aggressive. It is. But with AI coding assistants, you are not writing every line from scratch. You are directing an AI that writes 80% of the code while you focus on the 20% that requires human judgment: what to build, how the user experience should feel, and where the product's boundaries should be.
The MVP Mindset
An MVP (Minimum Viable Product) is not a bad product. It is a focused product. The difference is critical.
A bad product has broken features, crashes, and frustrates users. An MVP has a small number of features that work perfectly. Your MVP should do one thing exceptionally well and nothing else.
The MVP test: Can you describe what your product does in one sentence without using the word "and"? If not, you are building too much.
Good MVP scopes:
- "Track which AI search engines cite your brand" (not "Track AI citations AND manage content AND schedule social posts AND analyze competitors")
- "Auto-generate SOC 2 compliance documents from your codebase" (not "Complete compliance platform for all frameworks")
- "Record meetings and extract action items automatically" (not "Full meeting management suite with scheduling, recording, transcription, and project management")
The most common MVP mistake: building features instead of solving the core problem. If your product's core value is AI citation tracking, spend 90% of your week making that tracking accurate and useful. Do not spend time on a beautiful settings page, an elaborate onboarding flow, or integration with 15 third-party tools. Those can come later. The core value cannot.
Your MVP Feature List
Before you start coding, write a feature list with three tiers:
Must Have (build this week):
- The core value proposition feature
- User authentication (sign up, log in, log out)
- A way to display the core value to the user (dashboard, report, or output)
- Stripe payment integration (users need to be able to pay)
- Basic error handling (the product should not crash)
Nice to Have (build in weeks 3-4 if there is time):
- Email notifications
- Settings and customization
- Integrations with one or two third-party tools
- Data export
- Basic analytics/usage tracking
Build Later (after first 10 paying customers):
- Team features (multiple users per account)
- API access
- Advanced analytics
- Integrations marketplace
- Mobile app
- SSO / enterprise features
Print your "Must Have" list and cross off one item. Whatever seems least essential, remove it. Now you have a realistic week-2 scope. This sounds extreme, but it works. Scope creep is the number one reason MVPs take months instead of weeks.
The AI-Powered Build Process
Day 1 of Week 2: The Spec Document
Do not open your code editor yet. Spend the first morning writing a detailed specification document. This document is the most important thing you write all week because it determines the quality of every AI-generated code output.
# Product Specification: [Your Product Name]
## Overview
[2-3 paragraphs describing the product,
who it is for, and what problem it solves]
## User Journey
1. User visits the website
2. User signs up (email + password, or Google OAuth)
3. User sees an onboarding screen that asks [setup questions]
4. User provides [input data]
5. Product processes [input] and generates [output]
6. User views [output] on their dashboard
7. User can [key actions] on the dashboard
8. Free trial: [X days or X usage limit]
9. Payment: Stripe checkout for [tier details]
## Data Model
[Describe the core entities and their relationships]
Example:
- User: email, name, plan, stripe_customer_id, created_at
- Project: name, user_id, settings, created_at
- Report: project_id, data, generated_at, status
## API Endpoints
[List the essential API routes]
Example:
- POST /auth/signup
- POST /auth/login
- GET /dashboard
- POST /projects
- GET /projects/:id/reports
- POST /billing/checkout
- POST /billing/webhook
## Tech Stack
- Frontend: [React / Next.js / Astro]
- Backend: [Cloudflare Workers / Node.js / Supabase Edge Functions]
- Database: [Supabase Postgres / Cloudflare D1 / PlanetScale]
- Auth: [Supabase Auth / Clerk / custom]
- Payments: [Stripe]
- Hosting: [Cloudflare Pages + Workers / Vercel / Railway]
## UI/UX Requirements
- Clean, minimal design
- Dashboard as the primary interface
- Mobile-responsive
- Dark mode support (optional)
- Loading states for async operations
- Error states with helpful messages
Day 1 Afternoon: Scaffold the Project
Feed your spec to Claude Code:
Build the foundation for this SaaS product based on
the spec below. Generate:
1. Complete project structure with all directories
2. Database schema (migrations)
3. Authentication system (signup, login, logout,
session management)
4. Basic dashboard layout
5. Stripe integration skeleton
6. Environment variable configuration
Use [your chosen tech stack]. Make it production-ready.
Do not use placeholder or mock data for core logic.
[paste your spec]
Review what the AI generates. Check:
- Does the project structure make sense?
- Are the database tables correct?
- Does the auth flow work end-to-end?
- Are environment variables properly handled?
Fix issues by asking the AI specific questions:
The auth flow is not redirecting after login.
The login function completes but the user stays
on the login page. Fix this and explain what was wrong.
Days 2-3: Core Feature
This is where you spend the bulk of your time. The core feature is whatever your product uniquely offers.
Workflow:
- Describe the feature in plain language to Claude Code
- Review the generated code
- Test it manually
- Find bugs and edge cases
- Ask the AI to fix them with specific descriptions
- Repeat until the feature works reliably
Prompting tips for core features:
Be specific about inputs and outputs:
Build the citation tracking feature. Input: a brand name
and list of keywords. Output: a report showing which AI
search engines (ChatGPT, Perplexity, Google AI Overview)
mention the brand for those keywords, with direct quotes
and source URLs.
Describe edge cases:
Handle these edge cases:
- Brand name not found in any AI engine
- API rate limits exceeded
- Partial results (some engines respond, some don't)
- Very long brand names or special characters
Ask for error handling:
Add error handling for the citation tracking API calls.
If an external API fails, retry once after 2 seconds.
If it fails again, mark that engine as "unavailable"
in the report and continue with the others.
Never let a single API failure crash the entire report.
Day 4: Payments and Polish
Stripe Integration:
Stripe is the standard for SaaS payments. The integration has three parts:
- Checkout: When a user clicks "Subscribe," redirect them to Stripe Checkout
- Webhook: When Stripe processes a payment, it sends a webhook to your server
- Portal: Let users manage their subscription through Stripe Customer Portal
Integrate Stripe payments with these requirements:
1. Two pricing tiers:
- Starter: $[X]/month (Stripe price ID: create new)
- Professional: $[X]/month (Stripe price ID: create new)
2. Free trial: [X] days, no credit card required
3. Checkout flow:
- User clicks "Upgrade" on dashboard
- Redirect to Stripe Checkout with their email prefilled
- On success, redirect to /dashboard?upgraded=true
- On cancel, redirect to /pricing
4. Webhook handler at /api/stripe/webhook:
- checkout.session.completed -> activate subscription
- customer.subscription.updated -> update plan
- customer.subscription.deleted -> downgrade to free
- invoice.payment_failed -> send warning email
5. Customer portal:
- User clicks "Manage Subscription"
- Redirect to Stripe Customer Portal
- Portal allows plan changes and cancellation
Polish items for Day 4:
- Loading states (spinners, skeletons) for all async operations
- Error messages that are helpful, not technical
- Empty states (what the dashboard shows before the user has data)
- Mobile responsiveness check
- Basic rate limiting on API endpoints
Day 5: Testing and Deployment
Manual testing checklist:
Authentication:
[ ] Sign up with email and password
[ ] Log in with existing account
[ ] Log out
[ ] Try signing up with an already-used email
[ ] Try logging in with wrong password
[ ] Session persists across page reloads
Core Feature:
[ ] Create a new [project/report/etc.]
[ ] View results on dashboard
[ ] Handle empty/no results gracefully
[ ] Handle errors gracefully
[ ] Performance: does it load in under 3 seconds?
Payments:
[ ] Click upgrade, reach Stripe Checkout
[ ] Complete a test payment (use Stripe test mode)
[ ] Webhook processes correctly
[ ] User plan updates in your database
[ ] Customer portal accessible
[ ] Cancel subscription works
General:
[ ] All pages load on mobile
[ ] No console errors in browser
[ ] Environment variables are set in production
[ ] HTTPS working
[ ] No hardcoded secrets in code
Deploy to production:
If you have been deploying your marketing site on Cloudflare Pages (Chapter 5), your product deployment depends on your architecture:
Option A: Product on the same domain
- Add your app routes to the same project
- Deploy with the same git push workflow
Option B: Product on a subdomain (app.yourdomain.com)
- Create a separate Cloudflare Pages project or Workers project
- Configure app.yourdomain.com DNS in Cloudflare
- Deploy independently from the marketing site
Option C: Product on a separate platform (Railway, Vercel)
- Deploy to that platform
- Point app.yourdomain.com DNS to it
- Configure CORS if your API and frontend are on different domains
Test mode vs. live mode. Keep Stripe in test mode for your first few days after launch. This lets you process test payments and verify everything works without real money. Switch to live mode only after you have confirmed the full payment flow works end to end.
Common AI Coding Pitfalls
After helping dozens of founders build with AI, here are the most common mistakes:
1. Not reviewing the code. AI generates correct code most of the time. But "most of the time" means it sometimes generates code with subtle bugs, security vulnerabilities, or incorrect assumptions. Always review. You do not need to understand every line, but you should understand the logic flow.
2. Vague prompts. "Build me a dashboard" produces mediocre output. "Build a dashboard that shows a list of tracking reports, each with a title, date, status badge, and a 'View Report' button that links to /reports/:id" produces exactly what you want.
3. Trying to build everything at once. Build one feature at a time. Get it working. Then move to the next. Asking the AI to build five features simultaneously produces messy, interconnected code that is hard to debug.
4. Ignoring the AI's explanations. When you ask the AI to fix a bug, it usually explains what was wrong. Read the explanation. This is how you learn. After a week of building with AI, you will understand your codebase far better than you think.
5. Not using version control. Commit after every working feature. If the AI breaks something in the next iteration, you can always roll back to the last working version.
# Commit after each feature works
git add .
git commit -m "working auth flow"
# ... build next feature ...
git add .
git commit -m "working dashboard with reports"
# If something breaks, you can always:
git diff # See what changed
git stash # Temporarily undo changes
git checkout -- . # Discard all changes since last commit
The "Good Enough" Standard
Your MVP will not be perfect. It should not be perfect. Here is the quality standard you are aiming for:
| Dimension | Good Enough | Over-Engineered |
|---|---|---|
| Design | Clean and consistent | Custom animations, micro-interactions |
| Features | Core feature works well | 10 features, all half-baked |
| Performance | Loads in under 3 seconds | Sub-100ms response times |
| Error handling | Shows helpful error messages | Retry logic, circuit breakers, fallbacks |
| Authentication | Email + password works | SSO, MFA, social login, magic links |
| Documentation | Basic FAQ on website | Full API docs, integration guides |
Ship good enough. Improve based on what real users tell you they need.
End of Week 2 Checkpoint
By the end of Week 2, you have:
- A working product with core feature, auth, and payments
- Deployed to production with a live URL
- Stripe integration in test mode
- Manual testing completed
- At least one person (you) has gone through the complete user journey
- Code committed to GitHub with meaningful commit messages
Total additional spend: $5-20 (cloud infrastructure for the month)
You now have a live product that people can sign up for and pay for. That puts you ahead of 95% of aspiring founders who are still "planning" and "researching."
Week 3 is launch week. Time to get your first users.