The admin panel, accessible atDocumentation 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.
/admin, is the central control hub for every administrative operation in FutsalLeague Manager. From here, admins can monitor the health of the active season at a glance, review the most recent changes made across the platform, manage users and their roles, and upload optimized images for teams and players. The panel is split into dedicated sections — Teams, Players, Users, Competitions (seasons and groups), and Logs — each designed to keep league administration organized and auditable.
Dashboard summary stats
The dashboard loads aggregate statistics for the active season by callingGET /admin/summary. Pass season_id as a query parameter to scope all counts to a specific season; omit it for global totals.
| Field | Description |
|---|---|
totalTeams | Teams with stats or players registered in the season |
totalPlayers | Distinct players registered in the season via team_players |
pendingMatches | Matches with status = 'pendiente' in the season |
totalUsers | Total active user accounts across all seasons |
Recent activity
TherecentActivity array in the summary response contains the last 5 audit log entries. Each entry shows who performed an action and on which entity, giving you a live pulse of changes without navigating to the full logs view.
Admin panel navigation
Teams
Create, edit, soft-delete, and restore teams. Assign teams to seasons and groups.
Players
Manage player profiles, squad registration, jersey numbers, and per-season stats.
Users
View registered accounts, promote users to referee or admin, and deactivate accounts.
Competitions
Create and configure seasons and groups that define the structure of each edition.
Matches
Schedule matches, manage the trash/restore cycle, and export season reports.
Logs
Browse the append-only audit log with filters by user, date, and season.
Role-based access
FutsalLeague Manager has three user roles:user, referee, and admin.
| Capability | User | Referee | Admin |
|---|---|---|---|
| View public match calendar | Yes | Yes | Yes |
| Vote on match outcomes | Yes | Yes | Yes |
| Lock and score live matches | No | Yes | Yes |
| Finalize matches | No | Yes | Yes |
| Full CRUD on teams, players, seasons | No | No | Yes |
| Manage user roles | No | No | Yes |
| Access audit logs | No | No | Yes |
| Upload images | No | No | Yes |
All admin panel endpoints require the
admin role. Requests from users with the referee or user role will receive a 403 Forbidden response. To promote a user to admin, go to the Users section of the admin panel, find the account by username or email, and change their role from the dropdown. The change takes effect immediately on their next request.User management
The Users section lets admins search, list, update, and deactivate accounts. List users —GET /admin/users supports search (matches username or email), page, and limit query parameters:
PUT /admin/users/:id with { "role": "referee" } (valid values: user, referee, admin):
DELETE /admin/users/:id performs a soft delete: the user’s is_active flag is set to false and their username and email are anonymized with a __deleted__<timestamp> suffix to preserve referential integrity while making the account inaccessible:
Image uploads
Admins can upload images for team logos and player photos viaPOST /admin/upload. The endpoint accepts a multipart/form-data request with a field named image.
| Query param | Required | Description |
|---|---|---|
folder | No | Cloudinary folder name (default: general) |
filename | No | Optional public ID override in Cloudinary |
logo_url field when creating or updating a team, or in photo_url when updating a player.