Connect your GitHub. Get beautiful, AI-generated documentation instantly.
Docs that don't look boring.
Website • Features • How It Works • Quickstart • Templates • Tech Stack
Every developer knows the pain: you build something great, but writing the docs feels like a second full-time job. So you don't. Your README stays a one-liner, your API has no reference, and your users bounce.
WhatDoc fixes this. Connect your GitHub, import a repo, pick a template, and get production-ready documentation in under 60 seconds.
| Feature | Description | |
|---|---|---|
| 🧠 | Smart Code Ingestion | Shallow-clones your repo, walks the directory tree, filters noise (lockfiles, dist, tests), and compresses source via a regex-based minifier before sending to the LLM. |
| 🎨 | 4 Pro Templates | Choose from Twilio, Django, MDN, or AeroLaTeX-inspired themes. Every template is responsive, dark-mode ready, and gorgeous. |
| 🌐 | Custom Subdomains | Every project gets its own yourproject.whatdoc.xyz subdomain — instant shareable docs. |
| 🔑 | BYOK (Bring Your Own Key) | Plug in your Gemini API key for unthrottled, limit-free generation. Stored in local storage, never touches our servers. |
| 🔗 | GitHub OAuth | Connect your GitHub, import repos (public or private), and generate docs in one flow. |
| ✏️ | Live Editor | Edit your generated documentation in a rich markdown editor. Changes save instantly. |
| 🚀 | One-Click Deploy | Generate → customize → deploy. Your docs go live at a permanent URL in seconds. |
| 🧪 | API Playground | Test API endpoints directly from your documentation page — auto-generated from backend routes. |
| ✂️ | Token Guillotine | Caps free-tier payloads at ~200k tokens with a smart file-boundary cutoff. BYOK users get the full context window. |
| ⌨️ | Command Palette | Power-user keyboard shortcuts for fast navigation. |
WhatDoc uses a multi-stage pipeline to go from raw repo → polished docs:
┌┐
│ │
│ ① Shallow Clone ② Code Ingestion ③ LLM Call │
│ ── ── ── │
│ simple-git depth-1 Walk dir tree, Gemini │
│ to /tmp, ephemeral filter noise files, generates │
│ regex-minify each, README + │
│ concatenate all API ref │
│ │
│ ④ Cleanup & Render │
│ ── │
│ Nuke cloned files, │
│ save markdown to DB, │
│ render with chosen │
│ React template │
│ │
└┘
Key design decisions:
- Ephemeral clones — Repos are cloned to
/tmp, parsed, and deleted. Nothing persists on disk. - Regex Guillotine — Strips block comments, consecutive
//runs, base64 blobs, long string literals, and collapses blank lines before sending to the LLM. Keeps token count lean. - Paradigm-aware prompting — The system prompt instructs Gemini to detect the repo type (REST API vs frontend vs CLI) and adapt the doc structure accordingly.
- Fat-Trimmer blocklist — Lockfiles,
dist/,__tests__/,.min.js, source maps, and existing READMEs are all excluded automatically. - Round-robin key rotation — Free-tier requests rotate across multiple Gemini API keys to avoid 429s. BYOK bypasses this entirely.
- Retry with exponential backoff — Rate-limited requests retry up to 3 times with 15s → 30s → 60s delays.
| Twilio API-first dark layout with sidebar nav |
Django Classic two-column docs with TOC |
MDN Reference-style with breadcrumbs |
AeroLaTeX Academic glassmorphic on paper-white |
- Node.js 18+
- MongoDB (local or Atlas)
- Gemini API Key — Get one free
git clone https://github.com/herin7/whatdoc.xyz.git
cd whatdoc.xyzcd server
npm installCreate a .env file:
MONGO_URI=mongodb://localhost:27017/whatdoc
JWT_SECRET=your-secret-key
GEMINI_API_KEY=your-gemini-key
PORT=3000
CLIENT_URL=http://localhost:5173
CORS_ORIGINS=http://localhost:5173,http://localhost:4173
APP_DOMAIN=localhostStart the server:
npm startcd ../client
npm installCreate a .env file:
VITE_API_URL=http://localhost:3000
VITE_APP_DOMAIN=localhost:5173Start the dev server:
npm run devOpen http://localhost:5173 and you're live. 🎉
| Tech | Purpose |
|---|---|
| React 19 | UI framework |
| Vite | Build tool & dev server |
| TailwindCSS | Utility-first styling |
| React Router | Client-side routing |
| Lucide Icons | Icon system |
| React Markdown | Markdown rendering |
| React Syntax Highlighter | Code blocks |
| Tech | Purpose |
|---|---|
| Express 5 | HTTP server |
| MongoDB + Mongoose | Database & ODM |
| Gemini API | AI-powered doc generation |
| simple-git | Ephemeral repo cloning |
| ignore | .gitignore-aware file filtering |
| JWT + bcrypt | Authentication |
| Zod | Schema validation |
whatdoc.xyz/
├── client/ # React frontend
│ ├── src/
│ │ ├── app/ # Landing page
│ │ ├── components/ # Reusable UI components
│ │ ├── config/ # Template registry
│ │ ├── context/ # Auth context provider
│ │ ├── lib/ # API client & utilities
│ │ ├── pages/ # Route pages
│ │ └── templates/ # Doc display templates
│ └── public/ # Static assets
│
├── server/ # Express backend
│ ├── controllers/ # Route handlers
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API routes
│ ├── services/ # Engine & LLM logic
│ ├── middlewares/ # Auth middleware
│ └── utils/ # Key rotation manager
│
└── README.md
Contributions are welcome! Here's how:
- Fork the repo
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to branch (
git push origin feat/amazing-feature) - Open a Pull Request
This project is open source under the MIT License.
Built by @herin7
If WhatDoc helped you, consider giving it a ⭐
