BikeControl (SwiftControl)
Use Zwift Click, Zwift Play, Shimano Di2, or any Bluetooth controller with MyWhoosh, Rouvy, Zwift, and more. Free to try on iOS, Android, Windows, and macOS.
PadelHub organizes your club's players by level, position and schedule. When you're one short, you see who to message and reach out on WhatsApp in one tap.
Sports & fitnessTypeScript · PLpgSQLGitHub @Francisco-VillanuevaOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Next.js 16 + TypeScript + Drizzle + Neon Postgres. Diseño: ../docs/system-design.md.
| Comando | Qué hace |
|---|---|
npm run dev | servidor de desarrollo |
npm test | tests (Postgres en memoria con PGlite, incluye aislamiento entre clubes) |
npm run typecheck | TypeScript |
npm run db:generate | genera migración desde src/server/db/schema.ts |
npm run db:migrate | aplica migraciones a Neon (usa DATABASE_URL_MIGRATE) |
src/server/db/schema.ts. RLS, roles y grants: drizzle/0001_rls.sql (SQL a mano).app_user (rutas del club, RLS siempre) y platform_user (auth, superadmin, jobs). La migración los crea NOLOGIN; hay que darles login y clave una vez: ALTER ROLE app_user LOGIN PASSWORD '...'.withTenant(clubId, fn) o withPlatform(fn) (src/server/db/client.ts).club_id necesita en su migración: ENABLE ROW LEVEL SECURITY, policy tenant_isolation, policy platform_all y GRANTs. Agregar un test en tests/tenant-isolation.test.ts..env.example.next-intl, idiomas es, en, pt (messages/*.json, URL con prefijo /es, /en, /pt). Un test falla si falta una clave en algún idioma.
src/server/auth/service.ts (login, refresh rotativo, logout, cambio de club). Endpoints: /api/auth/{login,refresh,logout,switch-club}.ph_at; refresh opaco de 30 días en ph_rt (path /api/auth, solo se guarda su hash). Cada refresh rota el token; reusar uno viejo revoca toda la sesión.src/proxy.ts es un guard optimista (firma y vencimiento). La autorización real: requireClubSession(), requireOwner(), requireSuperadmin() en las páginas y withTenant() en los datos.JWT_SECRET (32+ caracteres).auth_tokens ya existe), CSP con nonce, 2FA de superadmin.padel'hub, rama production)Puesta en marcha desde cero, en orden:
.env.local con DATABASE_URL_MIGRATE (conexión directa del dueño; neon connection-string --project-id <id> --role-name neondb_owner).npm run db:migratenpm run ops:setup-env: da login a app_user y platform_user, y completa DATABASE_URL, DATABASE_URL_PLATFORM y JWT_SECRET (usa --rotate para regenerarlos).npm run ops:smoke y npm run ops:smoke-auth: pruebas contra la base real; crean datos temporales y los borran.tsx directo porque PowerShell se come el -- de npm run:
npx tsx --conditions=react-server scripts/create-superadmin.ts --email <email> --name "<nombre>" --password "<clave>"npx tsx --conditions=react-server scripts/create-club.ts --slug <slug> --name "<nombre>" --owner-email <email> --owner-name "<nombre>" --password "<clave>" [--locale es|en|pt].env.local no se versiona. En Vercel hay que cargar DATABASE_URL, DATABASE_URL_PLATFORM y JWT_SECRET (nunca DATABASE_URL_MIGRATE).
.env.local apunta a la rama dev de Neon (datos de prueba, incluido el club demo-padel: npx tsx --conditions=react-server scripts/seed-demo.ts --password "<clave>").production están en .env.neon-production (a propósito con un nombre que Next no carga solo; antes se llamaba .env.production.local y next start lo habría usado). Esos valores se cargan en Vercel, no se copian a .env.local./[locale]/app/players)Listado con búsqueda y filtros (categoría, género, posición, horario) en la URL, alta manual con consentimiento, ficha editable y baja (solo dueño). Responsive: tabla en pantallas ≥1280px, tarjetas en 2 columnas en tablet, 1 columna con filtros plegables en celular. Servicio: src/server/services/players.ts.
Producción (main) y desarrollo (dev) en Vercel + Neon: ver DEPLOY.md.