Skip to main content

Prerequisites

Before you start, make sure you have the following installed:
  • Node.js v20 or later
  • Angular CLI v21 (npm install -g @angular/cli)
Both apps communicate with a backend REST API. You must have the backend running at http://127.0.0.1:8000 before the apps can fetch or submit data. See the environment configuration step below for details.

Setup

1

Clone the repository

git clone <repository-url>
cd front-helpdesk
2

Install dependencies

Install all workspace dependencies with a single command from the project root:
npm install
3

Configure the backend API URL

Each app reads the API base URL from its own environment file. The development defaults already point to a locally-running backend.Public appprojects/public/src/environments/environment.ts:
export const environment = {
  production: false,
  apiBase: 'http://127.0.0.1:8000'
};
Admin appprojects/admin/src/environments/environment.ts:
export const environment = {
  production: false,
  apiBase: 'http://127.0.0.1:8000'
};
Update apiBase in both files if your backend runs on a different host or port. For production builds, edit the corresponding environment.prod.ts files instead — Angular replaces the development file automatically during a production build.
4

Start the public app

ng serve public
The public portal opens at http://localhost:4200. It provides the ticket submission form (/solicitud) and the ticket tracking page (/consulta).
5

Start the admin app

Open a second terminal and run:
ng serve admin
The admin panel opens at http://localhost:4201. It requires login and provides the dashboard, ticket management, and user management views.
Both dev servers can run at the same time because Angular CLI assigns each project its own port when you use ng serve <project>.

Build for production (SSR)

Both apps are configured for Angular Server-Side Rendering (SSR). Use the following commands to create a production build and then serve it with the included Express server.

Build

ng build public
Output is written to dist/public/ and dist/admin/ respectively.

Serve

npm run serve:ssr:public
The SSR servers listen on port 4000 by default. You can override this with the PORT environment variable:
PORT=3000 npm run serve:ssr:public

Build docs developers (and LLMs) love