[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-b9ed04bf-392a-4dbc-b179-c78503a9ee68":3,"$f2d3wDtfmxGcyZ35B4ONBVyuUzuZWiokLEpmGXoMfUQs":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"b9ed04bf-392a-4dbc-b179-c78503a9ee68","saas-mvp-launcher","用于从头开始规划或构建SaaS MVP时使用。提供涵盖技术栈、架构、身份验证、支付和发布清单的结构化路线图。","cat_life_career","mod_other","sickn33,other","---\nname: saas-mvp-launcher\ndescription: \"Use when planning or building a SaaS MVP from scratch. Provides a structured roadmap covering tech stack, architecture, auth, payments, and launch checklist.\"\nrisk: safe\nsource: community\ndate_added: \"2026-03-04\"\n---\n\n# SaaS MVP Launcher\n\n## Overview\n\nThis skill guides you through building a production-ready SaaS MVP in the shortest time possible. It covers everything from idea validation and tech stack selection to authentication, payments, database design, deployment, and launch — using modern, battle-tested tools.\n\n## When to Use This Skill\n\n- Use when starting a new SaaS product from scratch\n- Use when you need to choose a tech stack for a web application\n- Use when setting up authentication, billing, or database for a SaaS\n- Use when you want a structured launch checklist before going live\n- Use when designing the architecture of a multi-tenant application\n- Use when doing a technical review of an existing early-stage SaaS\n\n## Step-by-Step Guide\n\n### 1. Validate Before You Build\n\nBefore writing any code, validate the idea:\n\n```\nValidation checklist:\n- [ ] Can you describe the problem in one sentence?\n- [ ] Who is the exact customer? (not \"everyone\")\n- [ ] What do they pay for today to solve this?\n- [ ] Have you talked to 5+ potential customers?\n- [ ] Will they pay $X\u002Fmonth for your solution?\n```\n\n**Rule:** If you can't get 3 people to pre-pay or sign a letter of intent, don't build yet.\n\n### 2. Choose Your Tech Stack\n\nRecommended modern SaaS stack (2026):\n\n| Layer | Choice | Why |\n|-------|--------|-----|\n| Frontend | Next.js 15 + TypeScript | Full-stack, great DX, Vercel deploy |\n| Styling | Tailwind CSS + shadcn\u002Fui | Fast, accessible, customizable |\n| Backend | Next.js API Routes or tRPC | Type-safe, co-located |\n| Database | PostgreSQL via Supabase | Reliable, scalable, free tier |\n| ORM | Prisma or Drizzle | Type-safe queries, migrations |\n| Auth | Clerk or NextAuth.js | Social login, session management |\n| Payments | Stripe | Industry standard, great docs |\n| Email | Resend + React Email | Modern, developer-friendly |\n| Deployment | Vercel (frontend) + Railway (backend) | Zero-config, fast CI\u002FCD |\n| Monitoring | Sentry + PostHog | Error tracking + analytics |\n\n### 3. Project Structure\n\n```\nmy-saas\u002F\n├── app\u002F                    # Next.js App Router\n│   ├── (auth)\u002F             # Auth routes (login, signup)\n│   ├── (dashboard)\u002F        # Protected app routes\n│   ├── (marketing)\u002F        # Public landing pages\n│   └── api\u002F                # API routes\n├── components\u002F\n│   ├── ui\u002F                 # shadcn\u002Fui components\n│   └── [feature]\u002F          # Feature-specific components\n├── lib\u002F\n│   ├── db.ts               # Database client (Prisma\u002FDrizzle)\n│   ├── stripe.ts           # Stripe client\n│   └── email.ts            # Email client (Resend)\n├── prisma\u002F\n│   └── schema.prisma       # Database schema\n├── .env.local              # Environment variables\n└── middleware.ts           # Auth middleware\n```\n\n### 4. Core Database Schema (Multi-tenant SaaS)\n\n```prisma\nmodel User {\n  id            String    @id @default(cuid())\n  email         String    @unique\n  name          String?\n  createdAt     DateTime  @default(now())\n  subscription  Subscription?\n  workspaces    WorkspaceMember[]\n}\n\nmodel Workspace {\n  id        String    @id @default(cuid())\n  name      String\n  slug      String    @unique\n  plan      Plan      @default(FREE)\n  members   WorkspaceMember[]\n  createdAt DateTime  @default(now())\n}\n\nmodel Subscription {\n  id                 String   @id @default(cuid())\n  userId             String   @unique\n  user               User     @relation(fields: [userId], references: [id])\n  stripeCustomerId   String   @unique\n  stripePriceId      String\n  stripeSubId        String   @unique\n  status             String   # active, canceled, past_due\n  currentPeriodEnd   DateTime\n}\n\nenum Plan {\n  FREE\n  PRO\n  ENTERPRISE\n}\n```\n\n### 5. Authentication Setup (Clerk)\n\n```typescript\n\u002F\u002F middleware.ts\nimport { clerkMiddleware, createRouteMatcher } from '@clerk\u002Fnextjs\u002Fserver';\n\nconst isPublicRoute = createRouteMatcher([\n  '\u002F',\n  '\u002Fpricing',\n  '\u002Fblog(.*)',\n  '\u002Fsign-in(.*)',\n  '\u002Fsign-up(.*)',\n  '\u002Fapi\u002Fwebhooks(.*)',\n]);\n\nexport default clerkMiddleware((auth, req) => {\n  if (!isPublicRoute(req)) {\n    auth().protect();\n  }\n});\n\nexport const config = {\n  matcher: ['\u002F((?!.*\\\\..*|_next).*)', '\u002F', '\u002F(api|trpc)(.*)'],\n};\n```\n\n### 6. Stripe Integration (Subscriptions)\n\n```typescript\n\u002F\u002F lib\u002Fstripe.ts\nimport Stripe from 'stripe';\nexport const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {\n  apiVersion: '2025-01-27.acacia',\n});\n\n\u002F\u002F Create checkout session\nexport async function createCheckoutSession(userId: string, priceId: string) {\n  return stripe.checkout.sessions.create({\n    mode: 'subscription',\n    payment_method_types: ['card'],\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_URL}\u002Fdashboard?success=true`,\n    cancel_url: `${process.env.NEXT_PUBLIC_URL}\u002Fpricing`,\n    metadata: { userId },\n  });\n}\n```\n\n### 7. Pre-Launch Checklist\n\n**Technical:**\n- [ ] Authentication works (signup, login, logout, password reset)\n- [ ] Payments work end-to-end (subscribe, cancel, upgrade)\n- [ ] Error monitoring configured (Sentry)\n- [ ] Environment variables documented\n- [ ] Database backups configured\n- [ ] Rate limiting on API routes\n- [ ] Input validation with Zod on all forms\n- [ ] HTTPS enforced, security headers set\n\n**Product:**\n- [ ] Landing page with clear value proposition\n- [ ] Pricing page with 2-3 tiers\n- [ ] Onboarding flow (first value in \u003C 5 minutes)\n- [ ] Email sequences (welcome, trial ending, payment failed)\n- [ ] Terms of Service and Privacy Policy pages\n- [ ] Support channel (email \u002F chat)\n\n**Marketing:**\n- [ ] Domain purchased and configured\n- [ ] SEO meta tags on all pages\n- [ ] Google Analytics or PostHog installed\n- [ ] Social media accounts created\n- [ ] Product Hunt draft ready\n\n## Best Practices\n\n- ✅ **Do:** Ship a working MVP in 4-6 weeks maximum, then iterate based on feedback\n- ✅ **Do:** Charge from day 1 — free users don't validate product-market fit\n- ✅ **Do:** Build the \"happy path\" first, handle edge cases later\n- ✅ **Do:** Use feature flags for gradual rollouts (e.g., Vercel Edge Config)\n- ✅ **Do:** Monitor user behavior from launch day — not after problems arise\n- ❌ **Don't:** Build every feature before talking to customers\n- ❌ **Don't:** Optimize for scale before reaching $10k MRR\n- ❌ **Don't:** Build a custom auth system — use Clerk, Auth.js, or Supabase Auth\n- ❌ **Don't:** Skip the onboarding flow — it's where most SaaS lose users\n\n## Troubleshooting\n\n**Problem:** Users sign up but don't activate (don't use core feature)\n**Solution:** Reduce steps to first value. Track with PostHog where users drop off in onboarding.\n\n**Problem:** High churn after trial\n**Solution:** Add an exit survey. Most churn is due to lack of perceived value, not price.\n\n**Problem:** Stripe webhook events not received locally\n**Solution:** Use Stripe CLI: `stripe listen --forward-to localhost:3000\u002Fapi\u002Fwebhooks\u002Fstripe`\n\n**Problem:** Database migrations failing in production\n**Solution:** Always run `prisma migrate deploy` (not `prisma migrate dev`) in production environments.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,201,1750,"2026-05-16 13:37:29",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"443169eb-08a6-478c-bdd3-5ea6ddff8078","1.0.0","saas-mvp-launcher.zip",3563,"uploads\u002Fskills\u002Fb9ed04bf-392a-4dbc-b179-c78503a9ee68\u002Fsaas-mvp-launcher.zip","cdc8cffa0127fd41ac9393f7a419036822ba6bd55872681592da7353dbf87306","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":7731}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]