AI-First SaaS application for generating structured Product Requirement Documents (PRDs) and Business Requirement Documents (BRDs) from unstructured notes and ideas.
DocuSystem follows a multi-agent workflow architecture:
- Input: User provides unstructured text/audio transcript
- Intent Classifier: Analyzes input to determine document type (PRD vs BRD) and required workers
- Orchestrator: Creates JSON Knowledge Base state and spawns parallel tasks
- Worker Agents (Parallel):
- Agent A (Product): Writes User Stories, Problem Statements
- Agent B (Tech): Writes Schema, API endpoints, Non-functional requirements
- Agent C (Localization/Quality): Reviews text for "Global English" and clarity (Smartcat readiness)
- Combiner: Merges outputs into a cohesive Knowledge Base
- Markdown Generator: Converts JSON Knowledge Base to Markdown (view layer only)
- Source of Truth: JSON Knowledge Base is always the source of truth. Markdown is a view layer only.
- Separation of Concerns: Agent logic (server-side) is separated from UI state (client-side).
- Global English: All AI-generated content follows "Global English" standards for Smartcat compatibility.
- Type Safety: Strict TypeScript with no
anytypes.
- Framework: Next.js 14+ (App Router)
- Language: TypeScript
- Styling: Material UI (MUI) v5 with custom SaaS dashboard theme
- AI Backend: Vercel AI SDK (Core) for streaming and agent orchestration
- State Management: Zustand for managing JSON knowledge base
- External API: Napkin.ai (placeholder for infographic generation)
- Install dependencies:
npm install- Copy environment variables:
cp .env.example .env-
Add your API keys to
.env:- OpenAI API key (or other AI provider)
- Napkin.ai API key (optional)
-
Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
src/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes (server-side agent logic)
│ └── page.tsx # Main page
├── components/ # React components
│ └── layout/ # Three-panel layout components
├── lib/
│ ├── ai/ # AI agent implementations
│ │ └── agents/ # Intent Classifier, Orchestrator, Workers, Combiner
│ └── markdown/ # Markdown generator (view layer)
├── store/ # Zustand stores
├── theme/ # MUI theme configuration
└── types/ # TypeScript type definitions
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run type-check- Run TypeScript type checking
- Integrate Vercel AI SDK with actual AI models in worker agents
- Implement streaming responses for real-time updates
- Add audio transcript support
- Integrate Napkin.ai for infographic generation
- Add export functionality (PDF, Word, etc.)
- Implement document editing capabilities
- Add collaboration features