Skip to content

Repository files navigation

DocuSystem

AI-First SaaS application for generating structured Product Requirement Documents (PRDs) and Business Requirement Documents (BRDs) from unstructured notes and ideas.

Architecture

DocuSystem follows a multi-agent workflow architecture:

  1. Input: User provides unstructured text/audio transcript
  2. Intent Classifier: Analyzes input to determine document type (PRD vs BRD) and required workers
  3. Orchestrator: Creates JSON Knowledge Base state and spawns parallel tasks
  4. 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)
  5. Combiner: Merges outputs into a cohesive Knowledge Base
  6. Markdown Generator: Converts JSON Knowledge Base to Markdown (view layer only)

Key Principles

  • 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 any types.

Tech Stack

  • 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)

Getting Started

  1. Install dependencies:
npm install
  1. Copy environment variables:
cp .env.example .env
  1. Add your API keys to .env:

    • OpenAI API key (or other AI provider)
    • Napkin.ai API key (optional)
  2. Run the development server:

npm run dev
  1. Open http://localhost:3000 in your browser.

Project Structure

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

Development

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run type-check - Run TypeScript type checking

Next Steps

  1. Integrate Vercel AI SDK with actual AI models in worker agents
  2. Implement streaming responses for real-time updates
  3. Add audio transcript support
  4. Integrate Napkin.ai for infographic generation
  5. Add export functionality (PDF, Word, etc.)
  6. Implement document editing capabilities
  7. Add collaboration features

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages