OpenAthlete
AGPLv3 endurance training platform: EU-oriented hosting, transparent CTL/ATL/TSB logic in code, self-hosting, and full export. Built in Grenoble.
翻譯準備中
尚未偵測到更新。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.