AI-Powered Documentation that Writes Itself
Stop writing docs. Start shipping code.
Features β’ Quick Start β’ Architecture β’ Documentation β’ Contributing
Developers hate writing documentation. It's tedious, time-consuming, and always seems to fall behind the code. Existing solutions require manual effort or produce generic, unhelpful docs.
DocGenie uses AI to automatically generate, update, and organize your documentation by analyzing your actual codebase. It understands your API routes, extracts meaningful descriptions, and creates beautiful, searchable documentation β all without you writing a single line of docs.
We tested DocGenie on a production codebase with 31 API routes. The total cost? Less than $0.20 using GPT-5 mini. That's less than a cent per endpoint for comprehensive, accurate documentation.
- Auto-detects API routes from Express.js, Fastify, NestJS, and more
- Extracts parameters, responses, and descriptions from your actual code
- Generates OpenAPI-compatible documentation automatically
- Creates quick-start guides based on your actual codebase
- AI categorizes documents into API, Guides, Reference, Architecture, etc.
- Sub-categorization groups related endpoints (e.g., all user endpoints together)
- Automatic organization β no manual tagging required
- Natural language search powered by OpenAI embeddings
- "How do I create a user?" finds the relevant API docs instantly
- Vector-based similarity for accurate results
- Write docs in Markdown with [[wiki-style]] linking
- Bidirectional links automatically tracked
- Frontmatter support for metadata
- Clean, modern documentation site β zero configuration
- Dark/Light themes
- Responsive design for all devices
- Searchable, navigable documentation
- Drop-in setup for any Node.js project
- File watcher for real-time doc updates
- Git integration for version tracking
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DocGenie β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Frontend β β Backend β β AI Layer β β
β β (React) βββββΊβ (Express) βββββΊβ (OpenAI) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β β β β
β β βββββββββ΄ββββββββ β β
β β β β β β
β β ββββββββΌβββββββ ββββββββΌβββββββ β β
β β β SQLite β β File Watcherβ β β
β β β (WAL mode) β β (Chokidar) β β β
β β βββββββββββββββ βββββββββββββββ β β
β β β β
β β βββββββββββββββββββββββββββββ β
β β β β
β ββββββββΌββββββββββββΌβββββββββββββββββββββββββββββββββββββββ β
β β Your Codebase β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β β β API Routes β β Markdown β β Config β β β
β β β (JS/TS) β β Docs β β Files β β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Code Scanning: DocGenie watches your codebase for API routes and markdown files
- AI Analysis: When changes are detected, AI analyzes the code and generates documentation
- Smart Organization: Documents are automatically categorized and linked
- Instant Search: Embeddings enable semantic search across all documentation
- Beautiful Output: A clean documentation site is served instantly
- Node.js 18+ or Bun
- OpenAI API key
# Clone the repository
git clone https://github.com/mry0tt4/DocGenie.git
cd DocGenie
# Install dependencies
bun install
# Set up environment
cp backend/.env.example backend/.env
# Add your OPENAI_API_KEY to backend/.env
# Start the development servers
bun devEdit backend/.env:
# Required: Your OpenAI API key
OPENAI_API_KEY=sk-...
# Optional: Path to your documentation (default: ./docs)
REPO_PATH=./docs
# Optional: Path to your API code for auto-detection
PROJECT_CODE_PATH=./src
# Server port
PORT=3001- Add markdown files to your
docs/folder - DocGenie automatically syncs and categorizes them
- View your docs at
http://localhost:5173
- Set
PROJECT_CODE_PATHto your API source code - Enable API documentation in settings
- DocGenie scans your routes and generates documentation automatically
DocGenie analyzes your API routes and generates comprehensive documentation including:
- HTTP methods and endpoints
- Request/response schemas
- Path and query parameters
- Authentication requirements
- Example requests
Documents are automatically categorized into:
- API Reference - Endpoint documentation
- Guides - Tutorials and how-tos
- Reference - Configuration and schemas
- Architecture - System design docs
- Changelog - Version history
Powered by OpenAI embeddings, search understands context:
- "How do I authenticate?" β Finds auth-related docs
- "Create a new user" β Finds user creation endpoints
Link documents using [[wiki-style]] links:
Check out the [[API Reference]] for more details.
See [[User Management]] for user-related endpoints.Add metadata to your markdown files:
---
title: My Document
category: guide
tags: [tutorial, getting-started]
---
# My Document
...| Component | Technology |
|---|---|
| Frontend | React, Vite, Lucide Icons |
| Backend | Express.js, SQLite (WAL) |
| AI | OpenAI GPT-5 mini, text-embedding-3-small |
| File Watching | Chokidar |
| Markdown | marked, gray-matter |
Real-world testing on a production codebase:
| Metric | Value |
|---|---|
| API Routes Documented | 31 |
| Total Tokens Used | ~50,000 |
| Total Cost (GPT-5 mini) | $0.18 |
| Cost per Endpoint | $0.006 |
Costs may vary based on code complexity and documentation depth.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-5 mini and embedding models
- The open-source community for inspiration and tools
Made with β€οΈ for developers who hate writing docs

