How madhuri02n/teamsphere-cpp works
TeamSphere is a team and match scheduling system: managers maintain teams and players, schedule matches with conflict checks, and record flight options. The principal flow runs from the React pages through a shared API client to the C++ HTTP server, resource controllers, scheduling/travel logic, and database, with JSON responses returned to the client. The graph also retains the dashboard, team-detail, and travel capabilities. Relationships reflect README statements and shown source references; unsampled controller and database details are kept at subsystem level where needed.
Main entry points: App.jsx App routes · api.js API client · main.cpp HTTP server · Database.h Database interface
Components 23
React frontend
- App routes
frontend/src/App.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Teams
frontend/src/pages/Teams.jsx - Team details
frontend/src/pages/TeamDetails.jsx - Matches
frontend/src/pages/Matches.jsx - Travel
frontend/src/pages/Travel.jsx - Navigation
frontend/src/components/Navbar.jsx - Status messages
frontend/src/components/Message.jsx - Display formatting
frontend/src/services/format.js - API client
frontend/src/services/api.js
HTTP API
- HTTP server
backend/main.cpp
Resource management
- Team routes
backend/controllers/TeamController.cpp - Player routes
backend/controllers/PlayerController.cpp - Match routes
backend/controllers/MatchController.cpp - Flight routes
backend/controllers/FlightController.cpp - Resource models
backend/models
Domain logic
- Validation and errors
backend/utils - Conflict detection
backend/services/ScheduleService.cpp - Flight ranking
backend/services/TravelService.cpp
Persistence
- Database interface
backend/database/Database.h - MongoDB store
backend/database/MongoDB.cpp - Memory store
backend/database/MemoryDB.cpp
Other components
- Manager
Connections 40
- Manager → App routes: uses
README.md - App routes → Navigation: renders
frontend/src/App.jsx - App routes → Dashboard: routes to
frontend/src/App.jsx - App routes → Teams: routes to
frontend/src/App.jsx - App routes → Team details: routes to
frontend/src/App.jsx - App routes → Matches: routes to
frontend/src/App.jsx - App routes → Travel: routes to
frontend/src/App.jsx - Dashboard → API client: requests
frontend/src/pages/Dashboard.jsx - Teams → API client: requests
frontend/src/pages/Teams.jsx - Team details → API client: requests
frontend/src/pages/TeamDetails.jsx - Matches → API client: requests
frontend/src/pages/Matches.jsx - Travel → API client: requests
frontend/src/pages/Travel.jsx - Dashboard → Status messages: displays
frontend/src/pages/Dashboard.jsx - Teams → Status messages: displays
frontend/src/pages/Teams.jsx - Team details → Status messages: displays
frontend/src/pages/TeamDetails.jsx - Matches → Status messages: displays
frontend/src/pages/Matches.jsx - Travel → Status messages: displays
frontend/src/pages/Travel.jsx - Dashboard → Display formatting: formats
frontend/src/pages/Dashboard.jsx - Matches → Display formatting: formats
frontend/src/pages/Matches.jsx - Travel → Display formatting: formats
frontend/src/pages/Travel.jsx - API client → HTTP server: sends requests
README.md - HTTP server → API client: returns JSON
README.md - HTTP server → Team routes: registers routes
backend/main.cpp - HTTP server → Player routes: registers routes
backend/main.cpp - HTTP server → Match routes: registers routes
backend/main.cpp - HTTP server → Flight routes: registers routes
backend/main.cpp - Team routes → Validation and errors: validates input
backend/controllers/TeamController.cpp - Player routes → Validation and errors: validates input
backend/controllers/PlayerController.cpp - Match routes → Validation and errors: validates input
backend/controllers/MatchController.cpp - Flight routes → Validation and errors: validates input
backend/controllers/FlightController.cpp - Team routes → Database interface: uses storage
- Player routes → Database interface: uses storage
- Match routes → Database interface: reads and writes
backend/controllers/MatchController.cpp - Flight routes → Database interface: reads and writes
backend/controllers/FlightController.cpp - Match routes → Conflict detection: checks conflicts
backend/controllers/MatchController.cpp - Flight routes → Flight ranking: ranks flights
backend/controllers/FlightController.cpp - Database interface → MongoDB store: implemented by
README.md - Database interface → Memory store: implemented by
README.md - Match routes → Resource models: converts match and team data
backend/controllers/MatchController.cpp - Flight routes → Resource models: converts flight data
backend/controllers/FlightController.cpp