Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HectorDNC/galactic-tournament-front/llms.txt

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

This guide walks you through cloning the repository, installing dependencies, pointing the app at your backend, and starting the Angular development server. From a fresh machine to a running dashboard takes less than five minutes.

Prerequisites

Before you begin, make sure the following tools are available on your system:
  • Node.js 20 or laternodejs.org
  • pnpm (recommended) or npm — pnpm is the package manager used by the project’s lockfile. Install it with npm install -g pnpm if needed.
  • Angular CLI (optional) — enables standalone ng commands: npm install -g @angular/cli

Setup

1

Clone the repository

Download the source code and move into the project directory.
git clone <repository-url>
cd angular-dashboard
2

Install dependencies

Install all Node dependencies. pnpm is recommended because the project ships a pnpm-lock.yaml lockfile, which guarantees reproducible installs.
pnpm install
3

Configure the API URL

The development server reads its API base URL from src/app/environments/environment.development.ts. Open the file and set api_url to wherever your backend is running.
src/app/environments/environment.development.ts
export const environment = {
    production: false,
    api_url: 'http://localhost:8080',
};
Change http://localhost:8080 to match your backend’s address if it runs on a different host or port. For reference, the production environment file looks like this:
src/app/environments/environment.prod.ts
export const environment = {
    production: true,
    api_url: 'https://galactic-tournament-app-production.up.railway.app',
};
Angular bakes environment values into the compiled bundle at build time. If you update this file after a build, you must restart the dev server or rebuild for the change to take effect.
4

Start the development server

Launch the Angular dev server using the dev script, which activates the development configuration and hot-reloading.
pnpm run dev
If port 4200 is already in use on your machine, pass a custom port flag:
ng serve --port 4201
5

Open the dashboard

Once the compiler finishes (look for ✔ Browser application bundle generation complete), open your browser to:
http://localhost:4200
You should see the Galactic Tournament Overview dashboard. Navigate to /species, /battles, or /battle-statistics using the sidebar.

Available scripts

All scripts are defined in package.json and invoked with pnpm run <script> or npm run <script>.
ScriptCommandDescription
devng serve --configuration developmentStarts the dev server with development environment (hot-reload enabled)
startng serve --configuration productionStarts the dev server using the production environment file
buildng buildCompiles a production bundle into dist/ng-tailadmin/browser
testng testRuns unit tests via Karma and Jasmine
watchng build --watch --configuration developmentContinuously rebuilds on file changes
The start script uses --configuration production, which points api_url at the live Railway backend. Use pnpm run dev for local development against a local backend.

Build docs developers (and LLMs) love