Google Cloud Rapid Agent Hackathon · GitLab Track

Your codebase has a shape.

RepoTerrain transforms any GitLab repository into a navigable 3D semantic terrain — powered by Gemini AI. Files cluster by similarity. Heat shows activity. A live agent creates real GitLab issues on command.

149
Files analyzed
19
Semantic clusters
~15s
Terrain load time
Real
GitLab issues created

Codebases are invisible

Every developer has stared at a repo they've never seen before and had no idea where to start. File trees tell you nothing about relationships, activity, or importance.

Before RepoTerrain

Navigating blind

Flat file trees with no semantic context or relationships
No way to see which files are actively changed vs legacy
Onboarding a new repo takes days of reading and grepping
Tech debt is invisible — cold zones hide in plain sight
Creating issues requires context you don't have yet
📂 Traditional file tree
📁 src/
📄 main.go
📄 runner.go
📄 cache.go
📁 ci/
📄 pipeline.go
📄 executor.go
...143 more files
With RepoTerrain

Seeing the whole shape

Files positioned in 3D space by semantic similarity via Gemini embeddings
Heat map shows activity — red peaks are hot, blue valleys are cold
Clusters reveal module relationships invisible in the file tree
Ask Gemini anything about the terrain — it sees the full picture
Create real GitLab issues directly from AI analysis, in seconds
⛰ Semantic terrain clusters
CORE — 18 files
RUNNER — 12 files
CI — 21 files
CACHE — 9 files
AZURE — 8 files
TEMPLATES — 14 files
DOCS — 11 files
HELPERS — 7 files

From repo URL to 3D terrain in 15 seconds

Five steps. No setup. No cloning. Just paste a GitLab URL.

1

Fetch

GitLab REST API v4 fetches the full file tree and raw content — up to 150 files, skipping binaries and lock files.

GitLab API v4
2

Embed

Each file is embedded into a 768-dim semantic vector using Google AI's text-embedding-004. Similar files cluster in vector space.

Google AI Embeddings
3

Project

UMAP reduces 768-dim vectors to 3D using cosine similarity. Semantically related files end up physically near each other.

UMAP · Cosine
4

Render

Three.js CSS3DRenderer builds floating file cards. Heat is computed from filename patterns and file size. Cluster labels emerge.

Three.js · CSS3D
5

Agent

Gemini 2.0 Flash receives terrain context and answers questions, identifies patterns, and creates real GitLab issues via MCP.

Gemini 2.0 · GitLab MCP

Navigate like a pro from day one

Three things you can do the moment the terrain loads.

🗺 Explore the terrain
✋ Hand navigation
🤖 Talk to Gemini
1
Paste any public GitLab repo URL
Type or paste a path like gitlab-org/gitlab-runner into the input. No tokens needed for public repos. Hit Map Terrain — the pipeline takes ~15 seconds.
💡 Try gitlab-org/gitlab-runner first — 149 files, 19 clusters for a rich terrain
2
Read the heat map
Files glow red when they're core/active (main, index, app patterns + larger size). Blue files are cold — legacy code. Orange is warm — recently active but not core.
🔴 Red peaks = where all the work happens · 🔵 Blue valleys = tech debt
3
Read the cluster labels
Floating labels above each cluster show directory names — CI, CORE, CACHE, AZURE. Files from different directories that cluster together share code patterns.
💡 Cross-directory clusters reveal hidden module boundaries
4
Click any file card
Clicking a card flies the camera to that file and opens the file panel — language, size, heat score. Hit "Ask Gemini about this file" for instant analysis with full context.
🖱 Drag to orbit · Scroll to zoom · Click to select
1
Enable hand tracking
Click the ✋ button in the top-right HUD. Your browser asks for camera permission — allow it. A webcam preview appears in the bottom-right. MediaPipe initializes in a few seconds.
💡 Works best with good lighting and a clear background
🖐
OPEN PALM
Move your palm left/right/up/down to orbit the camera through the terrain
🤏
PINCH / VICTORY
Bring thumb + index together to zoom in, spread to zoom out
☝️
POINT UP
Point your index finger at a file card to select it and open its details panel
FIST
Close your fist to grab and rotate the entire terrain view
1
The agent sees your terrain
Every Gemini query includes the full terrain context — hottest files, coldest files, language clusters, and selected file content. It's answering about this specific repo.
"What's the most complex module?"
Gemini analyzes heat scores, file density, and cluster topology to identify the most active and interconnected module with specific filenames.
Analysis query
"Explain the CI cluster"
Gemini reads the actual content of files in that cluster and explains what they do, how they relate, and what patterns they share.
Cluster analysis
"Create an issue for cold zones"
Gemini identifies cold files, drafts an issue title and description, then calls the GitLab API — a real issue appears with labels attached.
✅ Creates real GitLab issue
"List open MRs"
The agent calls the GitLab MCP endpoint and returns live merge requests — not cached, not hallucinated, fetched in real time.
Live GitLab data
"Onboard me to this codebase"
Gemini walks you through where to start, what the hot clusters are, what to avoid touching, and which files to read first.
Onboarding mode
Click file → "Explain this"
With a file selected, Gemini gets its full content (up to 3000 chars). Analysis is specific to that exact file — imports, patterns, context.
File-specific analysis

How the pipeline works

From a single GitLab URL to a live 3D terrain with an AI agent — four clean stages.

INPUT  ·  GitLab Repo URL  →  POST /ingest
Stage 01
🦊
Fetch
fetch_repo_files()
GitLab REST API v4
Up to 150 files
Skips binaries & lockfiles
Raw content extraction
GitLab API v4
Stage 02
🧠
Embed
embed_files()
Primary: embed_gemini()
text-embedding-004
768-dim vectors/file
Fallback: TF-IDF (no key)
Google AI Embeddings
Stage 03
🗺
Project
project_to_3d()
UMAP dimensionality reduction
768-dim → (x, y, z)
Cosine similarity metric
n_neighbors = 15
UMAP · Cosine
Stage 04
💾
Cache
session_cache
Terrain JSON stored per session
Hot/cold scores computed
Cluster labels derived
Ready for all consumers
Session Cache
Three.js
  • CSS3DRenderer
  • Floating file cards
  • Cluster labels
  • Heat map colors
  • Orbit + zoom
🤖
Gemini Agent
  • Gemini 2.0 Flash (primary)
  • Groq LLaMA 3.1 (quota-fallback)
  • Terrain Q&A
  • Codebase analysis
🦊
GitLab MCP
  • create_issue()
  • list_mrs()
  • get_pipelines()
  • MCP-first, REST fallback
MediaPipe
  • Hand tracking
  • 4 gesture types
  • Real-time webcam
  • Touchless nav

Built with the right tools

Every component chosen for performance, reliability, and hackathon compliance.

🤖
Gemini 2.0 Flash
Agent reasoning, codebase Q&A, terrain analysis, and issue drafting with full terrain context.
Google Cloud AI
🧠
text-embedding-004
Produces 768-dimensional semantic vectors per file for UMAP projection into 3D space.
Google AI Embeddings
🦊
GitLab REST API v4
File fetching, issue creation, MR listing, and pipeline status — all live, no caching.
GitLab MCP
🗺
UMAP
Reduces 768-dim embedding vectors to 3D (x,y,z) coordinates using cosine distance metric.
Dimensionality Reduction
Three.js r128
CSS3DRenderer for floating file cards, WebGL for edges and particles, OrbitControls for navigation.
3D Rendering
MediaPipe Tasks
Real-time hand gesture recognition: palm orbit, pinch zoom, point select, fist rotate.
Hand Tracking
FastAPI + uvicorn
Async Python backend with WebSocket agent streaming, session cache, and Railway deployment.
Python Backend
🚄
Groq LLaMA 3.1
Automatic fallback agent when Gemini is unavailable — same API surface, seamless degradation.
Fallback LLM

See your codebase
in a new dimension

Paste any public GitLab repo. Terrain loads in ~15 seconds. No sign-up required.

repoterrain-production.up.railway.app/app
Open →