Gestor Deportivo enforces resource limits on a per-user basis through a membership plan system. Each user is assigned a plan that controls how many teams they can create. Plans are managed exclusively on the server; users cannot upgrade or change their own plan.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/gestor-backend/llms.txt
Use this file to discover all available pages before exploring further.
Plan enforcement is entirely server-side. Clients cannot self-assign or escalate a membership plan — only an Admin user can update another user’s plan via the designated endpoint.
Plans and team limits
| Plan | Max Teams | Description |
|---|---|---|
| Plan Gratis | 1 | Default plan assigned to every new account |
| Plan Basico | 3 | First paid tier with expanded team capacity |
| Plan Premium | 10 | Premium tier for clubs and academies with large rosters |
Admin override
Users with the Admin role (role.name === "Admin" and role.value === "2") are exempt from all plan-based limits and can create an unlimited number of teams. Admin status is checked on every team-creation request before the plan limits are evaluated.
Exceeding plan limits
When a user attempts to create a team beyond their plan’s limit, the API responds with HTTP403 and a descriptive error message:
| Plan | Error message |
|---|---|
| Plan Gratis | "En el plan gratis solo puedes registrar 1 equipo" |
| Plan Basico | "En el plan basico solo puedes registrar hasta 3 equipos" |
| Plan Premium | "En el plan premium solo puedes registrar hasta 10 equipos" |
Assigning or changing a plan
Only an Admin user can change a user’s membership plan. Send aPOST request to /api/user/update-data/:userId with the new plan and organisation type in the request body.
The plan to assign. Must be one of:
"Plan Gratis", "Plan Basico", "Plan Premium".The organisation type associated with the user. Must be one of:
"Sin academia o club", "Academia", "Club".Organisation type (academyOrClub)
Each user also carries an academyOrClub field that classifies the type of sports organisation they manage:
| Value | Description |
|---|---|
Sin academia o club | Default — no associated organisation |
Academia | User manages a sports academy |
Club | User manages a registered sports club |
Checking the current plan
The user object returned from a successful login includes themembership field directly in the response, so clients can read the active plan without a separate API call:
Extensibility
The membership system is designed to be extended. New plan tiers can be added to themembership enum on the User model and enforced in the team controller without breaking existing users or plans. Future versions of the API may introduce limits on additional resource types such as events, players, or clubs.