How lucker09/dashboard-de-apostas-esportivas works
This is a sports-betting performance dashboard: users register or sign in, manage bankroll and betting references, record and settle bets, then review paginated history and P&L/ROI/win-rate metrics. The React app presents these workflows and calls a Spring REST API; backend services enforce domain rules and repositories persist user, bet, transaction, bookmaker, and tag data in MySQL. Authentication uses JWT. The README documents the broader feature set; only selected frontend and backend implementations were sampled, so some links reflect documented endpoints rather than inspected call sites.
Main entry points: api.js API client · ApostaRepository.java Repositories · App.jsx App and routes · AuthController.java Auth endpoints
Components 25
Web application
- App and routes
bets-frontend/src/App.jsx - Auth context
bets-frontend/src/context/AuthContext.jsx - Bet history
bets-frontend/src/components/BetsTable.jsx - Statistics view
bets-frontend/src/components/StatsDashboard.jsx - Casas and tags
bets-frontend/src/components/GerirCasasETags.jsx - API client
bets-frontend/src/services/api.js
Identity and access
- Auth service
bets-frontend/src/services/authService.js - Auth endpoints
bets-backend/src/main/java/com/dashboard/bets_dashboard/controller/AuthController.java - User endpoints
bets-backend/src/main/java/com/dashboard/bets_dashboard/controller/UserController.java - User service
bets-backend/src/main/java/com/dashboard/bets_dashboard/service/UserService.java - JWT utilities
bets-backend/src/main/java/com/dashboard/bets_dashboard/security/JwtUtil.java - JWT filter
bets-backend/src/main/java/com/dashboard/bets_dashboard/security/JwtAuthenticationFilter.java - Security config
bets-backend/src/main/java/com/dashboard/bets_dashboard/config/SecurityConfig.java
Betting domain
- Bet service
bets-frontend/src/services/betsService.js - Bet endpoints
bets-backend/src/main/java/com/dashboard/bets_dashboard/controller/ApostaController.java - Bet rules and metrics
bets-backend/src/main/java/com/dashboard/bets_dashboard/service/ApostaService.java - Repositories
bets-backend/src/main/java/com/dashboard/bets_dashboard/repository/ApostaRepository.java
Account and references
- Reference services
bets-frontend/src/services/casasService.js - Transaction service
bets-frontend/src/services/transacaoService.js - Transaction endpoints
bets-backend/src/main/java/com/dashboard/bets_dashboard/controller/TransacaoController.java - Transaction rules
bets-backend/src/main/java/com/dashboard/bets_dashboard/service/TransacaoService.java - Bookmaker service
bets-backend/src/main/java/com/dashboard/bets_dashboard/service/CasaDeApostaService.java - Tag service
bets-backend/src/main/java/com/dashboard/bets_dashboard/service/TagService.java
Other components
- Bettor
- MySQL
Connections 29
- Bettor → App and routes: uses
- App and routes → Bet history: routes
- App and routes → Statistics view: routes
- App and routes → Casas and tags: routes
- App and routes → Auth context: checks access
- Bet history → Bet service: loads bets
- Statistics view → Bet service: loads metrics
- Casas and tags → Reference services: manages references
- API client → Auth endpoints: HTTP requests
- API client → Bet endpoints: HTTP requests
- API client → Transaction endpoints: HTTP requests
- Auth service → API client: sends requests
- Bet service → API client: sends requests
- Reference services → API client: sends requests
- Transaction service → API client: sends requests
- Bettor → Auth service: signs in
- Auth endpoints → JWT utilities: creates token
- Auth endpoints → User service: registers user
- User endpoints → User service: manages profile
- Security config → JWT filter: configures
- JWT filter → JWT utilities: validates token
- Bet endpoints → Bet rules and metrics: handles bet actions
- Transaction endpoints → Transaction rules: handles transactions
- Bet rules and metrics → Repositories: reads and writes
- Transaction rules → Repositories: reads and writes
- User service → Repositories: persists users
- Bookmaker service → Repositories: persists bookmakers
- Tag service → Repositories: persists tags
- Repositories → MySQL: stores records