Stratigraphy for your code.
A browser-native lines-of-code counter that visualizes how a public Git repository grows over time, broken down by language and prod/test. Zero server-side compute — everything runs in the browser.
- Paste any public repo URL (GitHub, GitLab, Bitbucket) and get a stacked area chart of LoC over time
- ~35 languages detected automatically with prod/test classification
- Live-updating chart while analysis runs — no waiting for the full result
- Incremental refresh — only processes new commits since the last analysis
- IndexedDB cache with LRU eviction (500 MB limit)
- Dark/light theme with color-blind-safe palettes
- Sortable data table with CSV export
- Shareable URLs via
?repo=query parameter - Fully client-side — the only server component is a tiny CORS proxy that forwards bytes
pnpm install
pnpm devOpen localhost:5233 and paste a repo URL.
Browser
├── Main thread (SvelteKit UI + Chart.js)
│ └── Comlink RPC ↔ Web Worker
│ ├── isomorphic-git (clone/fetch)
│ ├── lightning-fs (IndexedDB filesystem)
│ └── Line counting pipeline
└── IndexedDB (clone cache + results cache)
CORS proxy (Cloudflare Worker)
└── Forwards git protocol bytes with CORS headers
The worker clones the repo into an in-browser filesystem, walks the commit history day by day, counts lines per language, classifies prod vs test, and streams results back to the main thread for live chart rendering. See spec.md for the full design.
| Component | Technology |
|---|---|
| Framework | SvelteKit + Svelte 5 (static adapter) |
| Styling | Tailwind CSS v4 |
| Git in browser | isomorphic-git + lightning-fs |
| Charting | Chart.js + chartjs-plugin-zoom |
| Web Worker RPC | Comlink |
| CORS proxy | Cloudflare Worker + Hono |
| Package manager | pnpm |
pnpm install
pnpm devThe dev server uses the public https://cors.isomorphic-git.org proxy, so you don't need to run the CORS proxy locally.
pnpm test # unit tests (vitest)
pnpm test:coverage # with coverageThere's also a Go-based check runner for CI-style validation:
./scripts/check.sh # runs format, lint, type-check, tests, buildpnpm build # outputs static site to build/
pnpm preview # preview the production buildpnpm check # svelte-check type checking
pnpm lint # eslint
pnpm format # prettierSee docs/deploying.md for step-by-step deployment instructions for both the frontend (Cloudflare Pages) and the CORS proxy (Cloudflare Workers).
MIT OR Apache-2.0