aghilsabu commited on
Commit
8a677e3
Β·
1 Parent(s): b2d140d

docs: add comprehensive README with setup instructions

Browse files
Files changed (1) hide show
  1. README.md +405 -0
README.md ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: CodeAtlas
3
+ emoji: πŸ—οΈ
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: "5.0.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ tags:
12
+ - mcp-in-action-track-consumer
13
+ - mcp
14
+ - gradio
15
+ - llamaindex
16
+ - gemini
17
+ - elevenlabs
18
+ - modal
19
+ - openai
20
+ - agents
21
+ - code-visualization
22
+ - fastmcp
23
+ - graphviz
24
+ - architecture
25
+ - visualization
26
+ ---
27
+
28
+ <div align="center">
29
+
30
+ # πŸ—οΈ CodeAtlas
31
+
32
+ ### AI-Powered Codebase Visualization & Understanding
33
+
34
+ **Transform any GitHub repository into beautiful architecture diagrams with voice narration and AI chat β€” powered by MCP**
35
+
36
+ [![Live Demo](https://img.shields.io/badge/πŸš€_Live_Demo-HuggingFace-yellow)](https://huggingface.co/spaces/MCP-1st-Birthday/CodeAtlas)
37
+ [![Gradio 6](https://img.shields.io/badge/Built%20with-Gradio%206-FF7C00)](https://gradio.app)
38
+ [![MCP](https://img.shields.io/badge/MCP-Server%20Enabled-8B5CF6)](https://modelcontextprotocol.io)
39
+ [![LlamaIndex](https://img.shields.io/badge/πŸ¦™_LlamaIndex-Integrated-blue)](https://llamaindex.ai)
40
+ [![Gemini](https://img.shields.io/badge/✨_Gemini_3.0-Powered-4285F4)](https://ai.google.dev)
41
+ [![OpenAI](https://img.shields.io/badge/πŸ€–_GPT--5.1-Supported-412991)](https://openai.com)
42
+ [![ElevenLabs](https://img.shields.io/badge/πŸŽ™οΈ_ElevenLabs-Voice-000000)](https://elevenlabs.io)
43
+ [![Modal](https://img.shields.io/badge/☁️_Modal-Deployed-00D4AA)](https://modal.com)
44
+
45
+ **[πŸ“Ί Demo Video](#-demo-video)** β€’ **[πŸ”— Try it Live](https://huggingface.co/spaces/MCP-1st-Birthday/CodeAtlas)** β€’ **[πŸ“± Social Post](https://x.com/your-post-link)**
46
+
47
+ </div>
48
+
49
+ ---
50
+
51
+ ## 🎬 Demo Video
52
+
53
+ https://github.com/user-attachments/assets/YOUR_VIDEO_ID
54
+
55
+ > *Watch CodeAtlas analyze the Flask repository in real-time, generate architecture diagrams, and explain the codebase with voice narration.*
56
+
57
+ ---
58
+
59
+ ## πŸ“Έ Screenshots
60
+
61
+ <table>
62
+ <tr>
63
+ <td width="50%">
64
+
65
+ ### 🏠 Generate Page
66
+ ![Generate Page](assets/screenshots/01_generate_page.png)
67
+ *Enter a GitHub URL or upload a ZIP file*
68
+
69
+ </td>
70
+ <td width="50%">
71
+
72
+ ### πŸ—ΊοΈ Architecture Diagram
73
+ ![Architecture Diagram](assets/screenshots/02_explore_diagram.png)
74
+ *AI-generated architecture visualization*
75
+
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td width="50%">
80
+
81
+ ### πŸ“œ History & Layout Panel
82
+ ![History & Layout Panel](assets/screenshots/03_explore_history_sidebar.png)
83
+ *Browse past diagrams and adjust layout options*
84
+
85
+ </td>
86
+ <td width="50%">
87
+
88
+ ### πŸ’¬ AI Chat & Voice
89
+ ![AI Chat & Voice](assets/screenshots/04_explore_chat_sidebar.png)
90
+ *Chat with AI and listen to voice narration*
91
+
92
+ </td>
93
+ </tr>
94
+ </table>
95
+
96
+ ---
97
+
98
+ ## 🌟 What is CodeAtlas?
99
+
100
+ **CodeAtlas** is your AI-powered codebase companion that instantly visualizes and explains any software architecture. Simply paste a GitHub URL, and within seconds get:
101
+
102
+ - πŸ—ΊοΈ **Beautiful Architecture Diagrams** β€” AI-generated Graphviz visualizations showing components, layers, and relationships
103
+ - πŸ”Š **Voice Narration** β€” Listen to AI explain your codebase architecture (powered by ElevenLabs)
104
+ - πŸ’¬ **AI Chat** β€” Ask questions and get intelligent answers about the code
105
+ - πŸ€– **MCP Integration** β€” Use with Claude Desktop, Cursor, or any MCP-compatible client
106
+
107
+ **Perfect for:** Code reviews, onboarding new developers, documentation, learning new frameworks, and understanding legacy codebases.
108
+
109
+ ---
110
+
111
+ ## ✨ Key Features
112
+
113
+ | Feature | Description | Technology |
114
+ |---------|-------------|------------|
115
+ | πŸ”— **GitHub Analysis** | Paste any public repo URL and analyze instantly | GitHub API + Smart Filtering |
116
+ | πŸ“ **ZIP Upload** | Upload local codebases for private analysis | File Processing |
117
+ | πŸ—ΊοΈ **Architecture Diagrams** | AI-generated Graphviz diagrams with layers, clusters, and relationships | **Graphviz** + Gemini AI |
118
+ | πŸ”Š **Voice Narration** | Natural speech explanation of your architecture | **πŸŽ™οΈ ElevenLabs TTS** |
119
+ | πŸ’¬ **AI Chat** | Context-aware Q&A about your codebase | **πŸ¦™ LlamaIndex** RAG |
120
+ | πŸ€– **Multi-Model Support** | Choose between Gemini 3.0 Pro, 2.5 Pro/Flash, or GPT-5.1/5 Mini | **Google Gemini** + **OpenAI** |
121
+ | πŸ“ **Interactive Layout** | Real-time diagram adjustments (direction, spacing, zoom) | Graphviz DOT |
122
+ | πŸ“œ **Diagram History** | Browse and reload previous analyses | Local Storage |
123
+ | πŸ”Œ **MCP Server** | 4 tools for AI agent integration | **FastMCP** |
124
+ | ☁️ **Cloud Ready** | One-command serverless deployment | **Modal** |
125
+
126
+ ---
127
+
128
+ ## πŸ”Œ MCP Server Integration
129
+
130
+ CodeAtlas is a **native MCP server** β€” connect it to Claude Desktop, Cursor, or any MCP client to analyze codebases directly from your AI assistant!
131
+
132
+ ### Available MCP Tools
133
+
134
+ | Tool | Description |
135
+ |------|-------------|
136
+ | `analyze_codebase` | Generate architecture diagram from GitHub URL or file path |
137
+ | `get_architecture_summary` | Get detailed text summary of codebase architecture |
138
+ | `chat_with_codebase` | Ask questions about any codebase |
139
+ | `list_recent_analyses` | List recently analyzed repositories |
140
+
141
+ ### Connect to Claude Desktop
142
+
143
+ Add this to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
144
+
145
+ ```json
146
+ {
147
+ "mcpServers": {
148
+ "codeatlas": {
149
+ "url": "https://your-deployment.modal.run/gradio_api/mcp/sse"
150
+ }
151
+ }
152
+ }
153
+ ```
154
+
155
+ Then ask Claude: *"Analyze the architecture of github.com/pallets/flask using CodeAtlas"*
156
+
157
+ ---
158
+
159
+ ## πŸ› οΈ Tech Stack & Library Integrations
160
+
161
+ CodeAtlas integrates **6 major sponsor technologies** for a comprehensive solution:
162
+
163
+ | Layer | Technology | Prize Category |
164
+ |-------|------------|----------------|
165
+ | **🎨 UI Framework** | [**Gradio 6**](https://gradio.app) β€” Multi-page routing, `mcp_server=True` | Core Hackathon |
166
+ | **πŸ¦™ AI Framework** | [**LlamaIndex**](https://llamaindex.ai) β€” Unified LLM interface, RAG | **$1K LlamaIndex Prize** |
167
+ | **✨ Primary AI** | [**Google Gemini**](https://ai.google.dev) β€” Gemini 3.0 Pro, 2.5 Pro/Flash | **$10K Gemini Credits** |
168
+ | **πŸ€– Alternate AI** | [**OpenAI**](https://openai.com) β€” GPT-5.1, GPT-5 Mini/Nano | **ChatGPT Pro + $1K Credits** |
169
+ | **πŸŽ™οΈ Voice TTS** | [**ElevenLabs**](https://elevenlabs.io) β€” High-quality voice narration | **~$2K + AirPods Pro** |
170
+ | **☁️ Deployment** | [**Modal**](https://modal.com) β€” Serverless cloud, auto-scaling | **$2.5K Modal Prize** |
171
+ | **πŸ”Œ MCP Protocol** | [**FastMCP**](https://github.com/jlowin/fastmcp) β€” Model Context Protocol | Core MCP Track |
172
+
173
+ ### Integration Architecture
174
+
175
+ ```
176
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
177
+ β”‚ πŸ—οΈ CodeAtlas Architecture β”‚
178
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
179
+ β”‚ β”‚
180
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
181
+ β”‚ β”‚ USER INTERFACE LAYER β”‚ β”‚
182
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
183
+ β”‚ β”‚ β”‚ Gradio 6 β”‚ β”‚ MCP Server β”‚ β”‚ FastAPI β”‚ β”‚ β”‚
184
+ β”‚ β”‚ β”‚ (Multi-page)β”‚ β”‚ (4 Tools) β”‚ β”‚ (Health) β”‚ β”‚ β”‚
185
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
186
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
187
+ β”‚ β”‚ β”‚ β”‚
188
+ β”‚ β–Ό β–Ό β”‚
189
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
190
+ β”‚ β”‚ AI PROCESSING LAYER β”‚ β”‚
191
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
192
+ β”‚ β”‚ β”‚ πŸ¦™ LlamaIndex│──▢│ Gemini 3.0 β”‚ β”‚ GPT-5.1 β”‚ β”‚ β”‚
193
+ β”‚ β”‚ β”‚ (Unified AI) β”‚ β”‚ Pro/2.5 Flashβ”‚ β”‚ Mini/Nano β”‚ β”‚ β”‚
194
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
195
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
196
+ β”‚ β”‚ β”‚
197
+ β”‚ β–Ό β”‚
198
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€οΏ½οΏ½οΏ½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
199
+ β”‚ β”‚ OUTPUT & SERVICES LAYER β”‚ β”‚
200
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
201
+ β”‚ β”‚ β”‚ Graphviz β”‚ β”‚ πŸŽ™οΈ ElevenLabsβ”‚ β”‚ GitHub β”‚ β”‚ β”‚
202
+ β”‚ β”‚ β”‚ (Diagrams) β”‚ β”‚ (Voice) β”‚ β”‚ (Loader) β”‚ β”‚ β”‚
203
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
204
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
205
+ β”‚ β”‚
206
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
207
+ β”‚ β”‚ DEPLOYMENT LAYER β”‚ β”‚
208
+ β”‚ β”‚ ☁️ Modal (Serverless, Auto-scaling) β”‚ β”‚
209
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
210
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
211
+ ```
212
+
213
+ ---
214
+
215
+ ## πŸš€ Quick Start
216
+
217
+ ### Prerequisites
218
+ - Python 3.10+
219
+ - Graphviz (`brew install graphviz` on macOS, `apt install graphviz` on Linux)
220
+
221
+ ### Option 1: Run Locally
222
+
223
+ ```bash
224
+ # Clone and setup
225
+ git clone https://github.com/yourusername/CodeAtlas.git
226
+ cd CodeAtlas
227
+ python -m venv .venv && source .venv/bin/activate
228
+ pip install -r requirements.txt
229
+
230
+ # Run
231
+ python app.py
232
+ ```
233
+
234
+ Open http://localhost:7860 and go to **Settings** to add your API keys.
235
+
236
+ ### Option 2: Use Makefile
237
+
238
+ ```bash
239
+ make install # Create venv and install dependencies
240
+ make run # Run the application
241
+ ```
242
+
243
+ ### Option 3: Deploy to Hugging Face Spaces + Modal Backend
244
+
245
+ **For the hackathon submission**, we use:
246
+ - **HF Space**: Runs the Gradio UI (required for hackathon)
247
+ - **Modal Backend**: Provides compute endpoints (eligible for $2.5K Modal prize)
248
+
249
+ ```bash
250
+ # 1. Deploy Modal backend first
251
+ pip install modal && modal setup
252
+ modal deploy modal_backend.py
253
+ # Note your endpoint URLs
254
+
255
+ # 2. Push to HF Spaces
256
+ # Set MODAL_BACKEND_URL secret in your HF Space settings
257
+ # pointing to your Modal deployment URL
258
+ ```
259
+
260
+ ### Option 4: Deploy Full App to Modal (Standalone)
261
+
262
+ ```bash
263
+ # Deploy the complete app on Modal
264
+ modal deploy modal_app.py
265
+ ```
266
+
267
+ Your app will be live at `https://your-modal-url.modal.run` πŸš€
268
+
269
+ ---
270
+
271
+ ## βš™οΈ Configuration
272
+
273
+ Configure API keys via the **Settings** page in the UI:
274
+
275
+ | Key | Required | Purpose | Get Key |
276
+ |-----|----------|---------|---------|
277
+ | **Gemini API Key** | βœ… Yes | Primary AI engine | [aistudio.google.com/apikey](https://aistudio.google.com/apikey) |
278
+ | **OpenAI API Key** | Optional | GPT-5.1/5 Mini/Nano models | [platform.openai.com/api-keys](https://platform.openai.com/api-keys) |
279
+ | **ElevenLabs API Key** | Optional | Voice narration | [elevenlabs.io/app/developers](https://elevenlabs.io/app/developers/api-keys) |
280
+
281
+ ---
282
+
283
+ ## πŸ“ Project Structure
284
+
285
+ ```
286
+ CodeAtlas/
287
+ β”œβ”€β”€ app.py # πŸš€ Main entry point
288
+ β”œβ”€β”€ modal_app.py # ☁️ Modal cloud deployment
289
+ β”œβ”€β”€ server.py # πŸ”Œ MCP server entry
290
+ β”œβ”€β”€ requirements.txt # πŸ“¦ Dependencies
291
+ β”œβ”€β”€ Makefile # πŸ› οΈ Build commands
292
+ β”‚
293
+ β”œβ”€β”€ src/
294
+ β”‚ β”œβ”€β”€ config.py # βš™οΈ Configuration & settings
295
+ β”‚ β”‚
296
+ β”‚ β”œβ”€β”€ core/ # 🧠 Core analysis engine
297
+ β”‚ β”‚ β”œβ”€β”€ analyzer.py # LlamaIndex + Gemini/OpenAI
298
+ β”‚ β”‚ β”œβ”€β”€ diagram.py # Graphviz rendering
299
+ β”‚ β”‚ └── repository.py # GitHub/ZIP processing
300
+ β”‚ β”‚
301
+ β”‚ β”œβ”€β”€ integrations/ # πŸ”— External services
302
+ β”‚ β”‚ β”œβ”€β”€ elevenlabs.py # ElevenLabs TTS client
303
+ β”‚ β”‚ └── voice.py # Audio generation pipeline
304
+ β”‚ β”‚
305
+ β”‚ β”œβ”€β”€ mcp/ # πŸ€– MCP Protocol
306
+ β”‚ β”‚ β”œβ”€β”€ server.py # FastMCP server
307
+ β”‚ β”‚ └── tools.py # 4 MCP tools
308
+ β”‚ β”‚
309
+ β”‚ └── ui/ # 🎨 Gradio interface
310
+ β”‚ β”œβ”€β”€ app.py # Multi-page routes
311
+ β”‚ β”œβ”€β”€ components.py # Reusable UI components
312
+ β”‚ └── styles.py # Custom CSS
313
+ β”‚
314
+ └── data/
315
+ β”œβ”€β”€ diagrams/ # πŸ“Š Generated DOT files
316
+ β”œβ”€β”€ audios/ # πŸ”Š Generated audio files
317
+ └── logs/ # πŸ“ Application logs
318
+ ```
319
+
320
+ ---
321
+
322
+ ## πŸ” How It Works
323
+
324
+ ```mermaid
325
+ flowchart LR
326
+ A[GitHub URL/ZIP] --> B[Repository Loader]
327
+ B --> C[Smart File Filter]
328
+ C --> D[LlamaIndex + Gemini]
329
+ D --> E[DOT Diagram]
330
+ E --> F[Graphviz Render]
331
+ F --> G[Interactive Viewer]
332
+
333
+ D --> H[Architecture Summary]
334
+ H --> I[ElevenLabs TTS]
335
+ I --> J[πŸ”Š Audio Player]
336
+
337
+ D --> K[πŸ’¬ AI Chat]
338
+ ```
339
+
340
+ 1. **πŸ“₯ Load Repository** β€” Download from GitHub or extract ZIP, smart-filter to relevant code files (excludes node_modules, tests, configs)
341
+ 2. **🧠 AI Analysis** β€” LlamaIndex processes code context with Gemini 3.0 Pro (or GPT-5.1) to understand architecture
342
+ 3. **πŸ—ΊοΈ Generate Diagram** β€” AI creates Graphviz DOT code with 15-20 key nodes showing layers, clusters, and relationships
343
+ 4. **πŸ”Š Voice Narration** β€” AI generates natural summary, ElevenLabs converts to high-quality speech
344
+ 5. **πŸ’¬ Chat Interface** β€” Context-aware Q&A about the analyzed codebase with conversation history
345
+
346
+ ---
347
+
348
+ ## 🎯 Use Cases
349
+
350
+ | Scenario | How CodeAtlas Helps |
351
+ |----------|---------------------|
352
+ | **πŸ†• Onboarding** | New team members instantly understand codebase structure |
353
+ | **πŸ“ Documentation** | Generate architecture diagrams for README/docs |
354
+ | **πŸ” Code Review** | Visualize PR changes in context of overall architecture |
355
+ | **πŸ“š Learning** | Understand how popular open-source projects are structured |
356
+ | **🏚️ Legacy Code** | Make sense of undocumented older codebases |
357
+ | **πŸ€– AI Agents** | Give Claude/Cursor AI ability to analyze any repo via MCP |
358
+
359
+ ---
360
+
361
+ ## πŸ† Hackathon Submission
362
+
363
+ This project is submitted to **MCP's 1st Birthday Hackathon** hosted by Anthropic and Gradio.
364
+
365
+ - **Track:** MCP in Action β†’ Consumer
366
+ - **Tags:** `mcp-in-action-track-consumer`
367
+ - **Team:** Solo
368
+
369
+ ### Sponsor Integrations
370
+
371
+ | Sponsor | Integration | Feature |
372
+ |---------|-------------|---------|
373
+ | πŸ¦™ **LlamaIndex** | `llama-index-core`, `llama-index-llms-gemini`, `llama-index-llms-openai` | Unified AI interface, RAG support |
374
+ | ✨ **Google Gemini** | `google-genai`, Gemini 3.0 Pro, 2.5 Pro/Flash | Primary AI analysis engine |
375
+ | πŸ€– **OpenAI** | `openai`, GPT-5.1, GPT-5 Mini/Nano | Alternative AI model support |
376
+ | πŸŽ™οΈ **ElevenLabs** | `elevenlabs` | Voice narration TTS |
377
+ | ☁️ **Modal** | `modal` | Serverless cloud deployment |
378
+ | πŸ”Œ **FastMCP** | `fastmcp`, `mcp` | MCP protocol server |
379
+
380
+ ---
381
+
382
+ ## πŸ‘¨β€πŸ’» Author
383
+
384
+ **Your Name**
385
+ - GitHub: [@yourusername](https://github.com/yourusername)
386
+ - HuggingFace: [@yourusername](https://huggingface.co/yourusername)
387
+ - Twitter/X: [@yourhandle](https://x.com/yourhandle)
388
+
389
+ ---
390
+
391
+ ## πŸ“œ License
392
+
393
+ MIT License β€” see [LICENSE](LICENSE) for details.
394
+
395
+ ---
396
+
397
+ <div align="center">
398
+
399
+ **Built with ❀️ for MCP's 1st Birthday Hackathon πŸŽ‚**
400
+
401
+ *November 2025*
402
+
403
+ [![Star on GitHub](https://img.shields.io/github/stars/yourusername/CodeAtlas?style=social)](https://github.com/yourusername/CodeAtlas)
404
+
405
+ </div>