diff --git a/README.md b/README.md index 96e14fc..4b22416 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,22 @@ # git-map +**See any GitHub repo as a map, not a wall of text.** + > Interactive 2D map of any GitHub repo's branch/commit topology β€” sign in with > GitHub, pick a repo, explore the structure visually, and get optional AI > summaries of individual commits. Runs entirely on your own machine. A single Next.js app β€” UI + API routes + -GitHub OAuth in one process. No external backend, no payment, no telemetry. +GitHub OAuth in one process. No external backend, no payment, no telemetry, +no account beyond your own GitHub. + +## Why git-map + +- πŸ—ΊοΈ **Visual git history** β€” branches and commits as a zoomable 2D graph, not `git log`. +- πŸ”­ **Stays readable on big repos** β€” linear commit runs collapse into expandable nodes. +- πŸ€– **Optional AI commit summaries** β€” 3-bullet plain-English explanation per commit, bring your own key. +- πŸ”’ **Private by design** β€” your GitHub token stays server-side; your AI key stays in your browser. +- πŸ’» **100% local** β€” clone, add creds, `npm run dev`. Nothing phones home. ## What it is @@ -89,6 +100,18 @@ npm test > Running on a different port? Update both `OAUTH_CALLBACK_URL` and the OAuth > App's callback URL to match β€” GitHub requires them to be identical. +## Troubleshooting sign-in + +| Symptom | Cause | Fix | +|---------|-------|-----| +| **404 on the GitHub authorize page** after clicking *Connect to GitHub* | `GITHUB_CLIENT_ID` is wrong, or the OAuth App was deleted | Confirm the app exists at GitHub β†’ Developer settings β†’ OAuth Apps; copy its **Client ID** into `.env.local` | +| **Bounced back to the login screen** (URL shows `?error=oauth_token`) | `GITHUB_CLIENT_SECRET` is wrong β€” GitHub returns `incorrect_client_credentials` | **Generate a new client secret**, copy it whole (no quotes/spaces/newline) into `.env.local` | +| **`?error=oauth_state`** | Stale/lost session during the round-trip | Make sure `SESSION_SECRET` is set (β‰₯32 chars) and retry | +| Changed any env value | Next.js loads env at boot | Restart the dev server | + +> The OAuth App's **Authorization callback URL** must exactly equal +> `OAUTH_CALLBACK_URL` (default `http://localhost:4200/api/auth/callback`). + ## AI summaries (optional, bring your own key) In the app's settings, paste an OpenRouter (or compatible) API key and pick a