The Dashboard Overview is the landing page of the Galactic Tournament application, accessible at the root routeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/HectorDNC/galactic-tournament-front/llms.txt
Use this file to discover all available pages before exploring further.
/. On load it makes a single API call to GET /api/dashboard and surfaces three widgets side-by-side: a species counter card, a top-3 ranking leaderboard, and a last-battle result panel. All widgets share the same loading and error lifecycle so the page either renders completely or shows a clear failure message.
API Endpoint
https://galactic-tournament-app-production.up.railway.app
The endpoint returns a single DashboardDTO object combining species statistics, ranking data, and the latest battle in one round-trip.
Data Model
The total number of intergalactic species currently registered in the system.
An ordered array of the top three species by victory count, used to populate the ranking widget.
The most recently recorded battle, including both fighters and the declared winner.
Example API Response
Dashboard Widgets
Total Species Card
A compact card in the left column displays thetotalSpecies value as a large headline number alongside a group icon. It provides a quick census of how many species have been registered across the galaxy at any given moment.
Top-3 Ranking
The ranking widget occupies the right column and iterates overtop3Ranking. Each entry is displayed as a row with:
| Position | Medal | Colour class |
|---|---|---|
| 1st | 🥇 | text-yellow-500 |
| 2nd | 🥈 | text-gray-400 |
| 3rd | 🥉 | text-amber-600 |
top3Ranking is empty the widget renders a “No ranking data available” placeholder instead.
Last Battle Result
A full-width panel below the two cards shows the most recent fight. Both fighters are displayed side-by-side with a central VS separator. After the result is available the winning fighter’s panel is highlighted in green (bg-green-50) and receives a WINNER badge, while the losing fighter keeps a neutral grey background.
When lastBattle is null (no battles have been recorded yet) the panel renders a “No battles recorded yet” placeholder.
The battle date is formatted using Angular’s DatePipe as dd/MM/yyyy HH:mm.
Loading & Error States
TheOverviewComponent exposes two boolean flags driven by the DashboardService observable:
| Flag | Initial value | Meaning |
|---|---|---|
loading | true | A full-page spinner is shown while the HTTP request is in flight. |
error | false | When the request fails, an error banner replaces all widgets. |
The dashboard widgets are only rendered when
loading is false, error is false, and dashboard is non-null. There is no retry button — refreshing the browser page re-triggers the ngOnInit call.