- Add membership-plans API with GET (list active plans) and POST (create plan)
- Add membership-plans/[id] API with GET (plan details with subscriber count), PUT (update), DELETE (soft delete)
- Add memberships API with GET (list with filters) and POST (create membership for client)
- Add memberships/[id] API with GET (membership details), PUT (update/renew/change plan), DELETE (cancel)
- Add memberships/[id]/renew API for renewing memberships with hour reset
- Add clients/[id]/membership API for quick membership lookup (booking discount calculation)
- Include benefit summaries and expiring membership detection in responses
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add complete tournament management interface including:
- Tournament card component with status badges and info display
- Tournament form for creating/editing tournaments
- Bracket view for single elimination visualization
- Inscriptions list with payment tracking
- Match score dialog for entering results
- Tournaments list page with filtering and search
- Tournament detail page with tabs (Overview, Inscriptions, Bracket)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create comprehensive tournament management API with:
- GET/POST /api/tournaments for listing and creating tournaments
- GET/PUT/DELETE /api/tournaments/[id] for tournament CRUD operations
- GET/POST /api/tournaments/[id]/inscriptions for team registration
- PUT/DELETE /api/tournaments/[id]/inscriptions/[inscriptionId] for inscription management
- POST /api/tournaments/[id]/generate-bracket for single elimination bracket generation
- GET/PUT /api/tournaments/[id]/matches/[matchId] for match results and automatic winner advancement
Features bracket generation with proper seeding, bye handling for non-power-of-2 team counts,
and automatic winner advancement to next round matches.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ProductGrid component with category filters and search
- Add Cart component with quantity controls and totals
- Add PaymentDialog with cash/card/transfer payment methods
- Add CashRegisterStatus for opening/closing register
- Add POS page with 70/30 layout (products/cart)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add complete POS (Point of Sale) backend:
- Sales API: list with filters, create with atomicity (stock updates), void/cancel
- Cash register API: open/close registers, get details with payment breakdown
- Transactions API: list transactions, add manual deposits/withdrawals
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add API endpoints for the POS module:
- GET/POST /api/products/categories - List and create product categories
- GET/POST /api/products - List products with filters and create new products
- GET/PUT/DELETE /api/products/[id] - CRUD operations for individual products
- POST /api/products/[id]/stock - Adjust product stock with validation
Features include:
- Zod validation for all inputs
- Organization-scoped access control
- Low stock indicator (stock < minStock)
- Soft delete for products (isActive = false)
- Stock adjustment with reason tracking
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add TimeSlot component with available/booked visual states
- Add BookingCalendar component with date navigation and court columns
- Add BookingDialog for creating bookings and viewing/cancelling existing ones
- Add bookings page with calendar integration
- Fix sidebar navigation paths for route group structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add bookings list/create API with filters (siteId, date, status)
- Add booking detail, update, and delete endpoints
- Add payment processing endpoint with transaction support
- Add clients list/search and create API
- Implement membership discounts (free hours and percentage)
- Validate requests with Zod schemas from shared package
- Include Spanish error messages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add REST API endpoints for court management and availability:
- GET/POST /api/courts for listing and creating courts
- GET/PUT/DELETE /api/courts/[id] for single court operations
- GET /api/courts/[id]/availability for time slot availability
- GET /api/sites for listing organization sites
Features include organization-based filtering, role-based access control,
premium pricing for evening/weekend slots, and booking conflict detection.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Configure Prisma ORM with PostgreSQL database schema including:
- Organization, Site, Court models for multi-tenancy
- User with role-based access and Client for customers
- Booking and Payment models for reservations
- MembershipPlan and Membership for subscriptions
- Product, Sale, SaleItem, CashRegister for POS
- Tournament, TournamentInscription, Match for competitions
- All necessary enums, relations, indexes, and cascading deletes
- Prisma client singleton for Next.js
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete design specification including:
- Multi-site architecture for padel club management
- Booking system with client app and admin panel
- Point of sale (POS) with inventory
- Tournaments and leagues module
- Membership plans with benefits
- Full database schema (Prisma)
- UI/UX guidelines and color palette
- Project structure (monorepo with Turborepo)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>