๐๏ธ PolicyCraft โ AI Compliance Policy Generator for Startups
Date: 2026-07-19
Difficulty: โญโญ (Medium)
Estimated Build Time: 2.5 days (~20 hours)
Category: compliance, ai-powered, documentation
Tech Stack: Next.js 15 + React 19 + TypeScript + Gemini AI + PostgreSQL + PDF generation
๐ฏ Elevator Pitch
PolicyCraft lets founders generate legally-ready HR, security, privacy, and operational policy documents in under 5 minutes. Answer a 60-second questionnaire about your company โ size, industry, location, team structure โ and get beautifully formatted, compliant PDFs ready to share with investors, employees, and compliance auditors. No lawyers, no templates, no weeks of drafting.
โ Problem
Early-stage startups (pre-seed to Series A) face a brutal compliance catch-22:
- Investors demand policies. Due diligence checklists require an Employee Handbook, Data Privacy Policy, Code of Conduct, Security Policy, Remote Work Policy โ often 15+ documents.
- Lawyers cost $300โ800/hr. A full policy set costs $5Kโ$15K to draft. Pre-seed founders can't afford that.
- Free templates are dangerous. Generic templates from Google Docs are:
- Not jurisdiction-aware (CA vs NY vs TX requirements differ)
- Missing critical clauses (arbitration, data retention, whistleblower)
- Not framework-aligned (SOC 2, ISO 27001, GDPR readiness)
- Wasting founder cognitive load. Founders should be building product, not copy-pasting HR policy templates for 3 days.
Current alternatives: Lawyers (too expensive), generic template marketplaces (incomplete/dangerous), DIY with Notion (hours of work, no compliance confidence).
๐ก Solution
PolicyCraft is an AI policy co-pilot that:
- Asks structured questions about your startup (team size, location(s), industry, headcount, tech stack, data types handled, existing compliance frameworks)
- Generates complete policy documents using Gemini AI with structured prompt templates that embed jurisdiction-specific legal requirements
- Outputs polished, brandable PDFs with your company name, logo, and color scheme
- Stores everything in your dashboard for version tracking, re-generation, and bulk download
- Provides a Compliance Readiness Score โ a 0โ100% gauge showing how many common due diligence requirements you've covered
Each policy is jurisdiction-aware (CA, NY, TX, UK, EU variants) and framework-tagged (SOC 2, ISO 27001, GDPR, HIPAA readiness), so founders know exactly which compliance boxes each document checks.
๐ฅ Target User
| Persona | Pain Point | Why PolicyCraft |
|---|
| Pre-seed founder (solo, 1-3 people) | Investor says "send your employee handbook and IP assignment policy before we sign the SAFE" | Generate both docs in 5 min, close the round faster |
| Seed-stage CEO (5-15 employees, first hire) | Needs a Remote Work Policy, Code of Conduct, and Data Privacy Policy for the team handbook | One questionnaire โ 3 complete docs, ready in 10 min |
| Post-seed CTO/COO (15-50 people, SOC 2 audit upcoming) | SOC 2 Type I requires documented security policies (access control, incident response, data retention) | Generate all security policies framework-aligned, share with auditor |
| Freelance / solo consultant | Client contract requires proof of security/compliance policies | Build a professional policy package in minutes, win enterprise clients |
| Non-technical founder (marketing/sales background) | No legal knowledge, can't evaluate if a template is "good enough" | AI with built-in legal guardrails gives confidence the docs cover the bases |
๐ ๏ธ Full Tech Stack
Frontend
| Layer | Technology | Specific Choice |
|---|
| Framework | Next.js 15 (App Router) + React 19 + TypeScript 5.4 | Server components for policy listing, client components for questionnaire wizard |
| State Management | Zustand 5.x | Lightweight questionnaire wizard state (multi-step form) |
| Data Fetching | TanStack React Query 5.x + Server Actions | React Query for dashboard list, Server Actions for form submissions |
| PDF Generation | @react-pdf/renderer 3.x | Server-side PDF generation with custom fonts, branding, headers |
| HTTP Client | fetch API (built-in) | Direct calls to Gemini API from Server Actions |
Backend & Infrastructure
| Layer | Technology | Specific Choice |
|---|
| Runtime | Next.js 15 (Edge + Node.js hybrid) | Questionnaire โ Node.js Server Action, PDF gen in Node.js |
| API Layer | Next.js Route Handlers + Server Actions | REST for webhook-ready endpoints, Server Actions for form mutations |
| Database | PostgreSQL 16 via Neon (serverless) | Shared Neon instance from .aienv, database name: policycraft |
| ORM | Drizzle ORM 0.38.x | Type-safe schema, migrations via drizzle-kit push |
| Auth | NextAuth.js 5 (Auth.js v5) | GitHub + Google OAuth, no magic links (MVP simplicity) |
| AI/LLM | Google Gemini API 2.5 (gemma-4-31b-it via API key from .aienv) | Structured policy generation with persona-specific prompts |
| Payments | LemonSqueezy | Simple API, less overhead than Stripe for digital goods |
| Email | Resend + React Email | Transactional emails (PDF delivery, account confirmation) |
| Hosting | Vercel (Pro plan) | Frontend + API + Server Actions all in one deployment |
| File Storage | Vercel Blob | Store generated PDFs for download history (ephemeral โ no R2 needed) |
Testing & CI/CD
| Area | Tool |
|---|
| Unit Testing | Vitest v2.x |
| E2E Testing | Playwright v1.48+ |
| CI/CD | GitHub Actions (lint โ test โ build) |
| Linting | ESLint 9.x + Prettier 3.x |
| Type Checking | TypeScript 5.4 (strict mode) |
Monitoring & Analytics
| Area | Tool |
|---|
| Error Tracking | Sentry (Vercel integration) |
| Analytics | PostHog (self-hosted or cloud) |
| Performance | Vercel Analytics (Web Vitals) |
Key SDKs & Libraries
| Library | Purpose |
|---|
@react-pdf/renderer | PDF generation with custom fonts/branding |
react-markdown + remark-gfm | Preview generated policies as formatted markdown |
lucide-react | Icon set |
date-fns | Date formatting |
zod | Schema validation for questionnaire inputs |
@google/generative-ai | Gemini SDK for structured policy generation |
๐จ UI Design Language
| Aspect | Choice |
|---|
| Base Framework | Tailwind CSS v4 |
| Component Library | shadcn/ui (Radix primitives) โ full suite (Button, Card, Dialog, Select, Form, Tabs, Stepper, Progress, Badge, Table, Sheet) |
| Color Palette | |
| โ Primary | #4F46E5 (Indigo-600) โ trust, authority, legal-confidence |
| โ Secondary | #0EA5E9 (Sky-500) โ AI intelligence |
| โ Accent | #10B981 (Emerald-500) โ compliance "green check" |
| โ Neutrals | #F8FAFC (slate-50) bg, #1E293B (slate-800) text, #94A3B8 (slate-400) muted |
| โ Success | #22C55E (Green-500) |
| โ Warning | #F59E0B (Amber-500) |
| โ Error | #EF4444 (Red-500) |
| Typography | Inter (headings + body, weights 400/500/600/700), JetBrains Mono (code samples in policies, weight 400) |
| Design Style | Professional minimal โ clean cards, generous whitespace, subtle shadows, a "legal-doc-meets-modern-SaaS" feel. Uses a subtle dot-grid background on hero sections. |
| Spacing | 4px grid (Tailwind defaults), relaxed card padding (p-6/p-8), generous vertical rhythm |
| Radius | rounded-lg (8px) for cards, rounded-md (6px) for buttons/inputs, sharp edges for document previews |
| Animation | Framer Motion v11 โ page transitions, stepper wizard transitions, badge counter animations, scroll-triggered fade-ins |
| Icon Set | Lucide (FileText, Shield, Scale, CheckCircle, Download, User, Building2, Globe, AlertTriangle, ArrowRight) |
| Dark Mode | Class-based toggle (next-themes via <ThemeProvider>), automatic system-preference detection, full dark palette (slate-900 bg, slate-100 text, muted indigo-400 primaries) |
| Layout | Left sidebar nav (dashboard navigation) + main content area. The questionnaire wizard is full-width centered modal/sheet. Dashboard uses a card grid for policy listing. |
| Responsive | Mobile-first. Sidebar collapses to bottom nav on mobile. Wizard becomes full-screen stepper on small screens. |
๐๏ธ Full System Architecture
Repository Pattern
Single repo (Next.js monolith) โ all code in one Next.js 15 app:
policycraft/
โโโ app/
โ โโโ (marketing)/ # Landing, pricing, about pages
โ โ โโโ page.tsx
โ โ โโโ pricing/page.tsx
โ โโโ (dashboard)/ # Authenticated routes
โ โ โโโ dashboard/
โ โ โ โโโ page.tsx # Policy listing + compliance score
โ โ โ โโโ policies/
โ โ โ โโโ [id]/ # Single policy view + download
โ โ โ โโโ new/ # Questionnaire wizard
โ โ โโโ layout.tsx # Dashboard layout with sidebar
โ โโโ api/
โ โ โโโ generate/ # Server Action (preferred) or route
โ โ โโโ regenerate/[id]/ # Re-generate a policy
โ โ โโโ webhooks/ # LemonSqueezy webhook endpoint
โ โโโ layout.tsx # Root layout (ThemeProvider, etc.)
โโโ components/
โ โโโ ui/ # shadcn/ui components
โ โโโ wizard/ # Multi-step questionnaire components
โ โโโ policy-card/ # Policy card with status badge
โ โโโ pdf/ # React-PDF document definitions
โโโ lib/
โ โโโ db/ # Drizzle schema + client
โ โโโ ai/ # Gemini prompt templates + client
โ โโโ pdf/ # PDF generation helpers
โ โโโ auth/ # NextAuth configuration
โโโ drizzle/
โ โโโ schema.ts # Database schema (single file, MVP)
โโโ types/
โโโ index.ts # Shared TypeScript types
API Layer
- Server Actions for all CRUD operations (policy generation, regeneration, deletion)
- Route Handlers for:
POST /api/webhooks/lemonsqueezy โ handle subscription events
GET /api/policies/[id]/download โ download PDF via direct URL
- No GraphQL, no tRPC โ keeping it simple with Server Actions + React Query
Database Schema (PostgreSQL via Neon)
users
id: uuid (PK, default)
name: text
email: text (unique)
image: text (nullable, avatar URL)
createdAt: timestamp
companies
id: uuid (PK)
userId: uuid (FK โ users.id)
name: text
size: text (enum: solo/1-5/5-15/15-50/50+)
industry: text
locations: jsonb ([{state, country}])
techStack: jsonb (array of tech categories)
dataTypes: jsonb (PHI, PII, financial, etc.)
frameworks: jsonb (SOC2, ISO27001, GDPR, HIPAA, none)
createdAt: timestamp
policies
id: uuid (PK)
companyId: uuid (FK โ companies.id)
type: text (enum: employee-handbook, code-of-conduct, data-privacy, security-policy,
remote-work, ip-assignment, acceptable-use, incident-response,
data-retention, whistleblower, anti-harassment, social-media)
title: text
content: jsonb (full generated markdown)
frameworkTags: jsonb (which frameworks this policy supports)
jurisdiction: text (e.g. "CA, NY, TX" or "UK, EU")
version: int (default 1)
createdAt: timestamp
updatedAt: timestamp
subscriptions
id: uuid (PK)
userId: uuid (FK โ users.id, unique)
lemonSqueezyId: text (unique)
tier: text (free / pro / business)
status: text (active / cancelled / past_due)
currentPeriodEnd: timestamp
createdAt: timestamp
Relationships:
- User โ Companies (1:N) โ one user can set up multiple companies/brands
- Company โ Policies (1:N) โ each company has many generated policies
- User โ Subscription (1:1) โ single active subscription per user
Auth Flow
- NextAuth.js v5 with GitHub + Google OAuth providers
- Session stored in JWT (no database session table for MVP simplicity)
- Protected routes via middleware matching
/dashboard/*
PDF Generation Flow
- User completes questionnaire wizard (multi-step form, Zustand manages wizard state)
- On final step, Server Action fires:
- Gathers all questionnaire answers + company profile
- Sends structured prompt to Gemini API with policy-type-specific template
- Receives markdown content back
- Parses/extracts sections from structured response
- Renders PDF via
@react-pdf/renderer on server
- Stores markdown
content in PostgreSQL (policies table)
- Uploads PDF to Vercel Blob
- Returns policy ID + preview content to client
- User can preview markdown (react-markdown) or download PDF
AI Prompt Engineering Strategy
Each of the 12+ policy types has a dedicated prompt template:
// Example: Employee Handbook prompt structure
const EMPLOYEE_HANDBOOK_SYSTEM_PROMPT = `You are an expert employment law compliance assistant.
Generate a complete Employee Handbook for a {size}-person company in {industry}
located primarily in {jurisdiction}. The company handles {dataTypes} data.
The handbook must cover:
1. Introduction & Company Mission
2. Employment Policies (at-will, equal opportunity, anti-discrimination)
3. Compensation & Benefits
4. Work Schedule & Remote Work
5. Code of Conduct
6. Leave Policies (vacation, sick, parental)
7. Data Protection & Privacy
8. IT & Security Policy
9. Discipline & Termination
10. Acknowledgment Form
Format as clean markdown with ## headings, each section 3-5 paragraphs.
Include jurisdiction-specific clauses for {jurisdiction}.
Flag any section that touches {frameworks} compliance requirements.
Add [COMPLIANCE_FLAG: SOC2-CC6.1] type annotations where relevant.
`;
This is sent as a chat request to gemma-4-31b-it via the Google Gemini API key from .aienv.
Caching Strategy
- React Query with
staleTime: 5min for policy list (dashboard)
- No Redis needed for MVP โ PostgreSQL handles query load
- Vercel Edge Cache for marketing pages (ISR with
revalidate: 3600)
- CDN via Vercel's built-in edge network for PDF downloads from Blob
Environment Structure
# .env (local) / Vercel Environment Variables
DATABASE_URL=postgresql://...
GEMINI_API_KEY=...
AUTH_SECRET=...
AUTH_GITHUB_ID=...
AUTH_GITHUB_SECRET=...
AUTH_GOOGLE_ID=...
AUTH_GOOGLE_SECRET=...
LEMON_SQUEEZY_API_KEY=...
LEMON_SQUEEZY_STORE_ID=...
LEMON_SQUEEZY_WEBHOOK_SECRET=...
RESEND_API_KEY=...
BLOB_READ_WRITE_TOKEN=...
NEXT_PUBLIC_APP_URL=http://localhost:3000
| Environment | DB | Hosting | Purpose |
|---|
development | Local Neon branch | localhost:3000 | Active development |
production | Neon prod branch | Vercel production | Live SaaS |
Deployment Topology
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Browser โ โโโถ โ Vercel (Edge) โ โโโถ โ Neon DB โ
โ (React SPA) โ โ Next.js 15 App โ โ PostgreSQL โ
โโโโโโโโโโโโโโโโ โ + Server Actionsโ โโโโโโโโโโโโโโโ
โ + API Routes โ โฒ
โโโโโโโโโโฌโโโโโโโโโโ โ
โ โ
โโโโโโโโโโผโโโโโโโโโโ โ
โ Gemini API โโโโโโโโโโ
โ (Google Cloud) โ(stores markdown
โโโโโโโโโโโโโโโโโโโโ in policies.content)
โโโโโโโโโโโโโโโโโโโโ
โ Vercel Blob โ
โ (PDF storage) โ
โโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโ
โ LemonSqueezy โ
โ (payments) โ
โโโโโโโโโโฌโโโโโโโโโโ
โ webhook
โผ
Vercel /api/webhooks/lemonsqueezy
Data Flow (Policy Generation)
1. User fills questionnaire wizard (Zustand state, client-side)
2. Clicks "Generate" โ Server Action called
3. Server Action:
a. Validates input with Zod
b. Upserts Company record in PostgreSQL
c. Calls Gemini API with structured prompt + company data
d. Receives markdown policy content
e. Parses response for section structure
f. Inserts Policy record in PostgreSQL with content as jsonb
g. Renders PDF via @react-pdf/renderer
h. Uploads PDF to Vercel Blob
i. Returns { policyId, previewMarkdown, pdfUrl }
4. Client shows preview (react-markdown), download button appears
5. User can download PDF, share link, or regenerate with modified answers
Monitoring & Observability
- Sentry: Error tracking for Server Actions, API routes, and client errors
- PostHog: Usage analytics (policies generated per user, completion rate, feature usage)
- Vercel Analytics: Core Web Vitals, traffic patterns
- Gemini API logging: Cost tracking via Google Cloud Console (token usage per generation)
Background Jobs
- None in MVP โ all generation is synchronous (Gemini response is <10s)
- Future: Inngest for batch generation, email delivery of PDFs, subscription expiry cron
๐ PRD โ Functional Requirements
FR-01: Authentication & Onboarding
- Users sign up via GitHub or Google OAuth (NextAuth.js v5)
- First-time users see an onboarding flow: "Tell us about your company"
- Onboarding collects: company name, size, industry, locations, tech stack, data types, compliance frameworks
- Onboarding data saved to
companies table (upsert)
FR-02: Questionnaire Wizard
- Multi-step stepper UI (steps: Company Info โ Locations โ Tech & Data โ Frameworks โ Review)
- Each step collects specific data for policy generation
- Previous answers pre-filled when returning
- Progress indicator (% complete, step X of 5)
- "Generate All Policies" button on final review step or "Generate Single Policy" dropdown
FR-03: Policy Generation
- 12+ policy types available (see schema
policies.type enum)
- Each generates via a dedicated Gemini prompt template
- Generation takes 3โ10 seconds (streaming markdown preview as enhancement)
- Policies are created with a unique ID, stored as markdown in PostgreSQL
- Each policy tagged with applicable compliance frameworks and jurisdictions
FR-04: Dashboard & Policy Management
- Card grid showing all generated policies per company
- Each card shows: policy type, generated date, version number, status (draft/final)
- Compliance Readiness Score gauge (0โ100%) based on which critical policies exist
- Click policy โ full markdown preview with syntax-highlighted compliance flags
- Download PDF button (triggers server-side rendering + Blob upload)
- Regenerate button (re-runs with updated company data)
- Delete policy (soft-delete or full โ TBD)
FR-05: PDF Export
- Polished PDF output with company name/logo (if provided), generated date, page numbers
- Professional PDF layout: cover page โ table of contents โ sections โ acknowledgment page
- Custom fonts (Inter via @react-pdf/font)
- Downloadable directly from dashboard
FR-06: Compliance Readiness Score
- Algorithm: weighted checklist of 20+ critical policies ร framework alignment
- 50% = all "Critical" policies exist (Employee Handbook, Code of Conduct, Data Privacy, Security Policy, IP Assignment)
- 30% = framework alignment (SOC2, ISO27001, GDPR policy coverage)
- 20% = recency/version freshness
- Displayed as a circular gauge on dashboard header
FR-07: Multi-Company Support
- Users can add multiple companies (important for consultants/agencies)
- Company switcher in sidebar
- Each company has its own policy set
- Billing per-company or per-user? Per-user for MVP (one subscription covers all)
FR-08: Billing & Subscription
- LemonSqueezy integration for payment processing
- Three tiers: Free, Pro, Business
- Free tier: 3 basic policies (Employee Handbook, Code of Conduct, Data Privacy), no PDF download
- Pro tier: All 12+ policies, PDF download, regeneration, 1 company
- Business tier: All policies, multi-company, custom branding on PDFs, priority generation
- LemonSqueezy webhook handles subscription lifecycle (created, updated, cancelled)
FR-09: Usage Tracking (PostHog)
- Track: sign-ups, questionnaire completions, policies generated, PDF downloads, regenerate clicks
- Track: which policy types are most popular (product feedback)
- Track: conversion funnel (signup โ questionnaire โ generate โ download โ paid)
Non-Functional Requirements
| ID | Requirement | Target |
|---|
| NFR-01 | Policy generation latency | < 15 seconds (Gemini response + PDF render) |
| NFR-02 | Dashboard page load | < 2 seconds (Vercel Edge + React Query cache) |
| NFR-03 | PDF download time | < 3 seconds from click to Blob download |
| NFR-04 | Auth flow | < 3 seconds (OAuth redirect + session creation) |
| NFR-05 | Uptime | 99.5% (Vercel SLA) |
| NFR-06 | Data privacy | Policy content stored in PostgreSQL, never shared with third parties beyond Gemini API processing |
| NFR-07 | Mobile responsiveness | Full functional on mobile (320px+) โ wizard collapses to full-screen stepper |
| NFR-08 | SEO | Marketing pages statically generated (SSG), semantic HTML, meta tags for each page |
| NFR-09 | Error handling | All Server Actions wrapped in try/catch with user-friendly toast messages. Gemini failures show graceful "AI is thinking..." + retry button |
| NFR-10 | Accessibility | WCAG 2.1 AA minimum (tab navigation, aria labels, color contrast, keyboard navigable wizard) |
๐ Epics & User Stories
Epic 1: Authentication & Company Setup (Foundation)
Est. time: ~3h
| Story | Description | Priority |
|---|
| US-1.1 | As a visitor, I can sign in with GitHub or Google OAuth so I can access the dashboard | P0 |
| US-1.2 | As a first-time user, I see an onboarding wizard that asks about my company so I can start generating policies immediately | P0 |
| US-1.3 | As a returning user, I land on my dashboard with my previous company data pre-loaded so I don't re-enter it | P0 |
| US-1.4 | As a power user, I can add multiple companies to my account so I can manage policies for different ventures | P1 |
| US-1.5 | As a user, I can edit my company profile (size, industry, locations) at any time so my policies stay accurate | P1 |
Epic 2: Questionnaire Wizard (Core UX)
Est. time: ~4h
| Story | Description | Priority |
|---|
| US-2.1 | As a user, I see a multi-step stepper (5 steps) so I can progress through company setup logically | P0 |
| US-2.2 | As a user, I can navigate back and forth between steps without losing my answers so I can correct mistakes | P0 |
| US-2.3 | As a user, I can see a progress indicator showing my completion % and current step so I know how far along I am | P0 |
| US-2.4 | As a user, I can select jurisdictions (states/countries) from a multi-select dropdown so my policies are location-specific | P0 |
| US-2.5 | As a user, I can select compliance frameworks (SOC2, ISO27001, GDPR, HIPAA) via toggle chips so policies are framework-aligned | P1 |
| US-2.6 | As a user, I can choose to generate a single policy type or "Generate All" so I have flexibility | P1 |
Epic 3: AI Policy Generation (Core Engine)
Est. time: ~5h
| Story | Description | Priority |
|---|
| US-3.1 | As a user, I click "Generate" and see a loading state with estimated time so I know generation is happening | P0 |
| US-3.2 | As a user, I receive a preview of the generated policy in formatted markdown so I can review it before downloading | P0 |
| US-3.3 | As a user, the generated policy has jurisdiction-specific clauses and compliance framework annotations so I know it's not generic | P0 |
| US-3.4 | As a user, I can regenerate any existing policy with updated company data so I can iterate | P1 |
| US-3.5 | As a system, prompts are structured per-policy-type with legal guardrails so output is consistently high-quality | P0 |
| US-3.6 | As a system, if Gemini API fails, the UI shows a friendly error with a retry button and logs the error to Sentry | P1 |
Epic 4: Dashboard & Policy Management
Est. time: ~4h
| Story | Description | Priority |
|---|
| US-4.1 | As a user, I see a dashboard with all my generated policies as cards (type, date, version, status) so I can manage them | P0 |
| US-4.2 | As a user, I see a Compliance Readiness Score gauge at the top of my dashboard so I know my coverage at a glance | P0 |
| US-4.3 | As a user, I can click a policy card to see the full markdown preview with highlighted compliance flags so I can review details | P0 |
| US-4.4 | As a user, I can filter/sort policies by type, framework, or date so I can find what I need | P1 |
| US-4.5 | As a user, I can delete policies I no longer need to keep my dashboard clean | P2 |
Epic 5: PDF Export & Branding
Est. time: ~3h
| Story | Description | Priority |
|---|
| US-5.1 | As a user, I can download any generated policy as a professional PDF so I can share it with investors/employees | P0 |
| US-5.2 | As a user, the PDF includes my company name, a cover page, and table of contents so it looks professionally drafted | P0 |
| US-5.3 | As a Business-tier user, PDFs include my custom brand colors and logo so they match my company identity | P1 |
| US-5.4 | As a user, I can download all my policies as a single ZIP archive so I can share my full compliance package | P2 |
| US-5.5 | As a user, PDFs have page numbers and are print-friendly so I can produce physical copies if needed | P1 |
Epic 6: Billing & Subscriptions (Revenue)
Est. time: ~3h
| Story | Description | Priority |
|---|
| US-6.1 | As a visitor, I can view the pricing page with feature comparisons so I can choose my tier | P0 |
| US-6.2 | As a user, I can subscribe to Pro or Business tiers via LemonSqueezy checkout so I unlock premium features | P0 |
| US-6.3 | As a system, LemonSqueezy webhooks update user subscription status so access is correctly gated | P0 |
| US-6.4 | As a Pro/Business user, my subscription badge shows in the dashboard so I know my plan status | P1 |
| US-6.5 | As a user, I can cancel my subscription from the dashboard so I have control over billing | P1 |
๐ฐ Pricing Model
| Feature | Free | Pro ($19/mo) | Business ($49/mo) |
|---|
| Policy types available | 3 (Basic) | 12+ (All) | 12+ (All) |
| PDF downloads | โ | โ
Unlimited | โ
Unlimited |
| Compliance Readiness Score | โ
(basic) | โ
(full) | โ
(full) |
| Regeneration | โ | โ
Unlimited | โ
Unlimited |
| Multi-company | โ (1 company) | โ (1 company) | โ
(up to 5 companies) |
| Custom PDF branding | โ | โ | โ
(logo + colors) |
| Priority generation | โ | โ | โ
(dedicated queue) |
| ZIP archive (all policies) | โ | โ | โ
|
| Annual discount | โ | 20% off ($182/yr) | 20% off ($470/yr) |
Free tier rationale: 3 basic policies (Employee Handbook, Code of Conduct, Data Privacy) give enough value to demonstrate quality. PDF download locked to drive conversions. Polices are viewable as markdown preview so free users still get value.
๐ข Go-to-Market Strategy
Channels
- Product Hunt โ launch with a strong demo GIF showing "15 policies in 5 minutes"
- Hacker News โ "Show HN: I built an AI that writes your startup's compliance policies in 5 minutes" โ founders love compliance hacks
- Indie Hackers โ audience of solo founders who need cost-effective compliance
- Twitter/X โ thread showing the pain: "Investors asked me for 12 policy docs. I couldn't afford a lawyer. So I built this."
- YC Startup School / communities โ post in founder forums where compliance comes up weekly
Positioning
- Tagline: "Your startup's compliance docs in 5 minutes. No lawyer required."
- Angle: Time + money savings. Frame it as "the $5K compliance docs you can generate for $19/mo"
- Social proof: Offer free lifetime Pro to 10 YC/well-known founders for testimonials
Growth Loops
- Referral: Each generated policy has a "Share with a founder friend" link โ referrer gets 1 month free
- Content marketing: Blog posts like "The 12 Policies Every Pre-Seed Startup Needs Before Fundraising" with PolicyCraft as the solution
Launch Sequence
| Phase | Action | Timeline |
|---|
| Pre-launch | Build social following with compliance tips thread | Week 1 |
| Launch | Product Hunt + Hacker News + Indie Hackers simultaneous push | Day 1 |
| Week 1 | Founder outreach (DM 50 pre-seed founders, offer free Pro) | Days 2โ7 |
| Month 1 | Content marketing: 4 blog posts, 2 Twitter threads, 1 guest post | Month 1 |
| Month 2 | Paid acquisition: Google Ads on "startup compliance documents" keywords | Month 2 |
๐ Success Metrics
| Metric | Target (Month 1) | Target (Month 3) | How to Measure |
|---|
| Sign-ups | 200+ | 1,000+ | PostHog |
| Policies generated | 800+ | 5,000+ | Database count |
| Free โ Paid conversion | 5% (10 paid) | 8% (80 paid) | LemonSqueezy + DB |
| MRR | $190โ$490 | $1,520โ$3,920 | LemonSqueezy dashboard |
| Questionnaire completion rate | 70%+ | 80%+ | PostHog funnel |
| PDF download rate (paid users) | 60%+ | 75%+ | PostHog event |
| User retention (Day 30) | 40%+ | 50%+ | PostHog (returning users) |
| NPS (via PostHog survey) | โ | 40+ | PostHog survey |
| Gemini API cost per policy | < $0.05 | < $0.03 | Cloud Console |
โ ๏ธ Risks & Mitigations
| Risk | Severity | Likelihood | Mitigation |
|---|
| AI-generated policies contain legal errors | ๐ด High | Medium | Include prominent disclaimer: "Not a substitute for legal advice. Review with an attorney before use." Plus compliance flag annotations in output. |
| Gemini API cost scales with usage | ๐ก Medium | Medium | Monitor token usage per policy. Cache common sections. Optimize prompts for conciseness. |
| Competitors undercut on price | ๐ก Medium | Medium | Build on defensible moat: jurisdiction-aware templates + framework tagging. Generic AI can generate policy text, but structured compliance knowledge per jurisdiction is the differentiator. |
| Low conversion rate | ๐ก Medium | Medium | Free tier shows full value (markdown preview). PDF lock is gentle nudge. Run A/B tests on pricing page. |
| Privacy concerns (company data sent to Gemini) | ๐ก Medium | Low | Disclose in TOS. Users can opt out of content storage. Consider future local model (Llama 3 via Together AI) for privacy-sensitive users. |
| Regulatory obsolescence | ๐ข Low | Low | Version tracking + annual regeneration reminders. Prompt templates updated when laws change. Community-contributed jurisdiction updates. |
๐ข Competitors
| Competitor | Strengths | Weaknesses | PolicyCraft Advantage |
|---|
| UpCounsel / LegalZoom | Real lawyers, legally binding | $300โ$800/hr, 1โ2 week turnaround | 5 minutes vs 2 weeks, $19/mo vs $5K |
| Rocket Lawyer | Subscription legal service | Monthly fee $40, limited policy templates | AI generates on-demand, not pre-written templates |
| Free templates (Google Docs / PandaDoc) | Free, widely available | Generic (not jurisdiction-aware), missing critical clauses, no compliance framework tags | Jurisdiction-aware, framework-tagged, AI adapts to company specifics |
| Law Insider | Large template library | Manual editing required, no AI generation | One-click generation with structured prompts, not copy-paste |
| ChatGPT "write me a policy" | Free, fast | No structured output, no section guarantees, no PDF, no compliance flags | Dedicated prompt templates per policy type, structured markdown, compliance annotations, polished PDFs |
| Ironclad | Enterprise CLM, contract lifecycle | Overkill for startups, $50K+/yr minimum | Built for early-stage, 5-minute setup, no sales calls |
Key Differentiator: PolicyCraft is the only tool that combines jurisdiction-aware generation, compliance framework tagging, and a one-questionnaire-to-all-policies flow specifically designed for pre-seed to Series A startups. Competitors are either too expensive (lawyers), too generic (templates), or too enterprise (Ironclad).
๐ฎ Future Enhancements (Post-MVP)
- Policy version diffing โ see what changed between v1 and v2
- Collaborative review โ share policy with co-founder for comments before finalizing
- API access โ generate policies programmatically (for platforms that need compliance docs)
- Multi-language policies โ generate in Spanish, French, German for international teams
- Compliance calendar โ automated renewal reminders with policy expiration dates
- Bulk generation โ generate all 12+ policies in one click with parallel Gemini calls
- Lawyer marketplace โ optional human review by vetted employment attorneys for $99/policy
๐ง Brainstorm Review (2026-07-19)
Score: 6/15 โ Feasibility 1 ยท Market Fit 4 ยท Complexity 1 โ โธ๏ธ Deferred (full-SaaS over-scope)
Strong market fit (4/5) โ compliance docs are a real, expensive pain (lawyers $5โ15K; investors
demand 15+ docs) with clear target users and a defensible jurisdiction-aware / framework-tagged wedge.
But as written it trips multiple hard rules: (1) full billing + multi-tenant + customer-portal
(LemonSqueezy Free/Pro/Business + webhook), (2) 3+ OAuth/integration flows (GitHub + Google OAuth,
LemonSqueezy webhook, Resend email, Vercel Blob), and the epic estimates (~22h P0) badly understate the
real 5โ7 day effort once auth/billing/webhooks/PDF+Blob are in. Rescue: "PolicyCraft Lite" โ
single-user (sandbox NextAuth or no-auth), no billing / multi-tenant, 60-sec questionnaire โ one
batched Gemini call โ jurisdiction-aware policy markdown + print-to-PDF + a compliance-readiness score,
localStorage or single-user Postgres. ~16โ20h. Same Lite-rescue pattern as ClauseGuard (023) /
TicketWise (031) โ re-promote on rescope.