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
| Method | Endpoint | Description |
|---|---|---|
GET | /api/trailers/current | Fetch all trailer locations and data |
GET | /api/v1/customer-allocations | Fetch customer-trailer allocations |
GET | /api/movements?limit=500 | Fetch movements for trailer associations |
SSE Streams (Real-time)
| Endpoint | Event Type | Description |
|---|---|---|
/api/trailers/stream | location_update | Real-time trailer location updates |
All endpoints are prefixed with the Tracking Backend URL (
NEXT_PUBLIC_TRACKING_BACKEND_URL).Files
Pages
Pages
pages/fleet/trailers.tsx- Trailer management page
Components
Components
components/TrailerManagement.tsx- Main trailer management componentcomponents/LiveTrailerMap.tsx- Trailer location mapcomponents/fleet/LiveTrailerPage.tsx- Live trailer pagecomponents/fleet/LiveTrailerTable.tsx- Live trailer tablecomponents/fleet/TrailerStatusBadge.tsx- Trailer status badgecomponents/fleet/TrailerSelector.tsx- Trailer selection dropdown
Hooks
Hooks
components/hooks/useUnifiedFleetData.ts- Unified fleet datacomponents/hooks/useTrailerLocations.ts- Trailer location SSE/RESTcomponents/hooks/useCustomerAllocations.ts- Customer-trailer allocationscomponents/hooks/useFleetUrlSync.ts- URL synchronization
Types
Types
types/trailer-locations.ts- Trailer location types
Full documentation with component details, props, and usage examples coming soon.

