How vipinkumar94997-tech/fantasy-sports-platform works
Fantasy11 is a fantasy-cricket contest platform: users register, browse matches, assemble teams, enter contests, follow live scores and leaderboards, and manage deposits or withdrawals. Administrators manage matches, users, KYC and withdrawal decisions. The frontend routes users into those experiences and calls the API; the backend exposes domain routes, applies controller logic and persists account and game state. Scoring, realtime updates, payments and notifications are distinct capabilities. Source excerpts establish wiring for authentication, administration and wallets; other feature links are shown only where supported by the server’s route mounting.
Main entry points: server.ts HTTP and socket server · App.tsx Fantasy11 app · walletController.ts Wallet and payments · adminController.ts Administration
Components 33
Web application
- Fantasy11 app
frontend/src/App.tsx - Auth experience
frontend/src/pages/Login.tsx - Match and contests
frontend/src/pages/Contests.tsx - Team creation
frontend/src/pages/CreateTeam.tsx - Live match
frontend/src/pages/LiveMatch.tsx - Leaderboard
frontend/src/pages/Leaderboard.tsx - Wallet experience
frontend/src/pages/Wallet.tsx - Admin console
frontend/src/pages/admin/Dashboard.tsx - Session storage
frontend/src/utils/authStorage.ts - Auth service
frontend/src/services/authService.ts - API client
frontend/src/services/api.ts
API and domain
- HTTP and socket server
backend/server.ts - Auth routes
backend/routes/authRoutes.ts - Admin routes
backend/routes/adminRoutes.ts - Authentication
backend/controllers/authController.ts - Administration
backend/controllers/adminController.ts - Wallet and payments
backend/controllers/walletController.ts - Contests and entries
backend/controllers/contestController.ts - Team management
backend/controllers/teamController.ts - Matches and scoring
backend/controllers/matchController.ts - Fantasy scoring
backend/services/scoringEngine.ts - Realtime updates
backend/services/socketService.ts - KYC review
backend/controllers/KycController.ts - Leaderboard
backend/controllers/leaderboardController.ts - Notifications
backend/controllers/notificationController.ts - Payment endpoints
backend/controllers/paymentController.ts
Persistent state
- Relational database
backend/config/db.ts - Users and wallets
backend/models/User.ts - Matches and contests
backend/models/Contest.ts - Transactions and withdrawals
backend/models/Transaction.ts
External services
- Razorpay
Other components
- Player
- Connected clients
Connections 35
- Player → Fantasy11 app: uses
- Fantasy11 app → Auth experience: routes to
- Fantasy11 app → Match and contests: routes to
- Fantasy11 app → Team creation: routes to
- Fantasy11 app → Live match: routes to
- Fantasy11 app → Leaderboard: routes to
- Fantasy11 app → Wallet experience: routes to
- Fantasy11 app → Admin console: routes to
- Auth experience → Auth service: submits auth
- Auth service → API client: sends requests
- Auth experience → Session storage: stores session
- API client → HTTP and socket server: calls API
- HTTP and socket server → Auth routes: mounts
- HTTP and socket server → Admin routes: mounts
- HTTP and socket server → Relational database: connects
- HTTP and socket server → Realtime updates: sets socket server
- Connected clients → HTTP and socket server: connects
- Auth routes → Authentication: dispatches
- Admin routes → Administration: dispatches
- Authentication → Users and wallets: reads and writes
- Authentication → Relational database: transacts
- Administration → Users and wallets: queries
- Administration → Matches and contests: queries and updates
- Administration → Transactions and withdrawals: queries and updates
- Wallet and payments → Users and wallets: reads wallet
- Wallet and payments → Transactions and withdrawals: records funds
- Wallet and payments → Relational database: transacts
- Wallet and payments → Razorpay: creates and verifies
- HTTP and socket server → Contests and entries: mounts contest routes
- HTTP and socket server → Team management: mounts team routes
- HTTP and socket server → Matches and scoring: mounts match routes
- HTTP and socket server → KYC review: mounts KYC routes
- HTTP and socket server → Leaderboard: mounts leaderboard routes
- HTTP and socket server → Notifications: mounts notification routes
- HTTP and socket server → Payment endpoints: mounts payment routes