BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2 或任何藍牙控制器,搭配 MyWhoosh、Rouvy、Zwift 等。iOS、Android、Windows、macOS 均可免費試用。
AI 翻译
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
A Next.js 16 app that controls a Bluetooth treadmill in real time, with multi-user support, training program storage, and run history — backed by Vercel Postgres (Neon).
pnpm workspace: apps/web (this app) + packages/core (shared, framework-agnostic BLE/session/training
logic). A React Native mobile client was scaffolded and is currently parked on the archive/mobile branch.
• Next.js 16 (App Router, Turbopack)
• Auth.js v5 — Google OAuth + email/password credentials
• Drizzle ORM + Vercel Postgres (Neon) — serverless PostgreSQL
• Jotai — client-side state
• MUI v9 — UI components查看完整 README ↗A Next.js 16 app that controls a Bluetooth treadmill in real time, with multi-user support, training program storage, and run history — backed by Vercel Postgres (Neon).
pnpm workspace: apps/web (this app) + packages/core (shared, framework-agnostic BLE/session/training
logic). A React Native mobile client was scaffolded and is currently parked on the archive/mobile branch.
docker compose up -d
This starts a Postgres 18 container on localhost:5433 (db: runnerapp, user/pass: runner).
cp apps/web/.env.local.example apps/web/.env.local
Edit apps/web/.env.local and fill in:
DATABASE_URL=postgresql://runner:runner@localhost:5433/runnerapp
AUTH_SECRET=<run: openssl rand -base64 32>
AUTH_TRUST_HOST=true
AUTH_GOOGLE_ID=<your Google OAuth client ID> # optional — skip to use email/password only
AUTH_GOOGLE_SECRET=<your Google OAuth client secret>
To get Google OAuth credentials, create a project at console.cloud.google.com, enable the Google+ API, and add http://localhost:3010/api/auth/callback/google as an authorized redirect URI.
pnpm db:migrate
pnpm dev
Open http://localhost:3010.
| Command | Description |
|---|---|
pnpm dev | Dev server (Turbopack, http://localhost:3010) |
pnpm build | Production build |
pnpm lint | ESLint |
pnpm typecheck | TypeScript typecheck (no emit) |
pnpm test | Vitest unit tests (run once) |
pnpm test:watch | Vitest unit tests (watch mode) |
pnpm storybook | Storybook (http://localhost:6006) |
pnpm db:generate | Generate Drizzle migration from schema changes |
pnpm db:migrate | Apply pending migrations |
pnpm db:studio | Open Drizzle Studio (DB browser) |
apps/web, not the repo root. In
Project Settings → General → Root Directory, set it to apps/web (Vercel's Next.js framework
detection needs this to find apps/web/package.json's next dependency) and enable "Include files
outside of the Root Directory in the Build" (needed since apps/web depends on packages/core via
workspace:*).DATABASE_URL in your project to the connection
string it gives you (the app reads DATABASE_URL, not Vercel's auto-injected POSTGRES_URL).DATABASE_URL # Neon/Vercel Postgres connection string
AUTH_SECRET # openssl rand -base64 32
AUTH_GOOGLE_ID # Google OAuth client ID
AUTH_GOOGLE_SECRET # Google OAuth client secret
NEXTAUTH_URL # https://your-app.vercel.app
apps/web's vercel-build script, which applies pending migrations (scripts/migrate-production.sh, using DATABASE_URL_UNPOOLED when set) before next build. Preview deploys skip them. A failed migration fails the deploy, leaving the previous one live.Pricing: Vercel Postgres (Neon) is free on the Hobby plan — 0.5 GB storage, 190 compute hours/month.