Commit Graph

11 Commits

Author SHA1 Message Date
Ivan
45ceeba9e3 feat: rebrand application from Padel Pro to SmashPoint
Complete rename across all layers: UI branding, package names
(@smashpoint/web, @smashpoint/shared), infrastructure (Docker,
DB config), seed data, documentation, and logo/favicon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 02:46:29 +00:00
Ivan
51ecb1b231 feat: add settings and reports pages
- Add settings page with organization, sites, courts, and users tabs
- Add reports page with revenue charts and statistics
- Add users API endpoint
- Add sites/[id] API endpoint for CRUD operations
- Add tabs UI component
- Fix sites API to return isActive field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:27:32 +00:00
Ivan
88c6a7084a feat(clients): add clients management page
Add comprehensive clients management interface including:
- Client table with search, filtering, and pagination
- Client form for creating and editing clients
- Client detail dialog showing profile, membership, and stats
- API endpoint for individual client operations (GET, PUT, DELETE)
- Stats cards showing total clients, with membership, and new this month
- Integration with membership assignment dialog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:38:40 +00:00
Ivan
83fc48d7df feat(dashboard): add dashboard with statistics
- Add dashboard stats API endpoint with key metrics
- Add stat-card component for displaying metrics
- Add occupancy-chart component for court occupancy visualization
- Add recent-bookings component for today's bookings list
- Add quick-actions component for common admin actions
- Update dashboard page with full implementation

Stats include: today's bookings, revenue, occupancy rate,
active members, pending bookings, and upcoming tournaments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:31:23 +00:00
Ivan
c08bb3daca feat(api): add membership plans and subscriptions endpoints
- 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>
2026-02-01 07:21:17 +00:00
Ivan
67eb891b47 feat(api): add tournaments endpoints
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>
2026-02-01 07:09:24 +00:00
Ivan
cca3b50a6d feat(api): add sales and cash register endpoints
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>
2026-02-01 06:58:52 +00:00
Ivan
c298b23b35 feat(api): add products and categories endpoints
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>
2026-02-01 06:54:35 +00:00
Ivan
ef21748191 feat(api): add bookings CRUD and payment endpoints
- 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>
2026-02-01 06:44:54 +00:00
Ivan
d3413c727f feat(api): add courts and availability endpoints
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>
2026-02-01 06:38:13 +00:00
Ivan
a7284925e6 feat(auth): add NextAuth.js with credentials provider
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 06:24:07 +00:00