Turn any GitHub repository into professional documentation in seconds!
Live Demo โข Features โข Demo โข Tech Stack โข Architecture โข Quick Start
Documentation is the most neglected yet crucial part of any software project.
| The Problem | Impact |
|---|---|
| ๐ Writing docs is time-consuming | Developers skip it entirely |
| ๐ Docs become outdated quickly | Users get confused, issues pile up |
| ๐ด It's tedious and boring | Quality suffers, incomplete information |
| ๐ New contributors struggle | Onboarding takes weeks instead of days |
- 91% of developers say good documentation is important
- Only 44% of projects have adequate documentation
- Poor documentation costs companies $62 billion annually in developer time
CodeNarrator uses AI to analyze your entire GitHub repository and generate professional-grade documentation instantly.
| Problem | CodeNarrator Solution |
|---|---|
| Time-consuming | โก Generate docs in seconds, not hours |
| Outdated docs | ๐ Regenerate anytime with one click |
| Boring to write | ๐ค AI does the heavy lifting |
| Missing context | ๐ AI analyzes entire codebase for accuracy |
| Feature | Description |
|---|---|
| ๐ Universal GitHub Support | Works with any public GitHub repository |
| ๐ค AI-Powered Analysis | Analyzes code structure, dependencies, languages, and patterns |
| โก Real-time Streaming | Watch documentation generate live character by character |
| ๐ 4 Documentation Types | README, Installation Guide, API Docs, Contributing Guide |
| ๐๏ธ Preview/Raw Toggle | Switch between beautifully rendered markdown and raw code |
| ๐ One-Click Copy | Copy generated documentation to clipboard instantly |
| ๐พ Download as Markdown | Export documentation as .md files |
| ๐ Dark Mode UI | Modern, eye-friendly dark interface |
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router |
| React 19 | UI library |
| Tailwind CSS | Utility-first CSS framework |
| shadcn/ui | Accessible component library |
| Lucide Icons | Beautiful icon set |
| Technology | Purpose |
|---|---|
| Vercel AI SDK | Streaming AI responses (@ai-sdk/openai) |
| OpenRouter | AI model gateway |
| LLaMA 3.2 | Large language model for generation |
| GitHub REST API | Repository analysis and data fetching |
| Technology | Purpose |
|---|---|
| Vercel | Deployment and hosting |
| CodeRabbit | AI-powered code reviews |
| TypeScript | Type safety |
| ESLint | Code linting |
Enter any public GitHub repository URL. The app validates the URL format in real-time.
Our backend fetches and analyzes:
- ๐ Repository metadata (stars, forks, language, topics)
- ๐ File structure (up to 100 files)
- ๐ค Language breakdown (percentages)
- ๐ Key files content (README, package.json, etc.)
Choose from 4 documentation types:
| Type | What It Generates |
|---|---|
| README | Project overview, features, quick start, structure |
| Installation | Prerequisites, step-by-step setup, troubleshooting |
| API Docs | Endpoints, request/response formats, examples |
| Contributing | How to contribute, PR process, code standards |
The AI processes the repository context and generates documentation with:
- Real-time streaming (see text appear live)
- Proper markdown formatting
- Code examples and snippets
- Best practices included
- Preview Mode: See beautifully rendered markdown
- Raw Mode: View/edit the markdown source
- Copy: One-click clipboard copy
- Download: Save as
.mdfile
| Requirement | Version |
|---|---|
| Node.js | 18.0 or higher |
| npm | 9.0 or higher |
| OpenRouter API Key | Get free key |
# 1. Clone the repository
git clone https://github.com/shubhamsharma-10/CodeNarrator.git
# 2. Navigate to project directory
cd CodeNarrator
# 3. Install dependencies
npm install
# 4. Set up environment variables
cp .env.example .env.localCreate a .env.local file with:
OPENROUTER_API_KEY=your_openrouter_api_key_here
GITHUB_TOKEN=your_github_token_here# Start development server
npm run devOpen http://localhost:3000 in your browser
# Create production build
npm run build
# Start production server
npm startCodeNarrator/
โโโ app/ # Next.js App Router
โ โโโ api/
โ โ โโโ analyze/
โ โ โ โโโ route.ts # GitHub repository analysis endpoint
โ โ โโโ generate/
โ โ โโโ route.ts # AI documentation generation with streaming
โ โโโ generate/
โ โ โโโ page.tsx # Repository URL input page
โ โ โโโ results/
โ โ โโโ page.tsx # Documentation results with Preview/Raw
โ โโโ page.tsx # Landing page
โ โโโ layout.tsx # Root layout
โ โโโ globals.css # Global styles + markdown preview CSS
โ
โโโ components/
โ โโโ ui/ # shadcn/ui components
โ โโโ button.tsx
โ โโโ input.tsx
โ โโโ tabs.tsx
โ
โโโ lib/
โ โโโ github.ts # GitHub API utilities
โ โโโ utils.ts # Helper functions
โ
โโโ public/ # Static assets
โ
โโโ .coderabbit.yaml # CodeRabbit configuration
โโโ .env.example # Environment variables template
โโโ package.json # Dependencies
โโโ README.md # You are here!
| Requirement | Status | Evidence |
|---|---|---|
| Deployed on Vercel | โ | code-narrator-one.vercel.app |
| Uses Vercel AI SDK | โ | @ai-sdk/openai with streaming |
| Live & Working | โ | Publicly accessible |
| Requirement | Status | Evidence |
|---|---|---|
| CodeRabbit Configured | โ | .coderabbit.yaml in repo |
| PR Reviews | โ | 6+ PRs reviewed by CodeRabbit |
| Following Suggestions | โ | Visible in PR history |
| PR | Feature | CodeRabbit Review |
|---|---|---|
| #1 | Project Setup | โ Reviewed |
| #2 | GitHub URL Input | โ Reviewed |
| #3 | GitHub API Integration | โ Reviewed |
| #4 | AI Documentation Engine | โ Reviewed |
| #5 | Markdown Preview | โ Reviewed |
| #6 | UI Polish | โ Reviewed |
| Feature | Description | Priority |
|---|---|---|
| ๐ Private Repos | Support for private repositories with OAuth | High |
| ๐ Multi-file Docs | Generate entire documentation suites | High |
| ๐จ Themes | Light mode and custom themes | Medium |
| ๐ Edit & Save | Edit generated docs before download | Medium |
| ๐ History | Save and revisit generated documentation | Medium |
| ๐ i18n | Multi-language documentation generation | Low |
We welcome contributions! Please see our Contributing Guide.
# Fork and clone
git clone https://github.com/shubhamsharma-10/CodeNarrator.git
# Create feature branch
git checkout -b feat/amazing-feature
# Make changes and commit
git commit -m "feat: add amazing feature"
# Push and create PR
git push origin feat/amazing-featurePlease read our Code of Conduct before contributing.
This project is licensed under the MIT License - see the LICENSE file for details.
- Vercel - For the amazing AI SDK and hosting
- CodeRabbit - For AI-powered code reviews
- WeMakeDevs - For organizing this hackathon
- shadcn/ui - For beautiful UI components
- OpenRouter - For AI model access
Built with โค๏ธ by Shubham Sharma
๐ WeMakeDevs Hackathon 2025
โญ Star this repo if you find it useful!








