Skip to content

AI-powered Product Requirements Document (PRD) generator using Google Gemini. 3-step wizard interface with auto-fill and multiple export options.

Notifications You must be signed in to change notification settings

AungMyoKyaw/prd-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ AI PRD Creator

Live Demo Next.js TypeScript Tailwind CSS Buy Me A Coffee

An intelligent Product Requirements Document (PRD) generator powered by Google's Gemini AI. Transform your product ideas into comprehensive, professional PRDs in minutes with a beautiful Compact Neo-Brutalism design that features refined borders, optimized shadows, and efficient layouts.

🌐 Live Demo: https://ai-prd-creator.vercel.app/

✨ Features

🎯 Core Functionality

  • πŸ§™β€β™‚οΈ 3-Step Wizard Flow: Guided wizard interface (Input β†’ Generate β†’ Review) for streamlined PRD creation
  • πŸš€ Quick Start with AI: Describe your product idea in plain text and let AI auto-fill the entire form
  • πŸ“‹ Structured Form Input: Organized sections for all essential PRD components (9 sections including tech stack and constraints)
  • πŸ€– AI-Powered Generation: Generate complete, professional PRDs using Gemini AI (40+ models available)
  • πŸ” Full-Page PRD Viewer: Dedicated full-screen viewer with enhanced readability and navigation
  • πŸ“₯ Multiple Export Options: Download as Markdown or copy to clipboard with smart naming (productname_prd_date.md)
  • πŸ’Ύ Advanced Draft Management: Save and manage up to 12 PRD drafts with IndexedDB, localStorage fallback, and migration support
  • πŸ”„ Draft Loading: Load saved drafts with automatic state restoration and context preservation
  • πŸ“± Enhanced PWA: Full Progressive Web App support with install prompts and offline capabilities

🎨 Design & UX

  • 🎨 Compact Neo-Brutalism Design: Updated 2025 design system with refined borders (2px standard, 3px emphasis) and optimized spacing
  • 🌞 High-Contrast Interface: Clean, accessible design with vibrant accent colors (yellow #FFEB3B, blue #2196F3, pink #E91E63)
  • πŸ“± Fully Responsive: Optimized for desktop, tablet, and mobile with improved content density
  • πŸ“² Enhanced PWA Support: Install as a native app with smart install prompts and dismissal tracking
  • ⚑ Smooth Animations: Fluid transitions (150-250ms) and interactive hover states with reduced motion support
  • 🎯 Advanced Model Indicator: Always know which AI model you're using with display names and descriptions

πŸ€– AI Capabilities

  • πŸ”„ Dynamic Model Selection: Choose from 40+ Gemini models
  • πŸ“‘ Live Model Fetching: Auto-updates with latest models from Google
  • πŸŽ›οΈ Flexible Configuration: Customize API key and model preferences
  • ⏰ Contextual Prompts: All prompts include current date/time
  • 🎯 Smart Defaults: Pre-configured with Gemini 2.5 Flash
  • πŸ’Ύ Fallback Models: Works offline with 13 cached models

πŸ› οΈ Tech Stack

  • Framework: Next.js 15.5.4 with App Router
  • Language: TypeScript 5.9.2
  • Styling: Tailwind CSS 4.1.14 with Compact Neo-Brutalism design system
  • AI: Google Gemini API (@google/genai v1.21.0)
  • UI Components: Radix UI primitives for accessibility (Dialog, Scroll Area, Tabs, Tooltip)
  • Storage: IndexedDB with idb library v8.0.3 for saved drafts (12-draft limit with auto-migration)
  • Icons: Lucide React v0.544.0 + Radix Icons v1.3.1
  • Markdown: react-markdown v10.1.0 with remark-gfm v4.0.0 for GFM support
  • PWA: next-pwa v5.6.0 for Progressive Web App support with service worker caching
  • Document Export: jsPDF v3.0.3 and docx v9.2.2 (integrated)

πŸš€ Quick Start

Option 1: Use the Live Demo (Recommended)

No installation needed! Just visit https://ai-prd-creator.vercel.app/ and:

  1. Click the βš™οΈ settings icon
  2. Enter your Gemini API key (Get one here)
  3. Choose your preferred model (default: Gemini 2.5 Flash)
  4. Start creating PRDs!

Option 2: Local Development

  1. Clone the repository

    git clone https://github.com/yourusername/prd-creator.git
    cd prd-creator
  2. Install dependencies

    npm install
  3. Run the development server

    npm run dev
  4. Open your browser

    Navigate to http://localhost:3000

Note: The app stores your API key locally in your browser. It's never sent to any server except Google's Gemini API.

πŸ”‘ Getting Your Gemini API Key

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click "Get API Key" or "Create API Key"
  4. Copy the key and paste it in the settings modal
  5. Your key is stored locally in your browser's localStorage

Privacy: Your API key never leaves your browser except to call Google's Gemini API directly.

🎯 How It Works

flowchart TD
    A[βš™οΈ Initial Setup] --> B[Enter API Key and Select Model]
    B --> C[πŸ“ Step 1: Input]
    C --> D{Quick Start or Manual?}
    D -->|Quick Start| E[Enter Product Idea]
    D -->|Manual| F[Fill Form Manually]
    E --> G[Click Auto-fill with AI]
    G --> H[AI Populates All Form Fields]
    H --> I[Review & Edit Form]
    F --> I
    I --> J[Navigate to Step 2]
    J --> K[πŸ€– Step 2: Generate]
    K --> L[Click Generate PRD Button]
    L --> M[AI Generates Complete PRD]
    M --> N[πŸ‘οΈ Step 3: Review]
    N --> O{Export, Save, or View?}
    O -->|Export| P[πŸ“₯ Download as Markdown or πŸ“‹ Copy]
    O -->|Save| Q[πŸ’Ύ Save Draft to IndexedDB]
    O -->|View| R[πŸ” Open Full-Page Viewer]
    Q --> S[πŸ“š Access from Saved Drafts]
    S --> C
    style A fill:#4A90E2
    style C fill:#50C878
    style G fill:#9068BE
    style M fill:#D6A14D
    style P fill:#FF6B6B
    style Q fill:#FF9800
    style R fill:#4ECDC4
Loading

πŸ“± Progressive Web App (PWA)

AI PRD Creator is a fully installable Progressive Web App!

Installation

Desktop (Chrome, Edge, Brave):

  1. Click the install icon (βŠ•) in the address bar
  2. Or click "Install" button in settings
  3. App opens in its own window

Mobile (iOS Safari):

  1. Tap the Share button
  2. Select "Add to Home Screen"
  3. App appears like a native app

Mobile (Android Chrome):

  1. Tap the three-dot menu
  2. Select "Install App" or "Add to Home Screen"
  3. Launch from your home screen

PWA Features

  • βœ… Works offline (cached models)
  • βœ… Fast loading with service workers
  • βœ… Native app experience
  • βœ… No app store needed
  • βœ… Auto-updates on launch

🎨 Compact Neo-Brutalism Design System (2025 Update)

Inspired by Brutalist design principles, optimized for modern interfaces:

  • Refined Borders: Compact 2px black borders (3px for emphasis) for efficient visual hierarchy
  • Optimized Shadows: Refined offset shadows (2px 2px 0px standard, 4px 4px 0px emphasis) for depth
  • High-Contrast Colors: Vibrant palette with primary yellow (#FFEB3B), secondary blue (#2196F3), accent pink (#E91E63)
  • Interactive Elements: Pressable buttons with smooth transform animations (150-250ms)
  • Typography: Big Shoulders Display for headings, Inter for body text with optimized sizing
  • Responsive Design: Improved content density and mobile experience with compact layout
  • Accessibility: WCAG 2.1 Level AA compliant with 4.5:1 contrast ratios

πŸ€– AI Model Selection

Dynamic Model Fetching

The app automatically fetches the latest available models from Google's Gemini API:

  • 40+ models available
  • Real-time updates
  • Model descriptions and specs
  • Input/output token limits

Model Categories (Auto-sorted)

  1. Gemini 2.5 Flash - Lightning fast, 1M context (default)
  2. Gemini 2.5 Pro - Most capable, advanced reasoning
  3. Gemini 2.0 Flash - Previous generation, stable
  4. Gemini 2.0 Pro - Previous gen, high quality
  5. Specialized Models - Embedding, thinking, etc.

Fallback Models

If API fetch fails, the app uses 13 cached models:

  • Gemini 2.5 Flash (stable)
  • Gemini 2.5 Pro (stable)
  • Gemini 2.0 Flash variants
  • All essential models for PRD generation

Model Display

  • 🟒 Visual Indicator: Always shows current model in header
  • Display Names: Official model names from Google
  • Descriptions: Detailed info for each model
  • Smart Defaults: Pre-configured with best model

πŸ—οΈ Architecture

Project Structure

prd-creator/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ _lib/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ datetime.ts          # Date/time context helper
β”‚   β”‚   β”‚   β”‚   └── gemini-client.ts     # Gemini API client
β”‚   β”‚   β”‚   β”œβ”€β”€ generate/route.ts        # PRD generation endpoint
β”‚   β”‚   β”‚   β”œβ”€β”€ models/route.ts          # Model fetching endpoint
β”‚   β”‚   β”‚   β”œβ”€β”€ prefill/route.ts         # Form auto-fill endpoint
β”‚   β”‚   β”‚   └── refine/route.ts          # Section refinement endpoint
β”‚   β”‚   β”œβ”€β”€ layout.tsx                   # Root layout with PWA config
β”‚   β”‚   β”œβ”€β”€ page.tsx                     # Main application page
β”‚   β”‚   └── globals.css                  # Global styles
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ button.tsx                   # Reusable button component
β”‚   β”‚   β”œβ”€β”€ footer.tsx                   # App footer with copyright
β”‚   β”‚   β”œβ”€β”€ full-page-prd-viewer.tsx     # Full-screen PRD viewer
β”‚   β”‚   β”œβ”€β”€ header.tsx                   # Header with settings/drafts
β”‚   β”‚   β”œβ”€β”€ input-field.tsx              # Text input component
β”‚   β”‚   β”œβ”€β”€ loader.tsx                   # Loading spinner
β”‚   β”‚   β”œβ”€β”€ markdown-renderer.tsx        # Markdown display
β”‚   β”‚   β”œβ”€β”€ prd-display.tsx              # PRD viewer with export
β”‚   β”‚   β”œβ”€β”€ prd-form.tsx                 # Main form component
β”‚   β”‚   β”œβ”€β”€ prd-wizard.tsx               # 3-step wizard wrapper
β”‚   β”‚   β”œβ”€β”€ pwa-install-prompt.tsx       # PWA install button
β”‚   β”‚   β”œβ”€β”€ refine-modal.tsx             # Section refinement dialog
β”‚   β”‚   β”œβ”€β”€ saved-drafts-modal.tsx       # Draft management interface
β”‚   β”‚   β”œβ”€β”€ section.tsx                  # Form section wrapper
β”‚   β”‚   β”œβ”€β”€ settings-modal.tsx           # API key & model settings
β”‚   β”‚   └── textarea-field.tsx           # Multi-line input
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ drafts.ts                    # IndexedDB draft management
β”‚   β”‚   β”œβ”€β”€ download.ts                  # File download utilities
β”‚   β”‚   β”œβ”€β”€ ingest.ts                    # Data ingestion helpers
β”‚   β”‚   β”œβ”€β”€ models.ts                    # Gemini model definitions
β”‚   β”‚   β”œβ”€β”€ prd.ts                       # PRD type definitions
β”‚   β”‚   └── prompt.ts                    # AI prompt templates
β”‚   └── types/
β”‚       └── next-pwa.d.ts                # PWA type definitions
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ icon-*.png                       # PWA icons (192, 384, 512)
β”‚   β”œβ”€β”€ apple-touch-icon*.png            # Apple device icons
β”‚   β”œβ”€β”€ favicon*.{ico,png}               # Favicons
β”‚   β”œβ”€β”€ manifest.json                    # PWA manifest
β”‚   └── *.svg                           # Static SVG assets
β”œβ”€β”€ specs/                               # Project documentation
β”‚   β”œβ”€β”€ PBI.md                          # Product Backlog Items
β”‚   β”œβ”€β”€ PRD.md                          # Project PRD
β”‚   β”œβ”€β”€ README.md                       # Specs documentation
β”‚   β”œβ”€β”€ SDD.md                          # Software Design Document
β”‚   β”œβ”€β”€ SRS.md                          # Software Requirements
β”‚   └── UI-UX-DESIGN-GUIDELINES.md      # Design guidelines
β”œβ”€β”€ .editorconfig                        # Editor configuration
β”œβ”€β”€ .prettierignore                      # Prettier ignore rules
β”œβ”€β”€ .prettierrc                          # Prettier config
β”œβ”€β”€ eslint.config.mjs                    # ESLint configuration
β”œβ”€β”€ next.config.mjs                      # Next.js + PWA config
β”œβ”€β”€ package.json                         # Dependencies
β”œβ”€β”€ postcss.config.mjs                   # PostCSS config
└── tsconfig.json                        # TypeScript config

API Routes

POST /api/models

Fetches available Gemini models from Google API.

Request:

{
  apiKey: string;
}

Response:

{
  "models": [
    {
      "value": "gemini-2.5-flash",
      "label": "Gemini 2.5 Flash",
      "displayName": "Gemini 2.5 Flash",
      "description": "Fast and efficient...",
      "inputTokenLimit": 1048576,
      "outputTokenLimit": 65536
    }
  ]
}

POST /api/prefill

Auto-fills form from a product idea description.

Request:

{
  apiKey: string,
  model: string,
  productIdea: string
}

Response:

{
  "data": {
    "productName": "FitFinder",
    "targetAudience": "Health-conscious millennials...",
    "problemStatement": "...",
    "proposedSolution": "...",
    "coreFeatures": "...",
    "businessGoals": "...",
    "futureFeatures": "...",
    "techStack": "...",
    "constraints": "..."
  }
}

POST /api/generate

Generates a complete PRD from structured inputs.

Request:

{
  apiKey: string,
  model: string,
  inputs: {
    productName: string,
    targetAudience: string,
    problemStatement: string,
    proposedSolution: string,
    coreFeatures: string,
    businessGoals: string,
    successMetrics: string,
    futureFeatures: string,
    techStack: string,
    constraints: string,
    dependencies: string
  }
}

Response:

{
  "data": "# FitFinder\n\n## 1. Introduction & Vision\n\n..."
}

POST /api/refine

Refines a specific section based on user feedback.

Request:

{
  apiKey: string,
  model: string,
  currentInputs: { /* current form state */ },
  sectionTitle: string,
  userFeedback: string
}

Response:

{
  "data": {
    "productName": "...",
    "problemStatement": "...",
    "proposedSolution": "..."
  }
}

Date/Time Context

All AI prompts automatically include:

Current Date: January 21, 2025
Current Time: 3:45 PM PST

This ensures:

  • Time-relevant recommendations
  • Current technology suggestions
  • Accurate market context

πŸ’‘ Example Use Case

Product Idea: "A mobile app for finding and booking local fitness classes"

Quick Start Flow:

  1. Click βš™οΈ settings, enter your Gemini API key
  2. Step 1: Input - Enter the idea: "A mobile app for finding local fitness classes"
  3. Click "Auto-fill Form with AI ✨"
  4. AI generates:
    Product Name: FitFinder
    Target Audience: Health-conscious millennials aged 25-40...
    Problem Statement: People struggle to discover local fitness classes...
    Proposed Solution: A mobile app that aggregates...
    Core Features:
    - Interactive map view of nearby classes
    - Real-time availability
    - In-app booking
    - User reviews and ratings
    ...
    
  5. Review and adjust as needed
  6. Step 2: Generate - Click "Generate PRD" β†’ Get a comprehensive PRD!
  7. Step 3: Review - View PRD in full-page viewer or export
  8. πŸ“₯ Download as fitfinder_prd_2025-01-21.md or πŸ’Ύ save as draft

πŸš€ Building for Production

# Install dependencies
npm install

# Build the application
npm run build

# Start production server
npm start

# Or deploy to Vercel with one click
vercel deploy

πŸ§ͺ Development

# Run development server with Turbopack
npm run dev

# Run linting
npm run lint

# Build for production
npm run build

🌟 Key Features Explained

1. πŸ§™β€β™‚οΈ Wizard-Based Interface

A streamlined 3-step workflow that guides users through PRD creation:

  • Step 1: Input - Form with quick-start AI prefill or manual entry
  • Step 2: Generate - One-click PRD generation with Gemini AI
  • Step 3: Review - Full-screen viewer with export and save options
  • Progress indicators for clear navigation
  • Persistent state across steps with draft auto-save

2. πŸ’Ύ Advanced Draft Management

  • IndexedDB storage with idb library for persistent draft saving
  • Auto-migration from localStorage to IndexedDB with error handling
  • 12-draft limit with automatic cleanup and storage management
  • One-click loading of previous work with full state restoration
  • Delete functionality with confirmation dialogs
  • Metadata storage including creation date, model used, and content preview

3. πŸ€– Smart AI Integration

  • Dynamic model selection from 40+ Gemini models
  • Contextual prompts with date/time information
  • Structured JSON responses for consistency
  • Auto-fill feature for rapid form completion
  • Fallback models for offline reliability

4. πŸ“± PWA Capabilities

  • Installable on any device (desktop, iOS, Android)
  • Offline support with service workers
  • Fast loading with Workbox caching
  • Native app feel in standalone mode
  • Auto-updates on app launch
  • Smart install prompts with dismissal tracking

5. πŸ“₯ Export Options

  • Markdown download with smart file naming (productname_prd_YYYY-MM-DD.md)
  • One-click copy to clipboard with plain text formatting
  • Timestamped filenames for version control
  • Clean markdown format compatible with GitHub, GitLab, Notion, etc.

6. πŸ”’ Privacy First

  • Client-side API key storage (localStorage only)
  • No server-side key storage or logging
  • Direct API calls to Google Gemini only
  • No tracking or analytics or user data collection
  • Open source for full transparency
  • Browser-only storage with user control over data deletion

🎨 Neo-Brutalism Design System

Color Palette

/* Primary Colors */
--primary-blue: #2196f3 /* Material Blue */ --success-green: #4caf50
  /* Material Green */ --warning-yellow: #ffeb3b /* Material Yellow */
  --error-red: #f44336 /* Material Red */ --neutral-white: #ffffff
  /* Pure White */ --neutral-gray: #f5f5f5 /* Light Gray */
  /* Design Elements */ --border-black: #000000 /* Black borders */
  --shadow-black: rgba(0, 0, 0, 1) /* Black shadows */;

Design Patterns

/* Neo-Brutalist Button */
border: 3px solid var(--border-black);
box-shadow: 4px 4px 0px var(--shadow-black);
transition: all 150ms ease;

/* Hover State */
box-shadow: 6px 6px 0px var(--shadow-black);
transform: translate(-2px, -2px);

/* Active State */
box-shadow: 2px 2px 0px var(--shadow-black);
transform: translate(2px, 2px);

πŸ“Š Component Architecture

State Management

// Main application state
const [apiKey, setApiKey] = useState<string>('');
const [selectedModel, setSelectedModel] = useState<string>('gemini-2.5-flash');
const [modelDisplayName, setModelDisplayName] =
  useState<string>('Gemini 2.5 Flash');
const [productIdea, setProductIdea] = useState<string>('');
const [formInputs, setFormInputs] = useState<FormInputs>({});
const [generatedPRD, setGeneratedPRD] = useState<string>('');
const [isGenerating, setIsGenerating] = useState<boolean>(false);

Data Flow

User Input β†’ Form State β†’ API Call β†’ Gemini AI β†’ Response β†’ Display
     ↓                         ↓                      ↓
localStorage            Date/Time Context      Markdown Render
                        Model Selection         Copy/Download

πŸ”§ Configuration

No Environment Variables Required!

The app uses client-side configuration only:

  • API keys stored in browser localStorage
  • Model preferences saved locally
  • No .env file needed
  • No server-side secrets

Optional Server Deployment Variables

If you want to provide a default API key (not recommended):

# .env.local (optional, not recommended)
NEXT_PUBLIC_GEMINI_API_KEY=your_key_here

πŸ“± PWA Installation Guide

Desktop

  1. Visit https://ai-prd-creator.vercel.app/
  2. Look for install icon in address bar (βŠ•)
  3. Click "Install" or use settings button
  4. App opens in standalone window

iOS (Safari)

  1. Open in Safari browser
  2. Tap Share button (square with arrow)
  3. Scroll down, tap "Add to Home Screen"
  4. Tap "Add" in top right
  5. App icon appears on home screen

Android (Chrome)

  1. Open in Chrome browser
  2. Tap three-dot menu
  3. Tap "Install app" or "Add to Home Screen"
  4. Confirm installation
  5. Launch from home screen or app drawer

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Test thoroughly (npm run dev)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Guidelines

  • Follow existing code style
  • Add TypeScript types for all new code
  • Test on desktop and mobile
  • Ensure PWA functionality works
  • Update documentation if needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

🌐 Live Demo

Visit: https://ai-prd-creator.vercel.app/

Features to Try:

  1. βš™οΈ Configure your API key (free from Google AI Studio)
  2. πŸ§™β€β™‚οΈ Follow the 3-step wizard (Input β†’ Generate β†’ Review)
  3. πŸš€ Use Quick Start to auto-fill a form
  4. πŸ€– Generate comprehensive PRD with AI
  5. πŸ” View PRD in full-page viewer
  6. πŸ’Ύ Save drafts to browser storage with IndexedDB
  7. πŸ“š Manage and load saved drafts
  8. πŸ“₯ Download PRD as Markdown or copy to clipboard
  9. πŸ“± Install as PWA on your device

Made with ❀️ using Gemini AI

Deploy with Vercel

About

AI-powered Product Requirements Document (PRD) generator using Google Gemini. 3-step wizard interface with auto-fill and multiple export options.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •