Inspiration
Every developer knows the pain: you write beautiful code, but the documentation is always outdated, incomplete, or simply nonexistent. We found ourselves constantly choosing between shipping features and updating docs. We wondered: what if documentation could maintain itself?
The rise of AI code assistants inspired us to flip the script—instead of AI helping write code, what if it helped explain code? That's when GitDoc was born.
What it does
GitDoc is an AI-powered documentation generator that automatically creates and maintains professional documentation for your GitHub repositories.
Key features:
- One-click GitHub integration - Connect your repos via OAuth and let GitDoc analyze your codebase
- AI-generated docs - Generates 6 types of documentation: Project Overview, Getting Started, Architecture, API Reference, Configuration, and Contributing guides
- Auto-sync on commits - Detects new commits and prompts you to regenerate docs to stay current
- Edit & export - Modify generated markdown directly in-browser and export as a ZIP archive
- Repository management - Star important repos, soft-delete others, and track documentation completeness
How we built it
Frontend:
- React + TypeScript for a type-safe, component-driven UI
- Tailwind CSS with a custom "Terminal Noir" design system (phosphor green on dark, monospace typography, grid patterns, subtle scan lines)
- Radix UI primitives for accessible dialogs, tabs, and dropdowns
Backend:
- Lovable Cloud (Supabase) for auth, database, and edge functions
- PostgreSQL for storing repositories, documentation entries, and sync history
- Deno-based Edge Functions for secure API calls
AI Layer:
- Google Gemini 2.5 Flash via Lovable AI Gateway for documentation generation
- Prompt-per-section strategy to handle long-form content without truncation
Integrations:
- GitHub OAuth for secure repository access
- GitHub API for fetching README, package.json, file trees, and commit history
Challenges we ran into
OAuth callback race conditions - React's StrictMode caused duplicate token exchanges, leading to "bad_verification_code" errors. We solved this with a
useRefguard.AI output truncation - Initial JSON-wrapped responses were getting cut off. We switched to raw markdown output with a
max_tokens: 2000limit per section.Responsive dialog overflow - Long repository lists broke out of modal bounds. Fixed with
max-h-[85vh]constraints and proper CSS grid rows.Balancing AI context limits - GitHub repos can have thousands of files. We strategically slice file trees (80 items max) and truncate README/package.json to fit context windows.
Accomplishments that we're proud of
- The "Terminal Noir" aesthetic - A genuinely unique brutalist-monospace design that makes the app memorable
- Seamless GitHub flow - From OAuth to doc generation in under 60 seconds
- Real auto-sync - The app actually checks for new commits and notifies users, not just a demo feature
- Full CRUD for docs - Edit, delete individual sections, or clear all and regenerate
- Production-ready export - One click to download a ZIP of all your docs as
.mdfiles
What we learned
- AI prompting is an art - Small changes in prompt structure dramatically affect output quality
- Edge functions are powerful - Serverless Deno functions handle complex GitHub+AI orchestration elegantly
- Design systems matter - Committing to a bold aesthetic (Terminal Noir) early made every decision easier
- OAuth is tricky - Token exchange, storage, and refresh require careful handling
What's next for GitDoc
- Webhook-triggered regeneration - Auto-generate docs on every push without user intervention
- Diff-aware updates - Only regenerate sections affected by recent commits
- Custom doc templates - Let users define their own section types and prompts
- Team collaboration - Shared workspaces with role-based access
- VS Code extension - Generate docs without leaving your editor
- Multiple AI models - Support for GPT, Claude, and open-source alternatives
Built With
Frontend: React, TypeScript, Tailwind CSS, Radix UI, Lucide Icons
Backend: Lovable Cloud, Supabase, PostgreSQL, Deno Edge Functions
AI: Google Gemini 2.5 Flash (via Lovable AI Gateway)
Integrations: GitHub OAuth, GitHub REST API
Libraries: React Router, TanStack Query, JSZip, ReactMarkdown, Prism.js
Design: JetBrains Mono, Custom "Terminal Noir" design system
Built With
- api
- deno-edge-functions-ai-google-gemini-2.5-flash-(via-lovable-ai-gateway)-integrations-github-oauth
- github
- github-oauth
- github-rest-api-libraries-react-router
- jetbrains
- jszip
- lovable-cloud
- lucide
- lucide-icons-backend-lovable-cloud
- postgresql
- prism.js
- prism.js-design-jetbrains-mono
- radix-ui
- react
- react-router
- reactmarkdown
- rest
- tailwind-css
- tanstack-query
- typescript
Log in or sign up for Devpost to join the conversation.