Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_WEB/llms.txt

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

This guide walks you through running Dragon Guard WMS Web on your local machine. You will clone the repository, point the app at a running Dragon Guard WMS backend, start the Angular dev server, and validate the build — all in four steps. No prior PrimeNG experience is required, but familiarity with the Angular CLI will help.

Prerequisites

Before you begin, make sure the following are available on your machine:
  • Node.js 16+ and npm — verify with node -v and npm -v
  • Angular CLI 15 — install globally with npm install -g @angular/cli@15, or use npx for one-off commands without a global install
  • A running Dragon Guard WMS backend — the .NET Wms.Api must be accessible at a known URL (e.g., http://localhost:5262) before the frontend can authenticate or load data
  • Valid backend credentials — a username and password registered in the Wms.Api tenant you intend to log in to

Setup Steps

1

Clone the repository and install dependencies

Clone the Dragon Guard WMS Web repository and install all npm dependencies:
git clone <repository-url>
cd dragon-guard-wms-web
npm install
This installs Angular 15, PrimeNG 15, and all other packages listed in package.json. Expect the initial install to take a minute or two depending on your connection.
2

Configure the backend URL

Open src/environments/environment.ts and set apiUrl and serverUrl to match the address of your running Dragon Guard WMS backend:
export const environment = {
  production: false,
  apiUrl: 'http://localhost:5262/api',
  serverUrl: 'http://localhost:5262',
  appName: 'Dragon Guard WMS'
};
  • serverUrl is the root of the backend host (used for non-API calls such as file downloads).
  • apiUrl is the base path for all Wms.Api REST endpoints.
If your backend is running on a different host or port, update both values accordingly before starting the dev server.
3

Start the development server

Launch the Angular dev server with the default npm script:
npm start
Angular CLI compiles the application and serves it at http://localhost:4200. The browser will open automatically (or navigate there manually). Hot-reload is active — saving any source file will recompile and refresh the page instantly.Log in with the backend credentials you prepared in the prerequisites. Standard users land on /dashboard; accounts with the SUPERADMIN_SUPREMO role are redirected to /dashboard/supreme.
4

Validate the production build

Before delivering any changes, confirm that the production build completes without errors:
npm run build
Angular CLI compiles the application in production mode (ahead-of-time compilation, tree-shaking, minification) and writes the output to the dist/ directory. A clean build with zero errors is the minimum bar before any handoff or deployment.

Available npm Scripts

ScriptCommandPurpose
npm startng serveStart the local dev server at http://localhost:4200 with hot-reload
npm run buildng buildCompile a production-ready build into dist/
npm run lintng lintRun Angular ESLint rules across the codebase
npm testng testExecute unit tests with the Karma test runner and Jasmine framework
npm run watchng build --watchDevelopment build that recompiles automatically on file changes
For production deployments, do not hardcode a backend IP address in environment.prod.ts. The production environment file defaults to window.location.origin so the frontend works on any host without recompiling. If the backend lives on a different host than the frontend, use the window.__dragonGuardConfig override in src/assets/runtime-config.js to supply the correct URLs at runtime — no rebuild required. See Runtime Configuration for details.

Build docs developers (and LLMs) love