jumpin-frontend

A Docker-based Angular 21 frontend, served by Nginx in production.

Prerequisites

Quick Start

Example :
bin/dev build
bin/dev up

To stop:

Example :
bin/dev down

Development

bin/dev Commands

CommandDescription
bin/dev upStart containers
bin/dev downStop and remove containers
bin/dev buildBuild images (--pull --no-cache)
bin/dev restartDown then up
bin/dev npm <cmd>Run npm in container
bin/dev ng <cmd>Run any Angular CLI command in container
bin/dev testRun unit tests once (vitest via ng test --watch=false)
bin/dev test-watchRun unit tests in watch mode
bin/dev lintRun ESLint (ng lint)
bin/dev lint-fixAuto-fix lint issues
bin/dev formatCheck formatting with Prettier
bin/dev format-fixAuto-fix formatting with Prettier
bin/dev logsShow container logs
bin/dev shOpen a shell in the app container
bin/dev exec <args>Run a command in a container
bin/dev psList running containers

Examples

Example :
# Run tests
bin/dev test

# Production build
bin/dev ng build --configuration=production

# Generate a component
bin/dev ng generate component features/my-feature/my-component --standalone --style=scss

# Install a new dependency
bin/dev npm install some-package

# View logs
bin/dev logs -f

Git Hooks

The project includes a pre-commit hook that runs ng lint and prettier --check inside the container before each commit. To activate:

Example :
git config core.hooksPath .githooks

API Client (@tooling/jumpin)

The @tooling/jumpin package is generated by the backend CI pipeline from the OpenAPI spec. It is published with dist-tags based on the backend branch:

Dist-tagBackend branchDescription
latestproductionStable production API client
stagingstagingStaging API client
<branch-name>feature branchesClient from a specific feature branch

To install or update:

Example :
# Install latest production client
bin/dev npm install @tooling/jumpin@latest

# Install staging client
bin/dev npm install @tooling/jumpin@staging

# Install from a specific feature branch
bin/dev npm install @tooling/jumpin@my-feature-branch

Project Architecture

A plain Angular CLI project (no Nx, no monorepo libraries). Everything lives under src/app/:

Example :
src/app/
├── core/
│   ├── config/        # app.config.ts, APP_CONFIG token, runtime /config.json loader
│   ├── guards/        # authGuard, guestGuard, adminGuard
│   ├── store/         # AuthStore, UiStore (NgRx Signal Stores)
│   └── util/          # core helpers
├── shared/
│   ├── components/    # bbc-call-state, bbc-delete-confirm-dialog, bbc-editor, bbc-emoji,
│   │                  # bbc-emoji-picker-dialog, bbc-header, bbc-navigation, bbc-noise-overlay,
│   │                  # bbc-status-indicator, icons/
│   └── util/          # error, logger.service, meta, with-call-state
├── layout/
│   ├── main-layout/   # Wraps dashboard, program, info, map, activities
│   ├── splash-layout/ # Wraps welcome + landing (fullscreen)
│   └── admin-layout/  # Wraps admin pages
└── features/
    ├── welcome/
    ├── landing/
    ├── dashboard/
    ├── program/       # incl. program-header (feature-scoped)
    ├── info/
    ├── map/
    ├── activities/
    └── admin/
        ├── events/
        ├── info-pages/
        └── locations/

Path alias

A single TypeScript alias is defined in tsconfig.json: @/*src/app/*. Use it in imports:

Example :
import { AuthStore } from '@/core/store/auth.store';
import { HeaderComponent } from '@/shared/components/header/header.component';

Conventions

  • Components are standalone (no NgModules).
  • Component selector prefix: bbc- (kebab-case) — enforced by eslint.config.js.
  • Directive selector prefix: bbc (camelCase).
  • Interfaces start with I (e.g. INavigationItem, IAuthState).
  • Explicit type annotations on members, parameters, and return types.

See docs/shared-components.md for the shared-component catalog and the component generator command.

Environment Variables

The app loads its configuration at runtime from /config.json. In development, this file is served from public/config.json with local defaults. In production, it is generated at container startup from environment variables (see .docker/docker-entrypoint.sh).

Development (defaults in public/config.json)

VariableDefaultDescription
AZURE_TENANT_ID36c9760a-...Azure AD tenant ID
AZURE_FRONTEND_CLIENT_ID288ae0ae-...Azure AD Frontend-app registration ID
AZURE_BACKEND_CLIENT_ID123ade3a-...Azure AD Backend-app registration ID
REDIRECT_URI/Post-authentication redirect path
ENDPOINT_URIhttps://jumpin.paka.test/api/jumpin/v1/Backend API base URL
CLIENT_ACCESSaccess_as_userAPI scopes (space-separated)

Production / Staging (set as container environment variables)

VariableDescription
AZURE_TENANT_IDAzure AD tenant ID
AZURE_FRONTEND_CLIENT_IDClient ID of the Frontend Application for the Jumpin App
AZURE_BACKEND_CLIENT_IDClient ID of the Backend Application for the Jumpin App
ENDPOINT_URIBackend API base URL (e.g. https://jumpin.bbcag.ch/api/jumpin/v1/)
REDIRECT_URIPost-authentication redirect path (default: /)
CLIENT_ACCESSAPI scopes (default: access_as_user)

Production

Production deployment is handled by GitLab CI/CD. Pushing to staging deploys to the test server, pushing to production deploys to the production server.

CI/CD Variables

See .gitlab-ci.yml for pipeline configuration. Required variables:

VariableScopeDescription
DUCKY_GCLOUDallGCR authentication JSON key
DUCKY_SSH_KEYallSSH private key
AZURE_TENANT_IDper environmentAzure AD tenant ID
AZURE_CLIENT_IDper environmentAzure AD app registration ID

results matching ""

    No results matching ""