diff --git a/README.md b/README.md index 052b5b8..a7889fb 100644 --- a/README.md +++ b/README.md @@ -1,96 +1,89 @@ -
+# gitone -# GitOne +your github, rated like f1. -**your github, rated like f1** ๐Ÿ +gitone turns a public github profile into a driver card. exp, rac, awa and pac +come from real commits, prs and reviews. no survey, no self-reporting. the card +is a live png, re-scouted every two hours, and it can sit in any readme in one +line. + +https://gitone.langersword.in + +## media - Torvalds' gitone card + live gitone card for torvalds -That card is **live**. It re-scouts a real GitHub profile every two hours and -re-renders itself โ€” your README can carry yours too, in one line: +![gitone report page](public/demo/gitone-report.png) -```md -[![My gitone card](https://gitone.langersword.in/.png)](https://gitone.langersword.in/) -``` +![gitone demo](public/demo/gitone-demo.gif) -Turn any GitHub profile into an F1 driver card. Scored the way the official -F1 games score their grid โ€” EXP, RAC, AWA, PAC โ€” read live from real commits, -PRs and reviews. Race rivals head-to-head and share the result poster. +[full 50s capture](public/demo/gitone-demo.mp4) ยท +[product hunt launch](https://www.producthunt.com/posts/gitone) -**โ†’ [gitone.langersword.in](https://gitone.langersword.in)** ยท -[demo (50s, real capture)](public/demo/gitone-demo.mp4) ยท -[launched on Product Hunt](https://www.producthunt.com/posts/gitone) +## embed your card + +```md +[![my gitone card](https://gitone.langersword.in/.png)](https://gitone.langersword.in/) +``` -If your card rendered in this README, a โญ costs nothing and keeps the scouts at the track. +| route | what it gives | +|---|---| +| `/.png` | live card, re-scouted every 2h | +| `/` | full scout report | +| `//vs/` | head-to-head duel | +| `/api/card/` | raw json | -**โญ Star the repo** โ€” it is the cheapest way to keep the scouts running and -the grid growing: [github.com/LangerSword/gitone](https://github.com/LangerSword/gitone). -Free and open source under the MIT license. +## how it works -
+```text +github graphql -> scout -> exp/rac/awa/pac -> rtg + finish + livery -> satori render -> kv/r2 cache -> live png +``` -
+five decisions carry the product: -## ๐Ÿ  Embed your card +1. **scoring follows the f1 games.** rtg is pace-weighted. raw stats cap at 88, + so the 90s stay a legacy gate. see `lib/racing/engine.ts`. +2. **the numbers come from github.** commits, prs and reviews are read from + graphql. the card never asks the profile owner for a rating. +3. **one tree, two renderers.** the in-app card and the og png use the same + layout through satori, so the embed cannot drift from the page. +4. **the 10ms cap never touches a cold render.** workers serve cached assets and + branded fallbacks. off-path warmers write real pngs to r2. +5. **the driver number is permanent.** constructors carry their own livery and + car spec from the headline language. -| | | -|---|---| -| **`/.png`** | your card, as a live image that re-scouts every 2h | -| **`/`** | the full scout report | -| **`//vs/`** | head-to-head, lights out | -| **`/api/card/`** | the raw JSON | - -## โš™๏ธ  How the scouting works - -The EA F1 games rate every driver on four numbers, with an overall where -**pace carries the greater weight**. Same system here, read straight from -GitHub's GraphQL API โ€” no surveys, no self-reporting. - -| | Stat | Scouted from | -|:--:|:--|:--| -| **PAC** | Pace | commit velocity โ€” laps turned this season | -| **RAC** | Racecraft | PRs worked through other fields, battles judged in review | -| **AWA** | Awareness | hazards flagged, race-by-race presence | -| **EXP** | Experience | seasons on the grid, career mileage | - -Your **RTG** is the pace-weighted headline. Raw stats cap at **88** โ€” the 90s -are a legacy gate bought with years and influence. Your **constructor** is -your headline language with its own livery and a car spec -(COR / TOP / AERO / REL) built from your repos, and your **driver number** is -permanent โ€” #1 is earned at 97+, and #17 is retired, as in the real sport. - -Every card walks out in a finish: **ROOKIE** โ†’ **POINTS** โ†’ **PODIUM** โ†’ -**WINNER** โ†’ **CHAMPION** (legacy-gated), with **IN FORM** on a hot streak -and the founder in their own accent. - -## ๐Ÿงฑ  Stack - -- Next.js 16 App Router + React 19 + Tailwind v4, all TypeScript -- GitHub GraphQL with a hash-sharded token pool, failover, and a windowed - fallback for hyperactive profiles -- Cloudflare Workers via OpenNext; every card, duel poster and social unfurl - is a Satori composite served from a KV cache -- The embed is Satori (`next/og`) rendering the same layout as the in-app - card โ€” one tree, two renderers - -## ๐Ÿ”ง  Run it +## run it ```bash -npm install -echo "GITHUB_TOKEN=ghp_โ€ฆ" > .env.local # a classic PAT; GraphQL needs auth -npm run dev # :3001 -npm test # engine + duel suites +npm install --include=dev # keep dev deps when NODE_ENV=production is set +printf 'GITHUB_TOKEN=ghp_xxx\n' > .env.local +npm run dev # http://localhost:3001 +npm test # engine and duel suites npm run build ``` -## โš ๏ธ  Notes +for cloudflare workers, set `NEXT_PUBLIC_SITE_URL` to the live host. github +graphql needs a classic pat or `GITHUB_TOKENS` from distinct accounts. + +## stack + +| dependency | version | job | +|---|---:|---| +| next | 16.4.6 | app router and server routes | +| react | 19.2.4 | ui tree | +| typescript | 5.x | one typed model for page and og card | +| tailwind css | 4 | styling | +| gsap | 3.15.1 | motion | +| vitest | 4.1.9 | tests | +| opennext cloudflare | 1.20.17 | worker deployment | + +## credits + +inspired by [gitfut](https://github.com/mawsis/gitfut), the football card +original. not affiliated with ea sports, formula 1 or github. mit licensed. +rook is the non-blocking automated reviewer, documented in +[docs/ROOK_REVIEW.md](docs/ROOK_REVIEW.md). -- **Review role:** Rook is the automated reviewer. It posts a non-blocking - review and requests the owner review on PRs authored by someone else. See - [docs/ROOK_REVIEW.md](docs/ROOK_REVIEW.md). -- **License:** MIT โ€” see [LICENSE](LICENSE). Free to embed, self-host and extend. -- Not affiliated with EA SPORTS, Formula 1, or GitHub. -- Inspired by [gitfut](https://github.com/mawsis/gitfut) โ€” the football card - original. gitone is the paddock next door. +if this was worth your five minutes, a star is the whole ask. diff --git a/public/demo/gitone-demo.gif b/public/demo/gitone-demo.gif new file mode 100644 index 0000000..ac56f83 Binary files /dev/null and b/public/demo/gitone-demo.gif differ diff --git a/public/demo/gitone-report.png b/public/demo/gitone-report.png new file mode 100644 index 0000000..5113ef3 Binary files /dev/null and b/public/demo/gitone-report.png differ