How dharanes/sportify works
This repository implements a sports-turf discovery, management, and booking product, with a React client and Spring-based services. Users browse turfs, inspect games, courts, and availability, then book and pay; owners register and manage turfs, while customers and admins have profile and administration workflows. Turf, booking, customer, gateway, and Stripe services form distinct backend capabilities. The graph shows only relationships visible in excerpts or SOURCE INDEX references; cross-service HTTP wiring and several runtime interactions are not sampled, so those links are omitted rather than inferred.
Main entry points: main.jsx Web application · Booking.jsx Booking flow · RouteConfig.java API gateway · TurfController.java Turf API
Components 25
Web client
- Web application
FRONTEND/src/main.jsx - Turf discovery
FRONTEND/src/components/FindTurf/FindTurf.jsx - Turf details
FRONTEND/src/components/Turf/TurfDetails.jsx - Booking flow
FRONTEND/src/components/Booking/Booking.jsx - Payment flow
FRONTEND/src/components/Booking/Payment.jsx - Turf registration
FRONTEND/src/components/Profile/AddTurf.jsx - Admin dashboard
FRONTEND/src/components/Admin/AdminDashboard.jsx - API client
FRONTEND/src/Api/api.js
Access and identity
- Auth state
FRONTEND/src/ReduxToolKit/AuthSlice.js - API gateway
BACKEND/Gateway/src/main/java/com/gateway/config/RouteConfig.java - JWT utilities
BACKEND/Gateway/src/main/java/com/gateway/util/JwtUtil.java - Customer accounts
BACKEND/CustomerService/src/main/java/com/customer/service/CustomerService.java - Customer exceptions
BACKEND/CustomerService/src/main/java/com/customer/exception/CustomerAlreadyExistsException.java
Turf management
- Turf API
BACKEND/TurfService/src/main/java/com/turf/controller/TurfController.java - Game and court API
BACKEND/TurfService/src/main/java/com/turf/controller/GameController.java - Turf operations
BACKEND/TurfService/src/main/java/com/turf/service/TurfService.java - Turf records
BACKEND/TurfService/src/main/java/com/turf/repository/TurfRepo.java
Booking and payment
- Booking API
BACKEND/BookingService/src/main/java/com/booking/controller/BookingController.java - Booking operations
BACKEND/BookingService/src/main/java/com/booking/service/BookingService.java - Booking records
BACKEND/BookingService/src/main/java/com/booking/repository/BookingRepository.java - Payment API
BACKEND/payment-stripe/src/main/java/com/payment/controller/PaymentController.java - Stripe checkout
BACKEND/payment-stripe/src/main/java/com/payment/service/StripeService.java
Service platform
- Service registry
BACKEND/Eureka/src/main/java/com/eureka/EurekaApplication.java
Other components
- User or owner
- Stripe
Connections 18
- User or owner → Web application: uses
- Web application → Turf discovery: routes to
FRONTEND/src/main.jsx - Web application → Turf details: routes to
FRONTEND/src/main.jsx - Web application → Booking flow: routes to
FRONTEND/src/main.jsx - Web application → Turf registration: routes to
FRONTEND/src/main.jsx - Web application → Admin dashboard: routes to
FRONTEND/src/main.jsx - Auth state → API client: calls
FRONTEND/src/ReduxToolKit/AuthSlice.js - User or owner → API gateway: requests
- API gateway → JWT utilities: uses
- Customer accounts → Customer exceptions: declares errors
BACKEND/CustomerService/src/main/java/com/customer/service/CustomerService.java - Turf API → Turf operations: delegates to
BACKEND/TurfService/src/main/java/com/turf/controller/TurfController.java - Game and court API → Turf operations: delegates to
BACKEND/TurfService/src/main/java/com/turf/controller/GameController.java - User or owner → Turf API: browses
- Booking API → Booking operations: delegates to
BACKEND/BookingService/src/main/java/com/booking/controller/BookingController.java - Payment API → Stripe checkout: delegates to
BACKEND/payment-stripe/src/main/java/com/payment/controller/PaymentController.java - Stripe checkout → Stripe: creates checkout
BACKEND/payment-stripe/src/main/java/com/payment/service/StripeService.java - User or owner → Booking API: books
- Booking flow → Payment flow: continues to