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 Futsal League Manager REST API is a JSON HTTP API served by a Node.js/Express backend. All public and authenticated features of the platform — matches, standings, statistics, teams, players, seasons, and admin operations — are available through this API.

Base URL

The API server listens on port 3000 by default. You can override this with the PORT environment variable.
http://localhost:3000
All requests and responses use JSON. Set Content-Type: application/json on every POST and PUT request.

CORS

The server allows requests from all origins:
Access-Control-Allow-Origin: *
Allowed methods: GET, POST, PUT, PATCH, DELETE, OPTIONS.

Authentication

Protected endpoints require a JWT passed as a Bearer token in the Authorization header. See the authentication guide for how to obtain and use a token.

Response format

All responses return JSON. Successful responses vary by endpoint. Error responses always follow this shape:
{
  "message": "Description of the error."
}

HTTP status codes

CodeMeaning
200Request succeeded
201Resource created
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid token
403Forbidden — insufficient role or account inactive/unverified
404Resource not found
409Conflict — resource already exists or record locked
500Internal server error

Rate limiting

Authentication endpoints are protected by a rate limiter backed by Redis. Exceeding the limit returns a 429 response.
  • Limit: 10 requests per IP per 15-minute window
  • Affected endpoints: /login, /register, /forgot-password, /resend-verification
{
  "message": "Demasiados intentos. Por favor, inténtalo de nuevo en 15 minutos."
}
Rate limit metadata is included in standard RateLimit-* response headers.

Route groups

PrefixDescription
/Authentication — login, register, email verification, password reset
/matchesMatch calendar, match detail, pre-match voting, referee and admin match management
/teamsTeam detail, team following
/playersPlayer detail and statistics
/standingsGroup-stage and overall standings
/statisticsGlobal statistics, user rankings, per-user stats
/adminAdmin summary dashboard, user management, audit logs, image upload
/seasonsSeason list, active season, full CRUD for admins
/groupsCompetition group management
/fieldsPlaying field management

Build docs developers (and LLMs) love