This guide walks you through setting up a complete local instance of FutsalLeague Manager — backend API, Angular frontend, PostgreSQL database, and Redis cache — so you can start managing seasons and matches right away.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.
Redis is required before starting the backend. The API uses Redis (via ioredis) for caching match data and standings, and for enforcing rate limits on authentication endpoints. The server will log a connection warning and some features will degrade if Redis is unavailable.
Clone the repository and install dependencies
Clone the monorepo and install packages for both the backend and the Angular frontend independently.Install backend dependencies:Install frontend dependencies:
Configure environment variables
Create a
.env file in the backend/ directory. The API reads all configuration from environment variables using dotenv.Initialize the database
Run the initialization script from the The script creates the following enums and tables:Enums:
backend/ directory. It creates all required PostgreSQL enums and tables in the correct dependency order, using IF NOT EXISTS guards so it is safe to re-run.match_phase, match_status, event_type, role, vote_typeTables (15 total): seasons, groups, teams, players, team_players, fields, matches, match_events, users, user_points, team_followers, team_stats, player_stats, match_votes, audit_logsA successful run prints:Start the backend
Start the Express API server from the The server starts on The following route prefixes are available once the server is running:
backend/ directory.http://localhost:3000 by default (override with the PORT env var). On startup it registers all route modules and initializes the cron job scheduler.| Prefix | Purpose |
|---|---|
/login, /register | Authentication |
/users | User management |
/matches | Match management and referee tools |
/teams | Team detail and follower tracking |
/players | Player profiles |
/standings | League standings |
/statistics | Global statistics |
/admin | Admin panel API |
/seasons | Season management |
/groups | Group management |
/fields | Field management |
Start the frontend
In a separate terminal, start the Angular development server from the The app is served at
frontend/ directory.http://localhost:4200. The Angular CLI watches for file changes and hot-reloads automatically. Make sure FRONTEND_URL in your .env matches this origin so the backend CORS headers allow requests from the browser.Create the first admin account
On a fresh database there are no users. Navigate to Log in and navigate to
http://localhost:4200/register to create the first account.After registering, promote the account to admin role directly in the database:http://localhost:4200/admin. The admin panel gives you full access to create your first season, add groups, register teams and players, configure fields, and schedule matches.