BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2 或任何藍牙控制器,搭配 MyWhoosh、Rouvy、Zwift 等。iOS、Android、Windows、macOS 均可免費試用。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
A web application for managing disc golf putting leagues, tracking scores, and running double-elimination bracket tournaments.
• Score Tracking - Keep score during league events with an easy-to-use interface
• Event Access - Join events using access codes provided by league administrators
• Live Brackets - View real-time bracket updates during tournament play查看完整 README ↗A web application for managing disc golf putting leagues, tracking scores, and running double-elimination bracket tournaments.
npm run simulate:handicap -- --league <id> replays a league's history to tune thresholdsbrackets-model types)npx supabase) for the local databaseClone the repository:
git clone <repository-url>
cd dg-putting-league
Install dependencies:
npm install
Set up environment variables by creating a .env.local file. For the local stack, the URL and
publishable key are printed by npx supabase start (step 4):
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=[PUBLISHABLE_KEY_FROM_SUPABASE_START]
DATABASE_URL=postgresql://app_server:[email protected]:54322/postgres
DATABASE_URL is server-only (never prefix with NEXT_PUBLIC_). The server reads and writes through it after its own authorization checks; Supabase is used only for Auth and Realtime. In production, DATABASE_URL connects via the Supabase Supavisor transaction pooler (port 6543, role app_server.<project-ref>, ?sslmode=require).
Run database migrations, schema generation, and tests:
Pin the Postgres image version to 17.6.1.063 (matching production; image 17.6.1.106 has a known supautils bug) before starting the local stack:
mkdir -p supabase/.temp && echo 17.6.1.063 > supabase/.temp/postgres-version
npx supabase start
npx supabase db reset
supabase/config.toml is committed, so no other local configuration is needed. db reset applies
every migration and supabase/seed.sql (which sets the local app_server password). To apply only
new migrations without wiping data, use npx supabase migration up --local.
Generate Drizzle schema from the local database (verified in CI via npm run db:check):
npm run db:pull
Run database security tests (pgTAP) and integration tests:
npx supabase test db
npm run test:int
Start the development server:
npm run dev
Open http://localhost:3000 in your browser.
app/
├── admin/ # League admin UI (leagues, events, players, brackets, lanes)
├── api/ # Route handlers: parse input, authenticate, call one service
│ ├── public/ # Public reads (rate limited)
│ └── score/ # Access-code scoring (rate limited)
├── auth/ # Login, sign-up, password reset
├── event/[eventId]/ # Public event pages (bracket, results)
├── leagues/ # Public league pages
├── player/, players/ # Public player profiles and search
├── score/ # Access-code scoring UI (matches, qualification)
├── error.tsx # Error boundary (global-error.tsx for the root layout)
└── page.tsx # Home page
components/ # Shared UI components (shadcn/ui in components/ui)
lib/
├── services/ # Business logic, authorization, transactions
├── repositories/ # Drizzle queries (*.db.ts), one per table or aggregate
├── db/ # Drizzle client, generated schema, transaction and lock helpers
├── supabase/ # Supabase Auth clients and the request proxy (CSRF, sessions)
├── errors/ # Domain errors and handleError
└── types/ # API DTOs
integration/ # Integration tests against the local database
supabase/migrations/ # Schema migrations (additive; init_* files are the frozen baseline)
supabase/rollbacks/ # Emergency rollback SQL (not run by the CLI)
supabase/tests/ # pgTAP database security tests
See docs/architecture.md for layering, the trust model and transaction conventions.
npm run lint
npm run type-check
npm test # unit tests (Jest)
npm run test:int # integration tests (needs the local Supabase stack)
npx supabase test db
npm run db:check # lib/db/schema.ts matches the migrations
npm run build
This project is source-available. Viewing is allowed, but reuse, redistribution, or deployment requires permission from the author.