Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danielsl4/TFG_DAM_2526/llms.txt

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

The admin panel is the central hub for managing every aspect of a FutsalManager league. From here, administrators can configure seasons, schedule matches, manage teams and players, upload media, and review a full audit trail of every action taken in the system.

Roles and permissions

FutsalManager uses three fixed roles. Each role inherits all the capabilities of the roles below it.
RoleWhat they can do
userView public pages, vote on match outcomes, read standings and statistics.
refereeEverything a user can do, plus lock/unlock matches, update match status, record events, and finalize matches.
adminEverything a referee can do, plus create and delete seasons, groups, fields, and matches; upload images; and view the audit log.
The admin panel route /admin is protected by adminGuard. Any user without the admin role who tries to visit it is redirected automatically.

Accessing the admin panel

Navigate to /admin while logged in with an account that has the admin role. The guard reads your JWT and checks the role claim before the page loads.

Dashboard summary

The first page you see after entering /admin is the dashboard. It calls the summary endpoint to populate three counters and a recent activity feed.
GET /admin/summary?season_id={id}
The season_id query parameter is optional. When omitted the counts are global across all seasons. When provided, the counters are scoped to that season. Response shape:
{
  "stats": {
    "totalTeams": 12,
    "totalPlayers": 144,
    "pendingMatches": 3
  },
  "recentActivity": [
    {
      "id": 42,
      "action": "Creación de partido",
      "entity_type": "match",
      "entity_id": 17,
      "created_at": "2025-10-01T18:30:00Z",
      "username": "admin"
    }
  ]
}
FieldDescription
totalTeamsTeams registered (or enrolled in the selected season).
totalPlayersPlayers with at least one roster entry in the season.
pendingMatchesMatches with status pendiente that have not yet started.
recentActivityThe five most recent audit log entries, newest first.
All admin actions — creating seasons, scheduling matches, adding events — are written to the audit log automatically via logAction(). You cannot disable this.

Where to go next

Seasons and groups

Create seasons, define groups, and register fields before scheduling any matches.

Matches

Schedule group-stage and knockout matches, update team assignments, and delete matches.

Referee tools

Lock a match, record goals and cards, and finalize results with standings updates.

Build docs developers (and LLMs) love