Este repositorio es un snapshot público sanitizado con fines de portafolio/demostración. No es el código canónico, no se despliega, no recibe mantenimiento y no debe usarse, clonarse ni desplegarse como base de nada. El desarrollo real vive en un repositorio privado separado. Sin secretos, sin credenciales, sin datos reales.
A hyperlocal padel community platform. Spanish-first, mobile-first, offline-ready PWA for recording matches, tracking ELO, and running leagues and tournaments.
This is a public, sanitized snapshot of the PadelZero codebase, shared to demonstrate engineering approach and architecture. All secrets, credentials, and private/business data have been removed. It is not configured to connect to any live environment.
PadelZero replaces the scattered WhatsApp groups and paper scoresheets that most padel communities rely on with a unified platform for recording matches, tracking ELO ratings, running leagues and tournaments, and building a local community. It is a progressive web app: installable, mobile-first, and works offline with a background sync queue.
- Match recording — 1v1 / 2v2 with live scoring and multiple set formats
- ELO rankings — K-factor rating system with tier badges and multiple leaderboards
- Player profiles — stats, match history, ELO charts, head-to-head, pair chemistry
- Auth — email and Google OAuth with auto-profile creation
- Liga system — standings, jornada scheduling, crown transfers, activity feeds
- Americano / Mexicano — round-robin formats with check-in and auto round generation
- Tournament brackets — single elimination and group-stage formats
- Dual-ELO league mode — tracks individual and team ratings together
- Community feed, friend requests, shareable result cards, badges, rival finder, QR profile sharing
- Club directory and court booking sheets, coach profiles, sponsor placements, ELO calculator, CSV export, i18n (ES/EN), full PWA support
- Public AI operations shell under
docs/ai/: prompt registry, eval cases, model-routing policy, and guardrails for assistants, WhatsApp tooling, coach notes, and security reviews.
- Database-backed domain model: profiles, matches, leagues, tournaments, clubs, courts, bookings, notifications, CRM notes, and audit surfaces.
- External API boundaries for Supabase, Stripe, Meta/WhatsApp, Web Push, maps, email, and AI providers.
- Edge-function layer for privileged operations, webhooks, transactional email, checkout, match finalization, push delivery, and messaging agents.
- Security gates for env templates, migration risk, runbooks, and agent safety.
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite |
| Styling | Tailwind CSS |
| State | Zustand |
| Backend | Supabase (Postgres, Auth, Storage, Edge Functions) |
| Hosting | Cloudflare Pages |
| Testing | Vitest + Playwright |
- Row Level Security everywhere. Business logic that needs elevated trust runs in Postgres RPCs and Supabase Edge Functions, not the client. See
supabase/migrations/for the full security model evolution. - Offline-first PWA. Match writes queue locally and sync in the background via the service worker (
src/sw.js). - Tested security posture.
Test/tests/security/contains IDOR, RLS, and access-control tests run against the schema.
src/ React app (components, pages, hooks, stores, lib, utils)
supabase/
schema.sql base schema
migrations/ versioned migrations (incl. the RLS/security hardening trail)
functions/ Supabase Edge Functions
Test/ unit, frontend, security, e2e, and stress tests
scripts/ build, smoke-test, and security-check tooling
docs/ public architecture + AI operations shell
See docs/architecture.md for the sanitized database,
API, edge-function, and integration map.
npm install
cp .env.example .env # fill in your own Supabase project values
npm run devTests:
npm test # unit (vitest)
npm run test:e2e # end-to-end (playwright)This snapshot ships no credentials and no production data. .env.example lists the variable names only. You must point it at your own Supabase project to run it.
Source-available for portfolio / review purposes. Not licensed for redistribution or commercial reuse.