Andy Dixon b216b86004 Add GitHub App sign-in for private repositories
/api/github/login redirects to GitHub with a single-use state bound to
the session; the callback exchanges the code for a user token kept in
memory and expired with it. Clones pass the token through git config
in the environment, never the URL or arguments, and ignore host git
config and credential helpers. Failed clones report authRequired
(signin or install) so the frontend can offer the right next step.

Configured with GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GITHUB_APP_SLUG.
2026-02-28 12:27:34 +00:00
2026-01-24 14:08:43 +00:00
2026-02-01 21:48:24 +00:00
2026-02-01 21:48:24 +00:00
2026-01-24 14:08:43 +00:00
2026-02-01 21:48:24 +00:00

CodeNavigator

A single binary that serves the WebGL frontend and the indexing API (jobs, SSE progress, snapshots, search, source) on one origin. No dependencies beyond the Go standard library.

go run .                 # http://127.0.0.1:4177
go test -race ./...
go test -run x -bench Index   # indexes $CODENAV_BENCH_DIR (default: Go's stdlib source)
./build.sh [tag]         # Docker image, tests run during the build
docker run --rm -p 4177:4177 codenavigator:latest

Configuration: PORT (default 4177, or --port), CORS_ORIGIN (default *). git must be on PATH to load GitHub repositories (the image includes it).

The browser frontend in web/ is plain JavaScript (it has to run in the browser) and is embedded into the binary; web/config.js points it at the same origin.

Notes:

  • GET / serves the frontend instead of a JSON service description.
  • Search queries are percent-decoded properly.
  • .gitignore support covers standard globs but not global excludes or .git/info/exclude.
S
Description
See your code as a city: explore any GitHub repo as a 2D map, 3D landscape or walkable city. Single Go binary + WebGL2.
Readme GPL-3.0
7.6 MiB
Languages
JavaScript 64.8%
Go 21.2%
CSS 9.9%
HTML 3.9%
Dockerfile 0.1%