โ† Pipeline

๐Ÿ›๏ธ 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:

  1. Investors demand policies. Due diligence checklists require an Employee Handbook, Data Privacy Policy, Code of Conduct, Security Policy, Remote Work Policy โ€” often 15+ documents.
  2. Lawyers cost $300โ€“800/hr. A full policy set costs $5Kโ€“$15K to draft. Pre-seed founders can't afford that.
  3. 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)
  4. 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:

  1. Asks structured questions about your startup (team size, location(s), industry, headcount, tech stack, data types handled, existing compliance frameworks)
  2. Generates complete policy documents using Gemini AI with structured prompt templates that embed jurisdiction-specific legal requirements
  3. Outputs polished, brandable PDFs with your company name, logo, and color scheme
  4. Stores everything in your dashboard for version tracking, re-generation, and bulk download
  5. 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

PersonaPain PointWhy 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 handbookOne 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 consultantClient contract requires proof of security/compliance policiesBuild 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

LayerTechnologySpecific Choice
FrameworkNext.js 15 (App Router) + React 19 + TypeScript 5.4Server components for policy listing, client components for questionnaire wizard
State ManagementZustand 5.xLightweight questionnaire wizard state (multi-step form)
Data FetchingTanStack React Query 5.x + Server ActionsReact Query for dashboard list, Server Actions for form submissions
PDF Generation@react-pdf/renderer 3.xServer-side PDF generation with custom fonts, branding, headers
HTTP Clientfetch API (built-in)Direct calls to Gemini API from Server Actions

Backend & Infrastructure

LayerTechnologySpecific Choice
RuntimeNext.js 15 (Edge + Node.js hybrid)Questionnaire โ†’ Node.js Server Action, PDF gen in Node.js
API LayerNext.js Route Handlers + Server ActionsREST for webhook-ready endpoints, Server Actions for form mutations
DatabasePostgreSQL 16 via Neon (serverless)Shared Neon instance from .aienv, database name: policycraft
ORMDrizzle ORM 0.38.xType-safe schema, migrations via drizzle-kit push
AuthNextAuth.js 5 (Auth.js v5)GitHub + Google OAuth, no magic links (MVP simplicity)
AI/LLMGoogle Gemini API 2.5 (gemma-4-31b-it via API key from .aienv)Structured policy generation with persona-specific prompts
PaymentsLemonSqueezySimple API, less overhead than Stripe for digital goods
EmailResend + React EmailTransactional emails (PDF delivery, account confirmation)
HostingVercel (Pro plan)Frontend + API + Server Actions all in one deployment
File StorageVercel BlobStore generated PDFs for download history (ephemeral โ€” no R2 needed)

Testing & CI/CD

AreaTool
Unit TestingVitest v2.x
E2E TestingPlaywright v1.48+
CI/CDGitHub Actions (lint โ†’ test โ†’ build)
LintingESLint 9.x + Prettier 3.x
Type CheckingTypeScript 5.4 (strict mode)

Monitoring & Analytics

AreaTool
Error TrackingSentry (Vercel integration)
AnalyticsPostHog (self-hosted or cloud)
PerformanceVercel Analytics (Web Vitals)

Key SDKs & Libraries

LibraryPurpose
@react-pdf/rendererPDF generation with custom fonts/branding
react-markdown + remark-gfmPreview generated policies as formatted markdown
lucide-reactIcon set
date-fnsDate formatting
zodSchema validation for questionnaire inputs
@google/generative-aiGemini SDK for structured policy generation

๐ŸŽจ UI Design Language

AspectChoice
Base FrameworkTailwind CSS v4
Component Libraryshadcn/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)
TypographyInter (headings + body, weights 400/500/600/700), JetBrains Mono (code samples in policies, weight 400)
Design StyleProfessional minimal โ€” clean cards, generous whitespace, subtle shadows, a "legal-doc-meets-modern-SaaS" feel. Uses a subtle dot-grid background on hero sections.
Spacing4px grid (Tailwind defaults), relaxed card padding (p-6/p-8), generous vertical rhythm
Radiusrounded-lg (8px) for cards, rounded-md (6px) for buttons/inputs, sharp edges for document previews
AnimationFramer Motion v11 โ€” page transitions, stepper wizard transitions, badge counter animations, scroll-triggered fade-ins
Icon SetLucide (FileText, Shield, Scale, CheckCircle, Download, User, Building2, Globe, AlertTriangle, ArrowRight)
Dark ModeClass-based toggle (next-themes via <ThemeProvider>), automatic system-preference detection, full dark palette (slate-900 bg, slate-100 text, muted indigo-400 primaries)
LayoutLeft sidebar nav (dashboard navigation) + main content area. The questionnaire wizard is full-width centered modal/sheet. Dashboard uses a card grid for policy listing.
ResponsiveMobile-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

  1. User completes questionnaire wizard (multi-step form, Zustand manages wizard state)
  2. 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
  3. 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
EnvironmentDBHostingPurpose
developmentLocal Neon branchlocalhost:3000Active development
productionNeon prod branchVercel productionLive 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

IDRequirementTarget
NFR-01Policy generation latency< 15 seconds (Gemini response + PDF render)
NFR-02Dashboard page load< 2 seconds (Vercel Edge + React Query cache)
NFR-03PDF download time< 3 seconds from click to Blob download
NFR-04Auth flow< 3 seconds (OAuth redirect + session creation)
NFR-05Uptime99.5% (Vercel SLA)
NFR-06Data privacyPolicy content stored in PostgreSQL, never shared with third parties beyond Gemini API processing
NFR-07Mobile responsivenessFull functional on mobile (320px+) โ€” wizard collapses to full-screen stepper
NFR-08SEOMarketing pages statically generated (SSG), semantic HTML, meta tags for each page
NFR-09Error handlingAll Server Actions wrapped in try/catch with user-friendly toast messages. Gemini failures show graceful "AI is thinking..." + retry button
NFR-10AccessibilityWCAG 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

StoryDescriptionPriority
US-1.1As a visitor, I can sign in with GitHub or Google OAuth so I can access the dashboardP0
US-1.2As a first-time user, I see an onboarding wizard that asks about my company so I can start generating policies immediatelyP0
US-1.3As a returning user, I land on my dashboard with my previous company data pre-loaded so I don't re-enter itP0
US-1.4As a power user, I can add multiple companies to my account so I can manage policies for different venturesP1
US-1.5As a user, I can edit my company profile (size, industry, locations) at any time so my policies stay accurateP1

Epic 2: Questionnaire Wizard (Core UX)

Est. time: ~4h

StoryDescriptionPriority
US-2.1As a user, I see a multi-step stepper (5 steps) so I can progress through company setup logicallyP0
US-2.2As a user, I can navigate back and forth between steps without losing my answers so I can correct mistakesP0
US-2.3As a user, I can see a progress indicator showing my completion % and current step so I know how far along I amP0
US-2.4As a user, I can select jurisdictions (states/countries) from a multi-select dropdown so my policies are location-specificP0
US-2.5As a user, I can select compliance frameworks (SOC2, ISO27001, GDPR, HIPAA) via toggle chips so policies are framework-alignedP1
US-2.6As a user, I can choose to generate a single policy type or "Generate All" so I have flexibilityP1

Epic 3: AI Policy Generation (Core Engine)

Est. time: ~5h

StoryDescriptionPriority
US-3.1As a user, I click "Generate" and see a loading state with estimated time so I know generation is happeningP0
US-3.2As a user, I receive a preview of the generated policy in formatted markdown so I can review it before downloadingP0
US-3.3As a user, the generated policy has jurisdiction-specific clauses and compliance framework annotations so I know it's not genericP0
US-3.4As a user, I can regenerate any existing policy with updated company data so I can iterateP1
US-3.5As a system, prompts are structured per-policy-type with legal guardrails so output is consistently high-qualityP0
US-3.6As a system, if Gemini API fails, the UI shows a friendly error with a retry button and logs the error to SentryP1

Epic 4: Dashboard & Policy Management

Est. time: ~4h

StoryDescriptionPriority
US-4.1As a user, I see a dashboard with all my generated policies as cards (type, date, version, status) so I can manage themP0
US-4.2As a user, I see a Compliance Readiness Score gauge at the top of my dashboard so I know my coverage at a glanceP0
US-4.3As a user, I can click a policy card to see the full markdown preview with highlighted compliance flags so I can review detailsP0
US-4.4As a user, I can filter/sort policies by type, framework, or date so I can find what I needP1
US-4.5As a user, I can delete policies I no longer need to keep my dashboard cleanP2

Epic 5: PDF Export & Branding

Est. time: ~3h

StoryDescriptionPriority
US-5.1As a user, I can download any generated policy as a professional PDF so I can share it with investors/employeesP0
US-5.2As a user, the PDF includes my company name, a cover page, and table of contents so it looks professionally draftedP0
US-5.3As a Business-tier user, PDFs include my custom brand colors and logo so they match my company identityP1
US-5.4As a user, I can download all my policies as a single ZIP archive so I can share my full compliance packageP2
US-5.5As a user, PDFs have page numbers and are print-friendly so I can produce physical copies if neededP1

Epic 6: Billing & Subscriptions (Revenue)

Est. time: ~3h

StoryDescriptionPriority
US-6.1As a visitor, I can view the pricing page with feature comparisons so I can choose my tierP0
US-6.2As a user, I can subscribe to Pro or Business tiers via LemonSqueezy checkout so I unlock premium featuresP0
US-6.3As a system, LemonSqueezy webhooks update user subscription status so access is correctly gatedP0
US-6.4As a Pro/Business user, my subscription badge shows in the dashboard so I know my plan statusP1
US-6.5As a user, I can cancel my subscription from the dashboard so I have control over billingP1

๐Ÿ’ฐ Pricing Model

FeatureFreePro ($19/mo)Business ($49/mo)
Policy types available3 (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

  1. Product Hunt โ€” launch with a strong demo GIF showing "15 policies in 5 minutes"
  2. Hacker News โ€” "Show HN: I built an AI that writes your startup's compliance policies in 5 minutes" โ€” founders love compliance hacks
  3. Indie Hackers โ€” audience of solo founders who need cost-effective compliance
  4. Twitter/X โ€” thread showing the pain: "Investors asked me for 12 policy docs. I couldn't afford a lawyer. So I built this."
  5. 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

PhaseActionTimeline
Pre-launchBuild social following with compliance tips threadWeek 1
LaunchProduct Hunt + Hacker News + Indie Hackers simultaneous pushDay 1
Week 1Founder outreach (DM 50 pre-seed founders, offer free Pro)Days 2โ€“7
Month 1Content marketing: 4 blog posts, 2 Twitter threads, 1 guest postMonth 1
Month 2Paid acquisition: Google Ads on "startup compliance documents" keywordsMonth 2

๐Ÿ“Š Success Metrics

MetricTarget (Month 1)Target (Month 3)How to Measure
Sign-ups200+1,000+PostHog
Policies generated800+5,000+Database count
Free โ†’ Paid conversion5% (10 paid)8% (80 paid)LemonSqueezy + DB
MRR$190โ€“$490$1,520โ€“$3,920LemonSqueezy dashboard
Questionnaire completion rate70%+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.03Cloud Console

โš ๏ธ Risks & Mitigations

RiskSeverityLikelihoodMitigation
AI-generated policies contain legal errors๐Ÿ”ด HighMediumInclude 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๐ŸŸก MediumMediumMonitor token usage per policy. Cache common sections. Optimize prompts for conciseness.
Competitors undercut on price๐ŸŸก MediumMediumBuild 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๐ŸŸก MediumMediumFree 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)๐ŸŸก MediumLowDisclose in TOS. Users can opt out of content storage. Consider future local model (Llama 3 via Together AI) for privacy-sensitive users.
Regulatory obsolescence๐ŸŸข LowLowVersion tracking + annual regeneration reminders. Prompt templates updated when laws change. Community-contributed jurisdiction updates.

๐Ÿข Competitors

CompetitorStrengthsWeaknessesPolicyCraft Advantage
UpCounsel / LegalZoomReal lawyers, legally binding$300โ€“$800/hr, 1โ€“2 week turnaround5 minutes vs 2 weeks, $19/mo vs $5K
Rocket LawyerSubscription legal serviceMonthly fee $40, limited policy templatesAI generates on-demand, not pre-written templates
Free templates (Google Docs / PandaDoc)Free, widely availableGeneric (not jurisdiction-aware), missing critical clauses, no compliance framework tagsJurisdiction-aware, framework-tagged, AI adapts to company specifics
Law InsiderLarge template libraryManual editing required, no AI generationOne-click generation with structured prompts, not copy-paste
ChatGPT "write me a policy"Free, fastNo structured output, no section guarantees, no PDF, no compliance flagsDedicated prompt templates per policy type, structured markdown, compliance annotations, polished PDFs
IroncladEnterprise CLM, contract lifecycleOverkill for startups, $50K+/yr minimumBuilt 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.