尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
Hoops Analytics is a personal basketball shooting tracker: a web dashboard (live at
https://hoops.kalpkan.com) that shows shot maps, session stats and progress, fed by a
Supabase backend. The iPhone capture app is a stub (two SwiftUI files, no working
capture yet); today shots reach the backend through the ingest API described below.查看完整 README ↗Hoops Analytics is a personal basketball shooting tracker: a web dashboard (live at https://hoops.kalpkan.com) that shows shot maps, session stats and progress, fed by a Supabase backend. The iPhone capture app is a stub (two SwiftUI files, no working capture yet); today shots reach the backend through the ingest API described below.
apps/mobile - iPhone app stub (SwiftUI). Planned, not functional yetapps/web - Next.js dashboard for Vercelsupabase - database schema (the hoops schema in the shared Supabase project "platform"), policies, and Edge Functionspackages/contracts - shared TypeScript event contracts and generated types/functions/v1/hoops-ingest-shotx-device-api-key, upserts the session row, and inserts the shot event idempotently by client event idhoops.shot_events; SQL views in the hoops schema (session_summaries etc.) expose the same metrics for SQL consumers/api/dashboard), computes every number in apps/web/lib/dashboard-data.ts (pure, unit-tested against an independent Python ground truth in tests/), and refreshes every 5 seconds400/api/health returns {ok, db, service} (db: ok | skipped | error, HTTP 503 on error) for the uptime monitorx-device-api-key to the Edge Functionid is the canonical client event id and must be stable across retries for idempotent ingestionstarted_at is set from the first accepted event in a session and moves earlier if an earlier shot arrives latereFG% is a bounded mini-hoop proxy (v2, 2026-09-18): 100 * (made + 0.5 * swishes) / (attempts + 0.5 * swishes). The v1 formula divided by attempts only and reached 150 % on a single swishconsistency is max(0, min(100, 100 - 2 * sample_stddev(FG% of the sessions shown))), computed on the same rows as the Session History table; it is "n/a" for a single sessionhoops.overall_analytics view is no longer used by the pageSUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYINGEST_API_KEYPlus NEXT_PUBLIC_POSTHOG_KEY and NEXT_PUBLIC_POSTHOG_HOST for analytics. Names are listed in
.env.example; never commit values. For the Edge Functions, INGEST_API_KEY (and optionally
POSTHOG_KEY) are Supabase Edge Function secrets; SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY
are injected by Supabase automatically.
Written for a non-developer. You should not normally need any of this: the site deploys itself and the settings are already in place.
How to run this on your computer
npx pnpm install.npx pnpm --filter @basketball-stat-tracker/web dev and open http://localhost:3000.
Without a .env file you will see the "Demo data" banner and sample shots, which is fine.npx pnpm test (unit tests for the metric math against tests/fixtures/, the chart, the banners and the ingest validation). To check the live page against the ground truth: curl -s https://hoops.kalpkan.com/api/dashboard > /tmp/p.json && python3 tests/compute-expected-metrics.py --check /tmp/p.json.How to deploy this
main branch on GitHub redeploys the dashboard on Vercel
(project v0-basketball-analytics-dashboard, team "Kk's projects"). Nothing to click.npx vercel --prod --yes from this folder.hoops. To change the database, add a new numbered file in supabase/migrations/ and
apply it (an agent does this with the portfolio-ops runbook "Add a schema to Supabase
Project B"). To redeploy a function: npx supabase functions deploy hoops-ingest-shot
(or health) with your Supabase access token in the shell.Where the settings live
| Setting | Where |
|---|---|
SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, INGEST_API_KEY, NEXT_PUBLIC_POSTHOG_KEY, NEXT_PUBLIC_POSTHOG_HOST | Vercel -> project v0-basketball-analytics-dashboard -> Settings -> Environment Variables |
INGEST_API_KEY, POSTHOG_KEY (for the Edge Functions) | Supabase -> project "platform" -> Edge Functions -> Secrets |
| Database tables and views | Supabase -> project "platform" -> Table Editor, schema hoops |
Domain hoops.kalpkan.com | Cloudflare DNS (record) and Vercel project Settings -> Domains |
| Uptime and keep-alive monitors | UptimeRobot, status page https://stats.uptimerobot.com/a6n3Wx3PBp |
The full operating manual for all of Kalp's sites is the portfolio-ops skill in the
KalpKan/portfolio repo (skills/portfolio-ops/).
{
"id": "0f548d8d-f932-4e8d-a8e4-2fa07aaf6af0",
"deviceId": "iphone-15-pro",
"sessionId": "4c95d8e0-5d9b-4c44-9da0-0ceee3124f8f",
"sessionTitle": "Bedroom mini hoop",
"capturedAt": "2026-04-15T22:14:10.000Z",
"result": "made",
"x": 0.52,
"y": 0.41,
"confidence": 0.94,
"frameId": "frame-00128",
"swish": true
}