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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
[](https://huggingface.co/spaces/MCP-1st-Birthday/CodeAtlas)
|
| 37 |
+
[](https://gradio.app)
|
| 38 |
+
[](https://modelcontextprotocol.io)
|
| 39 |
+
[](https://llamaindex.ai)
|
| 40 |
+
[](https://ai.google.dev)
|
| 41 |
+
[](https://openai.com)
|
| 42 |
+
[](https://elevenlabs.io)
|
| 43 |
+
[](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 |
+

|
| 67 |
+
*Enter a GitHub URL or upload a ZIP file*
|
| 68 |
+
|
| 69 |
+
</td>
|
| 70 |
+
<td width="50%">
|
| 71 |
+
|
| 72 |
+
### πΊοΈ Architecture Diagram
|
| 73 |
+

|
| 74 |
+
*AI-generated architecture visualization*
|
| 75 |
+
|
| 76 |
+
</td>
|
| 77 |
+
</tr>
|
| 78 |
+
<tr>
|
| 79 |
+
<td width="50%">
|
| 80 |
+
|
| 81 |
+
### π History & Layout Panel
|
| 82 |
+

|
| 83 |
+
*Browse past diagrams and adjust layout options*
|
| 84 |
+
|
| 85 |
+
</td>
|
| 86 |
+
<td width="50%">
|
| 87 |
+
|
| 88 |
+
### π¬ AI Chat & Voice
|
| 89 |
+

|
| 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 |
+
[](https://github.com/yourusername/CodeAtlas)
|
| 404 |
+
|
| 405 |
+
</div>
|