BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2 或任何藍牙控制器,搭配 MyWhoosh、Rouvy、Zwift 等。iOS、Android、Windows、macOS 均可免費試用。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
Local-first soccer & futsal coaching PWA with optional cloud sync — your data, your choice.
MatchOps-Local is built for coaches who need privacy, offline reliability, and soccer-specific workflows. Start locally with zero setup, or enable cloud sync to access your data across devices.查看完整 README ↗Local-first soccer & futsal coaching PWA with optional cloud sync — your data, your choice.
MatchOps-Local is built for coaches who need privacy, offline reliability, and soccer-specific workflows. Start locally with zero setup, or enable cloud sync to access your data across devices.
Grouped the way a coach meets them: before the match, during it, and after.
| Layer | Technology |
|---|---|
| Framework | Next.js 16.3, App Router |
| UI | React 19.2, TypeScript 5, Tailwind CSS 4 |
| State | React Query 5, useReducer, useState |
| Local Storage | IndexedDB via custom adapter (src/utils/storage.ts) |
| Cloud Backend | Supabase (PostgreSQL + Auth + Edge Functions) |
| Sync | SyncQueue + SyncEngine (IndexedDB-persisted operation queue) |
| i18n | i18next 25 (English/Finnish) |
| Testing | Jest 30, React Testing Library |
| Error Monitoring | Sentry 10 (production only) |
| PWA | Custom service worker, dynamic manifest generation |
| Deployment | Vercel |
src/
├── app/ # Next.js App Router (page.tsx is main orchestrator)
├── auth/ # Auth implementations
│ ├── LocalAuthService # No-op for local mode
│ └── SupabaseAuthService # Supabase Auth wrapper
├── components/ # 100+ React components
├── config/ # App configuration (backend, query keys, limits)
├── contexts/ # React contexts (Auth, Modal, Toast, Premium)
├── datastore/ # Data layer implementations
│ ├── LocalDataStore # IndexedDB (offline, no account)
│ ├── SupabaseDataStore # Supabase PostgreSQL (cloud)
│ ├── SyncedDataStore # Local-first wrapper (local + cloud sync)
│ └── factory # Mode-aware singleton factory
├── hooks/ # 50 custom hooks
├── interfaces/ # DataStore, AuthService contracts
├── sync/ # Background sync engine
│ ├── SyncQueue # Persistent operation queue (IndexedDB)
│ ├── SyncEngine # Background processor with retry
│ └── createSyncExecutor # Entity-specific sync operations
├── styles/ # Shared style constants
├── types/ # TypeScript type definitions
└── utils/ # Utilities (storage, retry, logger, etc.)
supabase/
├── functions/ # Edge Functions
│ ├── verify-subscription # Play Store billing verification
│ ├── delete-account # GDPR account + data deletion
│ └── _shared/ # Shared utilities (CORS)
└── migrations/ # 47 PostgreSQL migrations with RLS
The app uses a dual-mode architecture selected at first launch:
LocalDataStore reads/writes IndexedDB directly. Zero network, zero auth.SyncedDataStore wraps both LocalDataStore and SupabaseDataStore. Writes go to local first (instant), then queue for cloud sync via SyncEngine. Reads come from local cache, refreshed from cloud periodically.All data access goes through the DataStore interface (src/interfaces/DataStore.ts), accessed via getDataStore() factory. Components never interact with storage directly.
PostgreSQL on Supabase with Row-Level Security on all tables. Key tables: players, teams, seasons, tournaments, games (with game_players, game_events, game_personnel child tables), personnel, player_adjustments, team_rosters, user_settings, warmup_plans, user_consents, subscriptions.
Game saves use an RPC (save_game_with_relations) for atomic multi-table writes with optimistic locking.
Prerequisites: Node 22.x, npm
git clone https://github.com/VillePajala/MatchOps-Local.git
cd MatchOps-Local
npm install
cp .env.example .env.local # configure as needed (see below)
npm run dev # http://localhost:3000
Production build:
npm run build # generates manifest, service worker, changelog
npm run start
Copy .env.example to .env.local:
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | For cloud mode | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | For cloud mode | Supabase anon/public key |
NEXT_PUBLIC_SENTRY_DSN | No | Sentry DSN for error reporting |
SENTRY_AUTH_TOKEN | No | Sentry auth for source map uploads |
ANALYZE | No | true to enable bundle analyzer |
NEXT_PUBLIC_MOCK_BILLING | Dev only | Mock Play Store billing (never in production) |
Local mode requires no environment variables at all.
| Command | Description |
|---|---|
npm run dev | Start Next.js dev server |
npm run build | Production build (manifest + service worker + changelog) |
npm run lint | ESLint |
npm run type-check | TypeScript type checking |
npm test | Run all Jest tests |
npm run test:unit | Unit tests only (src/) |
npm run test:integration | Integration tests (tests/integration/) |
npm run test:critical | Core workflow tests (CI gate) |
npm run test:smoke | Component smoke tests (CI gate) |
npm run test:a11y | Accessibility tests |
npm run test:performance | Performance benchmarks |
npm run test:ci | Full CI suite with bail-on-first-failure |
npm run build:analyze | Bundle analysis (outputs to .next/analyze/) |
npm run e2e | Playwright end-to-end tests |
npm run generate:i18n-types | Regenerate i18n TypeScript types |
6,600+ tests across 346 suites. Configuration in jest.config.js:
detectOpenHandles: true — catches resource leakstestTimeout: 30000 — 30s defaultTest fixtures in tests/fixtures/ provide deterministic mock data for players, games, seasons, tournaments, and settings.
GitHub Actions workflows (.github/workflows/):
release-notes.json. A PR whose files are all outside the app (docs, CI, tests, tooling) does not deploy and is exempt; the same list drives Vercel's ignore step (scripts/vercel-ignore-build.mjs). An app change a coach cannot see takes an entry with "internal": true, which installs without the update banner. No skip labelDeployment via Vercel (auto-deploy on push to master).
| File | Purpose |
|---|---|
src/app/page.tsx | Main orchestrator — hooks, reducers, data fetching |
src/hooks/useGameSessionReducer.ts | Core game logic (timer, score, periods) |
src/hooks/useGameState.ts | Interactive field state (positions, drawings) |
src/interfaces/DataStore.ts | Backend-agnostic data access contract |
src/datastore/factory.ts | Mode-aware singleton factory |
src/sync/SyncEngine.ts | Background sync processor |
src/auth/SupabaseAuthService.ts | Authentication wrapper |
src/config/backendConfig.ts | Backend mode detection |
src/types/index.ts | Core TypeScript interfaces |
src/utils/storage.ts | IndexedDB adapter |
NEXT_PUBLIC_SENTRY_DSN from .env.local to disable.npm run build:analyze with ANALYZE=true.All rights reserved © 2025 Ville Pajala. See LICENSE for details.
MatchOps-Local: Empowering coaches while protecting young athletes' privacy through local-first technology.