Skip to main content
Documentation In ProgressThis section is currently being developed.

Overview

Trailer Management (/fleet/trailers) provides comprehensive tracking and management for the trailer pool including real-time location, customer allocations, and reefer monitoring.

Key Features

  • Trailer Table - Searchable list with status, location, motion state, and equipment details
  • Detail Panel - Comprehensive trailer info with tabs for specs, telemetry, maintenance
  • Interactive Map - Real-time trailer locations
  • Customer Allocations - Track trailer-customer assignments
  • Reefer Monitoring - Temperature tracking for refrigerated trailers

API Endpoints

REST Endpoints

MethodEndpointDescription
GET/api/trailers/currentFetch all trailer locations and data
GET/api/v1/customer-allocationsFetch customer-trailer allocations
GET/api/movements?limit=500Fetch movements for trailer associations

SSE Streams (Real-time)

EndpointEvent TypeDescription
/api/trailers/streamlocation_updateReal-time trailer location updates
All endpoints are prefixed with the Tracking Backend URL (NEXT_PUBLIC_TRACKING_BACKEND_URL).

Files

  • pages/fleet/trailers.tsx - Trailer management page
  • components/TrailerManagement.tsx - Main trailer management component
  • components/LiveTrailerMap.tsx - Trailer location map
  • components/fleet/LiveTrailerPage.tsx - Live trailer page
  • components/fleet/LiveTrailerTable.tsx - Live trailer table
  • components/fleet/TrailerStatusBadge.tsx - Trailer status badge
  • components/fleet/TrailerSelector.tsx - Trailer selection dropdown
  • components/hooks/useUnifiedFleetData.ts - Unified fleet data
  • components/hooks/useTrailerLocations.ts - Trailer location SSE/REST
  • components/hooks/useCustomerAllocations.ts - Customer-trailer allocations
  • components/hooks/useFleetUrlSync.ts - URL synchronization
  • types/trailer-locations.ts - Trailer location types

Full documentation with component details, props, and usage examples coming soon.