DaemonDoc is an AI-powered documentation platform that automatically generates, updates, and cleans up GitHub README.md files. By integrating with GitHub webhooks, BullMQ queues, and Gemini LLM provider chains, DaemonDoc analyzes commit diffs and repository code structure to keep project documentation continuously synchronized with codebase changes.
- Webhook-Driven Synchronization: Automatically listens for GitHub
pushevents on repository default branches to trigger documentation updates. - Smart Generation & Patching: Detects whether a full README generation or section-level patch is needed, updating only changed documentation sections while preserving existing content.
- AST & Section Parsing: Uses SHA-256 section hashing and deterministic section re-anchoring to prevent hallucinated headings or structure loss.
- Automated README Cleanup: AI-assisted cleanup pipeline to reformat, restructure, and remove clutter or template boilerplate from existing README files.
- Resilient LLM Provider Infrastructure: Implements Gemini models (
gemini-3.5-flash-liteandgemini-3.6-flash) with multi-API key rotation and fallback logic. - Real-Time Live Streaming Logs: Powered by Convex to stream job progress logs directly to the user dashboard.
- Asynchronous Queue Architecture: Built with BullMQ and Redis to execute non-blocking, queued background jobs for generation, cleanup, and email broadcasts.
- Admin Control Center: Built-in system analytics, user management, and broadcast update email functionality using Resend templates.
- Node.js:
>=20 - Package Manager:
pnpm@10.20.0 - Database: MongoDB instance
- Cache & Queue: Redis server
- Real-time Backend: Convex project deployment
- Authentication: GitHub OAuth App credentials
DaemonDoc/
├── client/ # Vite + React 19 dashboard application (app.daemondoc.online)
├── seo-client/ # Next.js 16 marketing and landing site (daemondoc.online)
├── server/ # Express 5 backend server, BullMQ workers, LLM logic, and API routes
├── convex-server/ # Convex server functions and schema for live streaming logs
├── docker-compose.yml# Container configuration
└── pnpm-workspace.yaml# Monorepo workspace configuration
Clone the repository and install dependencies across all workspace packages:
pnpm run install:allDaemonDoc requires environment variables configured across its server, client, and Convex environments.
PORT=3000
MONGO_URI=mongodb://localhost:27017/daemondoc
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_USERNAME=default
JWT_SECRET=your_jwt_secret
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_CALLBACK_URL=http://localhost:3000/auth/github/callback
GITHUB_WEBHOOK_SECRET=your_github_webhook_secret
GITHUB_TOKEN_SECRET=hex_encoded_32_byte_key
BACKEND_URL=http://localhost:3000
FRONTEND_URL=http://localhost:5173
CONVEX_URL=https://your-convex-deployment.convex.cloud
GEMINI_API_KEY1=your_gemini_key_1
GEMINI_API_KEY2=your_gemini_key_2
GEMINI_API_KEY3=your_gemini_key_3
RESEND_API_KEY=your_resend_api_keyVITE_BACKEND_URL=http://localhost:3000
VITE_CONVEX_URL=https://your-convex-deployment.convex.cloud
VITE_MARKETING_URL=http://localhost:3001
VITE_PUBLIC_POSTHOG_PROJECT_TOKEN=your_posthog_token
VITE_PUBLIC_POSTHOG_HOST=https://app.posthog.comNEXT_PUBLIC_APP_URL=http://localhost:5173Run all applications (client, seo-client, and server) concurrently in development mode:
pnpm run devAlternatively, run specific services individually:
pnpm run dev:clientpnpm run dev:serverpnpm run dev:seopnpm run dev:convexTo build all workspace packages:
pnpm run buildTo build specific clients:
pnpm run build:clientpnpm run build:seoStart the production Express server:
pnpm run start:serverRun linter checks across all packages:
pnpm run lintRun TypeScript type checks:
pnpm run typecheckCheck or format code formatting using Prettier:
pnpm run format:checkpnpm run format:writeGET /auth/github: Redirects user to GitHub OAuth authorization.GET /auth/github/callback: Handles GitHub OAuth callback and issues JWT.POST /auth/verify: Verifies active JWT session.DELETE /auth/delete: Deletes user account and associated webhooks.
GET /api/github/getGithubRepos: Retrieves user's accessible GitHub repositories.POST /api/github/addRepoActivity: Connects a repository, sets up GitHub webhooks, and triggers initial README generation.POST /api/github/deactivateRepoActivity: Deactivates repository sync and removes webhooks.POST /api/github/webhookhandler: Webhook receiver for GitHubpushevents.GET /api/github/fetchUserLogs: Fetches recent execution logs for the authenticated user.POST /api/github/cleanUpReadme: Enqueues an asynchronous README cleanup job.
GET /api/github/admin/analytics: Retrieves platform analytics, job status breakdowns, and active repository statistics (Requires Admin).GET /api/github/admin/users: Retrieves paginated user directory (Requires Admin).GET /api/email/recipients: Fetches eligible recipient list for broadcast emails (Requires Admin).POST /api/email/send: Enqueues product update broadcast jobs to selected users (Requires Admin).GET /api/email/queue-status: Returns BullMQ email broadcast queue statistics (Requires Admin).
ISC License