How good665/warfrontmvp works
Warfront is a Unity mobile-game MVP with a FastAPI backend for accounts, combat settlement, online friend matches, and weekly training leagues. The principal flow is a player entering through the game client, authenticating and fetching account state, then playing a mode whose result is settled or scored by the relevant backend subsystem. The tree’s Unity scripts are explicitly described as an older local copy, so their connections to the active project are not assumed. Backend routes and services are only partly sampled; edges below use README statements or visible imports and calls.
Main entry points: main.py FastAPI App · training_service.py Training League Service · database.py Database Session · GameBootstrap.cs Game Bootstrap
Components 21
Unity Client Snapshot
- Game Bootstrap
Assets/Scripts/GameBootstrap.cs - Game API Client
Assets/Scripts/GameApiClient.cs - Local Game Data
Assets/Scripts/GameData.cs
Backend API
- FastAPI App
backend/app/main.py - JWT Security
backend/app/security.py - Experience Routes
backend/app/experience_routes.py - Tutorial and Telemetry
backend/app/experience.py - Online Room Routes
backend/app/online_routes.py - Training Routes
backend/app/training_routes.py
Combat Modes
- Room Matchmaking
backend/app/online_rooms.py - Online Arena
backend/app/online_arena.py - Game Rules
backend/app/game_rules.py
Weekly Training
- Training League Service
backend/app/training_service.py - Replay Scoring
backend/app/training_replay.py - Season Rules
backend/app/training_seasons.py - Training Records
backend/app/training_models.py
Shared State
- Experience Records
backend/app/experience_models.py - Player and Match Records
backend/app/models.py - Database Session
backend/app/database.py - Runtime Configuration
backend/app/config.py
Other components
- Player
Connections 25
- Player → Game Bootstrap: starts game
README.md - Game Bootstrap → Game API Client: uses client
- Game Bootstrap → Local Game Data: uses local data
- Player → FastAPI App: uses server account
README.md - FastAPI App → JWT Security: authenticates
backend/app/main.py - FastAPI App → Online Room Routes: registers routes
backend/app/main.py - FastAPI App → Experience Routes: registers routes
backend/app/main.py - FastAPI App → Training Routes: registers routes
backend/app/main.py - Online Room Routes → Room Matchmaking: dispatches room actions
backend/app/online_routes.py - Room Matchmaking → Online Arena: runs online combat
backend/app/online_rooms.py - Room Matchmaking → Game Rules: uses rules
backend/app/online_rooms.py - Training Routes → Training League Service: dispatches league actions
backend/app/training_routes.py - Training League Service → Replay Scoring: scores submissions
backend/app/training_service.py - Training League Service → Season Rules: uses season rules
backend/app/training_service.py - Training League Service → Training Records: reads and writes
backend/app/training_service.py - Training League Service → Game Rules: uses game rules
backend/app/training_service.py - Experience Routes → Tutorial and Telemetry: records events
backend/app/experience_routes.py - Experience Routes → Experience Records: reads and writes
backend/app/experience_routes.py - Tutorial and Telemetry → Experience Records: stores events
backend/app/experience.py - FastAPI App → Player and Match Records: uses account and match data
backend/app/main.py - FastAPI App → Game Rules: applies rules
backend/app/main.py - Player and Match Records → Database Session: maps records
backend/app/models.py - Experience Records → Database Session: maps records
backend/app/experience_models.py - Training Records → Database Session: maps records
backend/app/training_models.py - Database Session → Runtime Configuration: loads connection settings
backend/app/database.py