f1a7e6c24acbd28439c38d3cdca524b332700238
- Added new date formatting function for better user experience. - Updated layout of the public booking page for improved responsiveness and aesthetics. - Integrated sport selection with visual icons for better clarity. - Enhanced error handling and loading states for availability queries. feat: revamp select complex page for better user interaction - Redesigned the select complex page layout for a more modern look. - Added contextual information about complex selection. - Improved button interactions with loading indicators and icons. style: update CSS variables for a cohesive sports-club theme - Adjusted color variables to reflect a sports-club identity. - Enhanced background styles for both light and dark modes. - Improved overall styling consistency across components.
Playzer Monorepo
Este repositorio contiene:
apps/frontend: React + Vite + TanStack Router/Query.apps/backend: Bun + Hono + Prisma + Better Auth.packages/api-contract: contratos Zod/tipos compartidos.
Requisitos
- Bun reciente
- PostgreSQL disponible
Setup rápido
- Instalar dependencias:
bun install
- Configurar backend:
cp apps/backend/.env.example apps/backend/.env
- Configurar frontend:
cp apps/frontend/.env.example apps/frontend/.env
- Ejecutar migraciones:
bun --filter backend prisma:migrate
Variables de entorno
Backend (apps/backend/.env)
DATABASE_URLBETTER_AUTH_SECRETBETTER_AUTH_URLAPP_BASE_URLCORS_ORIGIN
Frontend (apps/frontend/.env)
VITE_API_BASE_URL
Desarrollo
Backend:
bun run dev:backend
Frontend:
bun run dev:frontend
Todo junto:
bun run dev
Prisma
Regenerar cliente después de cambios de schema:
bun --filter backend prisma:generate
Autenticación
El proyecto usa Better Auth con sesión por cookie.
- Backend:
c.get('user')yc.get('session')en contexto Hono. - Frontend:
authClientconfetchOptions.credentials = 'include'. - Frontend API: Axios con
withCredentials = true. - Backend CORS:
credentials: true.
Deploy (Docker)
- Build context: raíz del monorepo (
./) - Dockerfile:
./Dockerfile - Build args requeridos:
DATABASE_URLVITE_API_BASE_URLBETTER_AUTH_SECRETBETTER_AUTH_URL
Flujo recomendado de cambios de API
- Actualizar contrato en
packages/api-contract. - Implementar backend en
apps/backend. - Consumir contrato desde frontend (
@repo/api-contract).
Description
Languages
TypeScript
99.4%
CSS
0.4%
Dockerfile
0.2%