尚未偵測到更新。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
}