An intelligent web application that guides users through creating comprehensive Product Requirements Documents (PRDs) via conversational AI. The system extracts necessary information through targeted questioning, validates responses, and generates professional PRDs in markdown format.
- Conversational AI Interface: Natural language interaction for information gathering
- Section-by-Section Workflow: Guided progression through 7 key PRD sections
- Intelligent Validation: Quality scoring (0-100) with adaptive questioning
- Real-time Preview: Live PRD generation with editing capabilities
- Context Persistence: Information carries across sections to prevent redundancy
- Export Functionality: Export to Markdown, with PDF support planned
- Introduction/Overview - Product description, problem statement, value proposition
- Goals/Objectives - Business objectives and success criteria
- Target Audience - User personas, demographics, market analysis
- User Stories - Feature requirements in user story format
- Functional Requirements - Detailed technical specifications
- Success Metrics - KPIs, measurement methods, targets
- Open Questions - Risks, assumptions, future considerations
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend UI ββββββΆβ Backend API ββββββΆβ AI Service β
β (React/Next.js)βββββββ (Node.js/Express)βββββββ (OpenAI) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β State Manager β β Database β
β (Zustand) β β (PostgreSQL) β
βββββββββββββββββββ ββββββββββββββββββββ
- Framework: Node.js with Express
- Database: PostgreSQL with Sequelize ORM
- Cache: Redis for session management
- AI Integration: OpenAI API
- Authentication: JWT with bcrypt
- Validation: Joi for input validation
- Testing: Jest with Supertest
- Framework: React with Next.js
- State Management: Zustand + React Query
- Styling: Tailwind CSS
- UI Components: Custom components with Lucide icons
- Markdown: React Markdown with syntax highlighting
- Testing: Jest with React Testing Library
- Containerization: Docker with Docker Compose
- Development: Hot reload for both frontend and backend
- Database: PostgreSQL and Redis containers
- Reverse Proxy: Nginx (production)
- Node.js 18+ and npm 8+
- Docker and Docker Compose
- OpenAI API key
git clone <repository-url>
cd prd-maker
# Copy environment variables
cp .env.example .env
# Edit .env file with your configuration
# REQUIRED: Add your OpenAI API key# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Access applications
# Frontend: http://localhost:3000
# Backend API: http://localhost:3001
# Database: localhost:5432cd backend
npm install
# Setup database
npm run db:migrate
npm run db:seed
# Start development server
npm run devcd frontend
npm install
# Start development server
npm run dev# Backend tests
cd backend
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
# Frontend tests
cd frontend
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report# Linting
npm run lint # Check code style
npm run lint:fix # Fix auto-fixable issues
# Formatting
npm run format # Format code with Prettier
# Type checking (frontend)
npm run type-check # TypeScript type checkingcd backend
# Run migrations
npm run db:migrate
# Seed database
npm run db:seed
# Create new migration
npx sequelize-cli migration:generate --name migration-name
# Create new seed
npx sequelize-cli seed:generate --name seed-nameKey configuration options (see .env.example for complete list):
# Required
OPENAI_API_KEY=sk-your-openai-api-key-here
DATABASE_URL=postgresql://user:password@localhost:5432/prd_generator
JWT_SECRET=your-jwt-secret-key
# Optional
NODE_ENV=development
PORT=3001
REDIS_URL=redis://localhost:6379OPENAI_MODEL=gpt-4 # AI model to use
OPENAI_TEMPERATURE=0.7 # Response creativity (0-1)
OPENAI_MAX_TOKENS=2000 # Response length limit
AI_RATE_LIMIT_PER_HOUR=100 # API rate limitingprd-maker/
βββ backend/ # Node.js API server
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ services/ # Business logic
β β βββ models/ # Database models
β β βββ routes/ # API routes
β β βββ middleware/ # Express middleware
β β βββ utils/ # Helper utilities
β β βββ config/ # Configuration files
β βββ tests/ # Backend tests
β βββ package.json
βββ frontend/ # React/Next.js application
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ services/ # API clients
β β βββ utils/ # Helper utilities
β β βββ styles/ # CSS and styling
β βββ public/ # Static assets
β βββ tests/ # Frontend tests
β βββ package.json
βββ shared/ # Shared TypeScript types
β βββ types/
βββ docker-compose.yml # Development environment
βββ .env.example # Environment template
βββ README.md
POST /api/sessions- Create new PRD sessionGET /api/sessions/:id- Get session detailsPUT /api/sessions/:id- Update sessionDELETE /api/sessions/:id- Delete session
POST /api/sessions/:id/messages- Process user messageGET /api/sessions/:id/context- Get conversation contextPOST /api/sessions/:id/sections/:sectionId/validate- Validate section
POST /api/sessions/:id/generate-prd- Generate final PRDGET /api/sessions/:id/prd/preview- Get PRD previewGET /api/sessions/:id/prd/export- Export PRD
The system implements intelligent validation with quality scoring:
- Completeness: Presence of required information
- Specificity: Concrete details vs vague statements
- Relevance: Alignment with question intent
- Clarity: Structure and readability
- Each section has specific validation criteria
- Minimum quality thresholds per question type
- Maximum 2 clarification attempts before acceptance
- Context-aware validation to prevent redundancy
# Build both applications
docker-compose -f docker-compose.yml -f docker-compose.prod.yml build
# Deploy with production configuration
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d# Staging
docker-compose -f docker-compose.yml -f docker-compose.staging.yml up -d
# Production
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d# View all logs
docker-compose logs -f
# Service-specific logs
docker-compose logs -f backend
docker-compose logs -f frontend
docker-compose logs -f postgres- Backend:
http://localhost:3001/health - Frontend:
http://localhost:3000/api/health - Database: Check via adminer or direct connection
- Application metrics:
/metricsendpoint - Database performance: Built-in PostgreSQL monitoring
- Redis monitoring: Redis CLI or GUI tools
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and add tests
- Run quality checks:
npm run lint && npm test - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Submit a pull request
- Follow the existing code style and patterns
- Write tests for new functionality
- Update documentation for API changes
- Use meaningful commit messages
- Ensure all tests pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
- Create an issue for bugs or feature requests
- Check existing issues before creating new ones
- Provide detailed reproduction steps for bugs
- Include environment details and logs when applicable
- β Core conversation engine
- β Basic PRD generation
- β Section-by-section workflow
- π Validation and quality scoring
- π Multi-format export (PDF, DOCX)
- π₯ Team collaboration features
- π Advanced analytics and insights
- π¨ Custom PRD templates
- π€ Voice input support
- π Integration with project management tools
- π Industry-specific PRD templates
- π€ Advanced AI suggestions and analysis
For detailed implementation guides and API documentation, see the /docs directory (coming soon).