BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2,或任何藍牙控制器搭配 MyWhoosh、Rouvy、Zwift 等。可於 iOS、Android、Windows 與 macOS 免費試用。
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Cricket Captain Availability Voting App
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Cricket club app for weekend match-availability voting and a live points-based player
auction to split available players into two balanced teams. Currently running the BCC
Premier League 2026 tournament.
Live: https://bcccvote.duckdns.org/
Deployment/ops details: see INFRASTRUCTURE.md檢視完整 README ↗Cricket club app for weekend match-availability voting and a live points-based player auction to split available players into two balanced teams. Currently running the BCC Premier League 2026 tournament.
Live: https://bcccvote.duckdns.org/ Deployment/ops details: see INFRASTRUCTURE.md
organizer role gets full admin-console access
except the handful of destructive actions (delete captain/player, reset-device,
close-window-early), which stay admin-only. A new read-only viewer role can see
results/leaderboard but has no vote/bid/admin rights at all.audit_logs
collection (user_id, action, entity_type, entity_id, old_value, new_value,
timestamp), alongside the existing specialized trails (vote overrides, auction
release log, proxy-bid/drop chat notes), which are unchanged.| Layer | Tech |
|---|---|
| Frontend | React 18 + Vite + Tailwind CSS + React Router v6 + Axios, PWA (vite-plugin-pwa) |
| Backend | Flask 3 + PyMongo + flask-jwt-extended + gunicorn (2 sync workers), pytz (IST) |
| Database | MongoDB Atlas (M0 free tier) |
| Prod infra | Single EC2 instance, Docker Compose (Caddy + backend + frontend) — no Kubernetes. See INFRASTRUCTURE.md |
| CI/CD | GitHub Actions, OIDC deploy role (no static AWS keys), deploy via SSM RunCommand |
| Container registry | AWS ECR |
| Weather | OpenWeatherMap free tier (5-day/3-hour forecast), cached in Mongo (2h TTL, 10min on failure) |
| PWA | vite-plugin-pwa, autoUpdate registration — installable, app-shell precached, API calls never cached |
git clone https://github.com/Vennu04/BCC-CVote
cd BCC-CVote
docker-compose up -d
docker-compose run --rm seed # first time only — seeds 4 slots + admin + sample captains
ADMIN / admin@bcc2024 (seed default)MI → mi)Stop: docker-compose down
Deployment, AWS architecture, CI/CD pipeline details, and secrets management are all in INFRASTRUCTURE.md — kept separate from this file since they change independently of the app's own features.
category_total // 2, recomputed live from that slot's actual confirmed voters).linked_captain_id on their
admin account, set by hand for the small number of dual-role admins who need it.For the real-world case where a captain/player confirmed availability by phone/WhatsApp but couldn't cast (or fix) their own vote in the app in time.
POST /admin/votes sets or changes anyone's vote for any slot; DELETE /admin/votes/<slot_id>/<user_id> clears one. Both are admin-only and deliberately bypass
the self-service rules in votes.py (window must be open to vote at all; a short
emergency-revoke deadline after close). Works identically for the 4 fixed slots and any
ad-hoc match.vote_overrides collection (admin,
target person, slot, old → new availability, timestamp).0/O/1/l/I), sets the
forced-change flag, logs who reset whose password and when, and gives admin a
copy-to-clipboard button on the generated password instead of retyping it from a toast.token_version counter embedded in its JWT;
changing a password bumps it, instantly invalidating every other active session for that
account — including a hijacked one — without needing server-side token storage.DEVICE_LOCK_ENABLED — currently disabled for all users (a deliberate config choice,
not a temporary testing state) so players can use the app across multiple devices of their
own.is_player=True so that
same login can also cast an availability vote — counted in the dashboard/summary/exports/
auction pool like any other voter.is_admin=True without changing their role or login —
checked via admin_required's {"role": "admin"} OR {"is_admin": True}. A linked_captain_id
then ties such an account to the real captain record it corresponds to, so it can be blocked
from running an auction it would also be bidding in (see Auction rules).A separate tracking system from match-slot voting — this is about real-world season attendance, used to decide who's eligible once the league stage ends and a knockout round begins.
matches_present / total_matches) is recomputed immediately on every
+1 click, and is what ranks and highlights the list.knockout_eligible in one click; admin can hand-adjust individual checkboxes after.
Bulk edits show an "Unsaved changes" indicator and warn before an accidental refresh/close
discards them.knockout_eligible doesn't gate voting or auction participation.gzip_proxied had to be set explicitly since nginx doesn't compress proxied /api/
responses by default even with gzip on.team_code being attacked rather than caller IP (this app sits behind CloudFront → Caddy
with no verified trusted-proxy chain, so IP-keying would be unreliable). Backed by
MongoDB (flask-limiter + the limits library's Mongo storage), not in-memory.backend/app/indexes.py (single source of truth, also used by scripts/seed.py),
applied idempotently on every app boot.React.lazy in App.jsx) — a captain never downloads
the 5 admin pages' code and vice versa; only Login/ResetPassword stay eagerly loaded.$in queries instead of N per-slot round trips, since this endpoint is polled every 5-10s
from two different admin pages.Sentry.ErrorBoundary) and
backend (Flask integration) and already deployed, but currently inert — no DSN is
configured yet. Both sides no-op safely without one.BCC-CVote/
├── backend/
│ ├── app/
│ │ ├── __init__.py # Flask app factory, blueprint registration
│ │ ├── config.py
│ │ ├── indexes.py # single source of truth for Mongo indexes — also used by scripts/seed.py
│ │ ├── routes/
│ │ │ ├── auth.py # /api/auth/* — login, device binding, change-password
│ │ │ ├── votes.py # /api/slots, /api/votes/* — self-service voting + named per-slot attendance
│ │ │ ├── admin.py # /api/admin/* — captains/players, windows, ad-hoc slots,
│ │ │ │ # admin vote override, attendance/knockout tracking,
│ │ │ │ # reset-device/reset-password, exports
│ │ │ └── auction.py # /api/admin/auction/*, /api/auction/* — live + practice auctions, chat
│ │ ├── services/weather.py # OpenWeatherMap call + Mongo-cached forecast lookup
│ │ └── utils/
│ │ ├── auth.py # JWT decorators + token_version session-invalidation check
│ │ ├── passwords.py # shared password validation + temp-password generation
│ │ ├── time_utils.py # IST timezone helpers, voting-window logic
│ │ └── export.py # CSV/Excel report builders
│ ├── scripts/ # seed.py + one-off migrations (credential regen, roster
│ │ # sync, admin-access grants — see Accounts & security)
│ ├── tests/ # pytest — auth, auction lifecycle, password/device security,
│ │ # admin vote override, attendance
│ ├── Dockerfile, gunicorn.conf.py, run.py
├── frontend/
│ ├── src/
│ │ ├── pages/
│ │ │ ├── Login.jsx, ResetPassword.jsx # public self-service reset form
│ │ │ ├── CaptainDashboard.jsx, PlayerDashboard.jsx, Results.jsx, Auction.jsx
│ │ │ ├── ChangePassword.jsx # forced/self-service password change
│ │ │ └── admin/
│ │ │ ├── AdminDashboard.jsx # captain×slot grid + per-slot "yet to vote" mark-vote panel
│ │ │ ├── ManagePlayers.jsx # captains + players, merged into one page
│ │ │ ├── VotingWindow.jsx # "Add Ad-hoc Match" form + Confirmed/Pending turnout
│ │ │ ├── Attendance.jsx # +1 attendance credit + knockout-eligibility ranking
│ │ │ └── Auction.jsx # auction setup + live control screen
│ │ ├── components/ # Navbar, SlotCard, VotingSlots, WeatherForecast, Footer,
│ │ │ # AuctionRulesNote, AuctionChat, PasswordInput,
│ │ │ # PageBackgroundPhoto, LoadingState, ConfirmDialog,
│ │ │ # ConfirmedPlayersPanel, YetToVotePanel
│ │ ├── hooks/ # useVoting.js, useAuction.js (2.5s polling), useConfirm.js
│ │ ├── context/AuthContext.jsx # sessionStorage-based — per-tab login isolation
│ │ ├── config/appMeta.js # app name/version, tournament name, company name
│ │ ├── utils/ # api.js, device.js, roles.js, formatDate.js, pwaUpdate.js
│ │ └── App.jsx
│ ├── Dockerfile, nginx.conf, vite.config.js # vite-plugin-pwa (autoUpdate)
├── deploy/ # docker-compose.prod.yml, Caddyfile, deploy.sh — see INFRASTRUCTURE.md
├── terraform-new-account/ # current prod infra (EC2, ECR, SSM, IAM) — see INFRASTRUCTURE.md
├── terraform/ # RETIRED — old (decommissioned) account, kept for history only
└── .github/workflows/
├── dev-ci.yml
└── prod-cd-newaccount.yml # the only prod deploy pipeline
DEVICE_LOCK_ENABLED=false) — see
Accounts & security. No end date set; check with the team before
re-enabling.sentry-dsn SSM parameter and a VITE_SENTRY_DSN GitHub Actions secret.league_matches collection, /admin/attendance/ matches/* routes) is retired from the frontend but not removed from the backend — low
priority, not causing any issue, just unused code.backend/tests/).[email protected]) to check
for an unlisted org-tier API; no automated integration built yet.is_test auction with
any two captains and any hand-picked roster, not tied to a real match slot or voting
window, so captains can rehearse the live-bidding flow (including chat) before it matters.
Uses every other auction route unmodified; only creation has its own path./reset-password