type
summary
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/articles/FRONTEND-SPEC
tags
frontend angular specification container-fill ui

Frontend Spec Summary

abstract
The FRONTEND-SPEC defines the Angular 19 frontend architecture for the Paper Surplus Marketplace, including project structure, the Container Fill Optimizer page specification, TypeScript interfaces, service layer, deployment configuration, and backend API reference.

Overview

This document served as the blueprint for the Angular frontend (Phase 13). It was written on 2026-02-25 when no frontend code existed yet. The backend was already live with 252 tests passing.

Stack

Project Structure

The frontend lives at /home/claude/customers/marketplace/frontend/ and follows a feature-module architecture:

Container Fill Optimizer Page

The most detailed specification in the document. Route: /containers/fill.

Page Sections (Top to Bottom)

  1. Item Selection Panel -- buyer dropdown (admin) or pre-filled (buyer portal), container type selector (20ft/40ft/40ft HC), searchable multi-select surplus item picker, "Get Fill Suggestions" button
  2. Container Gap Visualization -- horizontal progress bar showing utilization percentage, color-coded (green >85%, yellow 50-85%, red <50%), gap callout in MT
  3. Fill Suggestions Table -- sortable by compatibility score, columns for mill, paper type+GSM, width, grade, available quantity, can-fill quantity, price per MT, origin country, select checkbox
  4. Freight Comparison Card -- side-by-side LCL (partial) vs. FCL (filled) comparison showing weight, shipping mode, freight cost, rate per MT, route, rate source
  5. Savings Summary Banner -- extra product cost, freight savings, net savings (bold green/red), recommendation text

TypeScript Interfaces

Key interfaces specified:

Deployment Configuration

Backend API Endpoints Referenced

Method Endpoint Purpose
POST /mvp/api/container-proposals/fill-suggestions/ Fill suggestions + freight comparison
GET /mvp/api/freight-rates/ List freight rates
GET /mvp/api/surplus/ List surplus items
GET /mvp/api/buyers/ List buyers
POST /mvp/api/auth/login/ JWT login
POST /mvp/api/auth/refresh/ Refresh JWT token

Sources

Related