Gource is a mesmerizing tool that visualizes git repository history as an animated tree. Contributors appear as avatars, files bloom and fade, and you can watch a codebase evolve over years in minutes.
Problem: it requires installation, ffmpeg for video export, and feeding it a git log.
Solution: compile it to WebAssembly and run it in the browser.
gource.denialof.services | GitHub
The stack:
- Emscripten compiles the C++ to WASM
- SDL2 renders to a WebGL canvas
- GitHub OAuth for private repo access
- isomorphic-git clones repos directly in the browser via CORS proxy
- Cloudflare Workers serves assets and handles OAuth
Clone any public repo by pasting a GitHub URL. For private repos, login with GitHub OAuth and select from your repo list. The visualization runs entirely client-side.
The bottleneck is extracting file changes from commits. isomorphic-git's git.walk() with TREE walkers works, but it's still JavaScript walking git trees. Expect ~1 second per 10 commits.
TODO: Get libgit2 compiled to WASM (wasm-git) working. libgit2's native git log --name-status would be orders of magnitude faster. The challenge is that wasm-git doesn't support HTTPS cloning through CORS proxies - it needs raw git-http-backend access. Hybrid approach (isomorphic-git for clone, libgit2 for diff) failed because wasm-git's build doesn't include all git commands.
For now, it works. Just slowly.