type
concept
created
Tue Apr 07 2026 02:00:00 GMT+0200 (Central European Summer Time)
updated
Tue Apr 07 2026 02:00:00 GMT+0200 (Central European Summer Time)
sources
raw/notes/techContext, raw/notes/codeGuidelines
tags
angular frontend tailwind standalone-components onpush reactive-forms

Angular Frontend Stack

abstract
The frontend runs Angular 19 with standalone components, OnPush change detection, inject() for DI, Reactive Forms, Tailwind CSS, and BehaviorSubject-based state management.

Overview

The wiki/entities/b2bpaper frontend is built with Angular 19 (latest stable), using a modern standalone-component architecture. It is built via ng build and deployed as static files served by Nginx. The frontend consumes the Django REST API described in wiki/concepts/django-app-layout.

Core Stack

Technology Purpose Notes
Angular 19 Framework Standalone components, no NgModules
Tailwind CSS Styling Primary styling system; SCSS only as fallback
Angular Material UI Library Form fields, dialogs, tables
ApexCharts (ngx-apexcharts) Charts Never Highcharts
Reactive Forms Forms Never template-driven
TypeScript Language Strict types; never any, use unknown

Component Architecture

Standalone Components

All components are standalone (no NgModules). Each component declares its own imports. This is the Angular 19 default and simplifies the dependency graph.

OnPush Change Detection

All components use ChangeDetectionStrategy.OnPush. This means Angular only checks a component when:

ViewEncapsulation.None

All components use ViewEncapsulation.None, allowing Tailwind utility classes to work without encapsulation barriers.

Dependency Injection

Components use inject() function for DI rather than constructor injection. This is the modern Angular pattern.

State Management

Project Structure

Feature-based organization (not type-based):

frontend/src/app/
    features/
        surplus/
            surplus-list/
                surplus-list.component.ts
                surplus-list.component.html
            surplus-detail/
            surplus.service.ts
            index.ts          # barrel export
        buyers/
        mills/
        containers/
    shared/
        components/
        pipes/
        directives/
    core/
        services/
        guards/
        interceptors/

Naming Conventions

Type Convention Example
Files kebab-case surplus-list.component.ts
Classes PascalCase SurplusListComponent
Interfaces PascalCase, no I prefix SurplusItem
Observables $ suffix surplus$
Private members _ prefix _surplusSubject

Build and Deployment

Key Rules

Sources

Related