Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta2/llms.txt

Use this file to discover all available pages before exploring further.

The admin dashboard is the central control panel for the Futsal League Manager. It gives administrators a real-time summary of the league’s state — how many teams and players are registered, how many matches are pending, and how many user accounts exist — alongside the five most recent audit log entries. All data can be scoped to a specific season using the season filter.
The admin panel is only accessible to users with the admin role. Attempting to access any admin route without the correct role returns a 403 Forbidden error.

Dashboard summary

The GET /admin/summary endpoint powers the top of the dashboard. It returns a stats object with four counters:
FieldDescription
totalTeamsNumber of teams registered (scoped to season if filtered)
totalPlayersNumber of distinct players enrolled
pendingMatchesMatches with status = 'pendiente' not yet played
totalUsersTotal user accounts (always global, not season-scoped)
These counts update automatically each time the page loads. When a season_id query parameter is provided, totalTeams and totalPlayers reflect only the teams and players active in that season, and pendingMatches is filtered to the same season. totalUsers is always the global count.

Recent audit logs

Below the summary, the dashboard shows the five most recent audit log entries from the audit_logs table. Each entry exposes:
FieldDescription
actionHuman-readable description of what happened
entity_typeThe kind of record affected (match, team, etc.)
entity_idThe numeric ID of the affected record
usernameThe admin or referee who triggered the action
created_atTimestamp of when the action was recorded
A details JSONB field is also available with context-specific data (for example, the team name on a team creation event). The full log history is available in the Logs section.

Season filter

A season selector at the top of the dashboard lets you scope the stats to a specific season. When a season_id is selected:
  • totalTeams counts teams with stats or player enrollments in that season
  • totalPlayers counts distinct players enrolled via team_players for that season
  • pendingMatches counts only matches belonging to that season
  • Recent audit logs are filtered to entries where season_id matches or is NULL
Selecting no season shows global figures across all seasons. The admin panel is divided into several key sections. Use the cards below to jump directly to each area.

Dashboard

League summary, stats counters, and recent audit activity.

Teams & Players

Create, edit, and manage teams, players, and season enrollments.

Competitions

Manage seasons, groups, and playing fields.

Users

View, update roles, and deactivate user accounts via the admin API.

Audit logs

Browse and filter the full audit log history.

Referee tools

Lock matches, record events, and finalize results.

Build docs developers (and LLMs) love