How encephos/h2aa-front works
This is a React war-status dashboard for monitoring the Helldivers galactic campaign. The principal evidenced flow is browser entry → status query → backend API → dashboard, with loading/error handling and periodic refresh. The code also exposes map, history, strategy, dispatch, and space-station capabilities. Several component and hook implementations are not included in the excerpts, so their internal wiring is left unspecified rather than inferred.
Main entry points: api.ts API client · App.tsx WarRoom app · GalacticMap.tsx Galactic map · useWarStatus.ts War status query
Components 26
Application entry
- WarRoom app
src/App.tsx
War room views
- War dashboard
src/components/Dashboard.tsx - Loading screen
src/components/LoadingScreen.tsx - Galactic map
src/components/GalacticMap.tsx - Planet grid
src/components/PlanetGrid.tsx - Planet details
src/components/PlanetCard.tsx - Major order
src/components/MajorOrder.tsx - Dispatch feed
src/components/DispatchFeed.tsx - History charts
src/components/GlobalHistoryChart.tsx - Planet history
src/components/PlanetHistoryChart.tsx - Strategy panels
src/components/StrategyPanel.tsx - Tactical analysis
src/components/TacticalAnalysisPanel.tsx - Recommendations
src/components/StrategicRecommendation.tsx - Space stations
src/components/SpaceStations.tsx
Queries and models
- War status query
src/hooks/useWarStatus.ts - History queries
src/hooks/useHistory.ts - Strategy queries
src/hooks/useStrategyDirectives.ts - Dispatch query
src/hooks/useDispatches.ts - Station query
src/hooks/useSpaceStations.ts - War data models
src/types/war.ts - Planet metadata
src/data/planetData.ts - War display utilities
src/utils/warUtils.ts
API integration
- API client
src/services/api.ts - API errors
src/services/errors.ts
Other components
- Operator
- War backend
Connections 16
- Operator → WarRoom app: opens
- WarRoom app → War status query: queries
- War status query → API client: calls
- API client → War backend: requests
- API client → API errors: throws
- War status query → WarRoom app: returns status
- WarRoom app → Loading screen: renders while loading
- WarRoom app → War dashboard: renders status
- Galactic map → History queries: queries interventions
- Galactic map → Strategy queries: queries directives
- Galactic map → Planet history: renders history
- History queries → War backend: fetches history
- Strategy queries → API client: calls
- Dispatch query → API client: calls
- Station query → API client: calls
- API client → War data models: uses response types