Skip to main content

Documentation Index

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

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

The admin panel is the central control surface for running a Futsal League Manager competition. From here you manage seasons, teams, players, users, and the full competition structure, and you can monitor everything that happens across the platform through a real-time audit log.

Accessing the panel

Navigate to /admin in your browser. The route is protected — you must be logged in with a JWT-authenticated account that has the admin role. Attempting to access the panel with a non-admin account returns a 403 response and redirects to the main site.
If you need admin access, contact another administrator to update your role via Users in the admin panel.

Dashboard

The dashboard (/admin/dashboard) loads automatically when you open the panel. It gives you a high-level snapshot of the league:
WidgetWhat it shows
Total teamsCount of teams active in the selected season, or across all seasons if no season is selected
Total playersCount of distinct enrolled players in the selected season
Pending matchesCount of fixtures with status pendiente (not yet played)
Total usersCount of registered accounts across the whole platform

Filtering by season

Use the season selector at the top of the dashboard to scope all four counters to a specific season. When a season is selected:
  • Team and player counts reflect only teams and players enrolled in that season.
  • Pending matches count only unplayed fixtures in that season.
  • The recent activity log shows audit entries tagged to that season where available, plus entries with no season tag.
When no season is selected the counts are global.

Recent activity

Below the summary widgets the dashboard lists the five most recent audit log entries. Each entry shows the action performed, the user who performed it, and the timestamp. Click Logs in the sidebar to see the full paginated audit trail with search and date filters. The sidebar provides direct access to every management section:

Seasons

Create and configure seasons, set the active season, and import squads and groups from previous seasons.

Teams and players

Add teams and players, assign players to team rosters per season with jersey numbers, and upload logos and photos.

Competitions

Organise groups within a season, assign teams to groups, and manage the playing fields used for fixtures.

Managing matches

Schedule fixtures, assign fields, and record match results and events.

Users

List registered accounts, change roles, and deactivate accounts with automatic data anonymisation.

Audit logs

Full paginated log of every admin action, filterable by season, user, and date.

Image uploads

All image uploads in the admin panel go through a single endpoint:
POST /admin/upload
Send a multipart/form-data request with an image field containing the file. Two optional query parameters control where the image is stored in Cloudinary:
ParameterDescriptionExample
folderCloudinary folder to store the image in. Defaults to general.teams, players
filenameOptional custom filename within the folder.team-logo-fc-example
The endpoint processes the image with Sharp before uploading to Cloudinary, then returns the resulting public URL:
{ "url": "https://res.cloudinary.com/..." }
Use this URL when setting a team’s logo_url or a player’s photo_url. All image operations require an admin JWT.
Upload team logos with ?folder=teams and player photos with ?folder=players to keep your Cloudinary media library organised.

Build docs developers (and LLMs) love