DEV Community

EmreLutfi
EmreLutfi

Posted on

I turned a GitHub repo into a 3D city you can walk through

A GitHub repo is a file list. I wanted a place.

RepoVerse takes a public owner/repo, reads the tree and a slice of git history, and draws a city: folders are districts, files are buildings. Height is roughly size. Color is language. Click a tower and you’re in that file.

"✍🏻" أعمل كل يوم شيئا مميزاٌ وجيــدًا للآخرين .!

favicon youtube.com

Why a city

I kept opening repos and getting lost in src/. The constellation view (nodes and edges) was already there. The city is the one I actually want to look at: what’s tall, what’s crowded, what moved this week.

Git log is what stops it being a screenshot. Recent files light up. Quiet, highly connected files read as the dusty center of town.

How the scene is built

Frontend is Next.js and React Three Fiber. Buildings are instanced meshes, a few volumes each (podium, setbacks, roof), so a thousand-file repo isn’t a thousand draw calls. Raycast hits a part; the whole building lights up.

The backend is FastAPI. Public GitHub comes in as a tarball, then parse, then layout. Python has a real AST path; other languages are conservative. I’d rather miss an import than draw a wrong street.

Camera is orbit, a drone fly-through, or street mode with WASD.

Try it

https://repoverse.online

Public repos, early, free. Local path and a same-origin website crawl exist too; GitHub is the one worth sharing.

If it breaks, say so in the comments. I’m still building it.

Top comments (2)

Collapse
 
amitfeldman profile image
Amit Feldman

Turning a repo into a walkable city is a genuinely nice idea — and instanced meshes to keep a thousand-file repo from becoming a thousand draw calls is the right call.

Quick public check of repoverse.online (headers + public config only):

  1. The six standard security headers are all unset: HSTS, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy. Since the app takes user-supplied repo names and renders fetched external content, CSP and nosniff are the two I'd start with — a crafted README or filename is exactly where injected markup would hurt.
  2. sitemap.xml 404s while robots.txt returns 200 — if you want the launch indexed, that's the cheap win.
  3. One image on the page is missing alt text.

TLS 1.3, title, meta description and single-H1 structure are all in good shape, and ~540ms end-to-end is fine for a 3D app. If nginx fronts the FastAPI backend, all six headers are one add_header block; if the Next.js frontend serves the page directly, a single headers() entry in next.config.js covers every route. Happy to re-run the check free once they land. Good luck with the launch!

Collapse
 
lutfiemre profile image
EmreLutfi

++