아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
new tournament app
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Pickleball tournament platform: registration, brackets and automatic court assignment. Built for our gym's tournaments (100–300 players) and for other tournament directors to run theirs on the same platform.
web/ – Next.js website: public tournament pages, team pages for players, the director's court desk, setup, and a full-screen TV boardsupabase/migrations/ – Postgres schema, the court engine (queue, assignment, brackets, standings) and access rulestests/db/ – engine tests, run against the real migrations in PGlite (Postgres in WebAssembly, no Docker)scripts/simulate.ts – plays a 200-player tournament day through the engine and reports how well courts were useddocs/api.md – the backend API, also the spec for the Kotlin mobile appsNeeds Node.js 20 or newer.
npm run demo # → http://localhost:3000
This installs the website's packages on the first run and starts it with its own database on your computer: no accounts, keys or internet services. No account needed: press Start one in play on the home page (or Sign in, which signs you in as the shared guest). View as director / View as player at the top of a tournament switches between the director's tools and what a player sees. On the court desk, fast-forward plays the day forward; texts appear on the tournament's Texts page and on each team's page instead of being sent.
npm install # root tools: Supabase CLI, PGlite, Vitest
npm --prefix web install
cp web/.env.example web/.env.local
web/.env.local chooses where the data lives; the example starts in local mode and lists every setting.
With NEXT_PUBLIC_DATA_MODE=local, the dev server runs its own Postgres (PGlite) with the same migrations, engine and access rules as Supabase. Data is kept in web/.local-db/. It's rebuilt from scratch whenever a migration file changes, so delete that folder any time you want a clean start.
Local mode is always a demo: Sign in signs you in as the shared guest in one click, or use Start one in play or Start at check-in on the home page. A dozen sample tournament listings across several states fill the home page and /tournaments; they're posted again with new dates once they've all passed. On the court desk, fast-forward (+5 min, +15 min, +1 hr) plays the tournament forward: players arrive, matches finish and scores go in.
Setting (web/.env.local) | Effect |
|---|---|
| none | Test checkout: a built-in page with Pay/Cancel stands in for Stripe; nothing is charged |
STRIPE_SECRET_KEY=sk_test_…, STRIPE_WEBHOOK_SECRET=whsec_… | Real Stripe Checkout (test mode with a test key). Webhook: /api/stripe/webhook, event checkout.session.completed. Locally: stripe listen --forward-to localhost:3000/api/stripe/webhook |
STRIPE_CONNECT_WEBHOOK_SECRET | The connected-accounts webhook: players pay into each director's own Stripe account (docs/payments.md) |
| none | Text log: texts are recorded on the tournament's Texts page, not sent |
TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_FROM_NUMBER (or TWILIO_MESSAGING_SERVICE_SID) | Real texts with Twilio (SMS_MODE=log forces the log). Setup, delivery reports and checks: docs/twilio.md |
NEXT_PUBLIC_APP_URL | Base for the score links in texts and Stripe's return pages (default: the production domain on Vercel, otherwise http://localhost:3000); with a public https address, Twilio also reports delivery to /api/twilio/status |
SUPABASE_SECRET_KEY | Supabase mode only: lets the server confirm payments and send texts |
DUPR_CLIENT_KEY, DUPR_CLIENT_SECRET | Partner keys from DUPR: "Refresh DUPR ratings" reads real ratings (see docs/dupr.md) |
NEXT_PUBLIC_VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY | Free match alerts to phones in place of texts (docs/alerts.md) |
NEXT_PUBLIC_TURNSTILE_SITE_KEY | Supabase mode: a Cloudflare Turnstile check on sign-up, log-in and sign-in links, against bot sign-ups. Put the widget's secret key in Supabase (Authentication → Bot and Abuse Protection → Turnstile) after this is deployed. On a demo site the guest sign-in is checked too (a hidden widget that asks for a click only if Cloudflare wants one) |
Local mode sends queued texts automatically every few seconds.
NEXT_PUBLIC_DEMO_MODE=1 makes a hosted copy anyone can try with one shared guest account: one-click practice tournaments, a director/player view switch, fast-forward, team pages that show the texts their players got, test checkout and text log only. Setup and what testers can do: docs/demo-site.md.
Remove NEXT_PUBLIC_DATA_MODE=local and set the project URL and publishable key. Push the database to the linked project:
npx supabase login
npx supabase link --project-ref <project-ref>
npx supabase db push
npm run demo # local mode, installs what's missing first
npm run dev # website at http://localhost:3000
npm run test:db # engine tests
npm run simulate # 200-player simulation; --seed N, --players N, --courts N, --overdue MINUTES
여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗
CRON_SECRET | Supabase mode only: protects /api/texts/send, which a scheduler calls every minute |