You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real-time shipment tracking platform with a Vue 3 frontend and Go backend. Monitor cargo globally with interactive maps, status updates, and timeline tracking.
cd frontend
bun install
npm run dev # Start Vite dev server
npm run build # vue-tsc typecheck + vite build
npm run preview # Preview production build
npm run lint # ESLint check
npm run format # Prettier auto-format
Backend
# With Docker Compose (recommended)cd backend
docker compose up
# Or manually (Postgres required)cd backend
go run .
The backend starts on http://localhost:8080 and the frontend dev server on http://localhost:5173.
Frontend Scripts
Command
Description
npm run dev
Start Vite dev server
npm run build
vue-tsc typecheck + vite build
npm run preview
Preview production build locally
npm run lint
ESLint check (flat config)
npm run format
Prettier auto-format
Features
Tracking search β find shipments by order ID or tracking number from the home page
Filterable manifest β paginated orders table with status filters, text search, and CRUD
Route visualization β Leaflet map showing origin β current β destination with styled polylines and custom markers
Timeline β chronological event history per shipment with status indicators and location
Live telemetry overlay β floating card on map showing current coordinates
Status updates with hub awareness β changing a shipment's status to a hub-based state (departed, in_transit) updates the map position to that hub's real coordinates
Geocoding β addresses are resolved to real lat/lng via OpenCage API before creating orders or hubs
Hub management β CRUD operations for logistics hubs with capacity tracking
Analytics dashboard β KPI cards and carrier performance breakdowns
Dark theme β Ocean Deep OKLCH color palette
Responsive layout β mobile-first grid system
Backend API Overview
Method
Path
Auth
Description
POST
/api/auth/register
No
Register a new user
POST
/api/auth/login
No
Login, returns JWT + cookie
GET
/api/auth/me
JWT
Get current user profile
POST
/api/auth/logout
No
Clear auth cookie
GET
/api/shipments
No
List shipments (paginated, searchable, filterable)
GET
/api/shipments/:orderId
No
Get shipment by order ID
POST
/api/shipments
JWT
Create a new shipment
PATCH
/api/shipments/:orderId/status
JWT
Update status + log event
PUT
/api/shipments/:orderId
JWT
Update shipment fields
DELETE
/api/shipments/:orderId
JWT
Delete shipment + events
GET
/api/track/:trackingNumber
No
Public tracking lookup
GET
/api/hubs
No
List all hubs
GET
/api/hubs/:id
No
Get hub by ID
POST
/api/hubs
JWT
Create a hub
PUT
/api/hubs/:id
JWT
Update hub fields
DELETE
/api/hubs/:id
JWT
Delete a hub
GET
/api/health
No
Container liveness probe
GET
/api/analytics/overview
No
Dashboard aggregate stats
GET
/api/analytics/timeseries
No
Shipment trends by month and day-of-week
GET
/ws/tracking/:trackingNumber
No
Real-time tracking WebSocket
Design Tokens
CSS custom properties defined in frontend/src/styles.css under the :root block:
Token
Purpose
--color-background
Page background
--color-primary
Accent/action color (cyan)
--color-success
Delivered status
--color-warning
Warning states
--color-destructive
Error/delayed states
--color-info
In-transit status
--gradient-hero
Hero section gradient
--shadow-glow
Glowing accent shadow
Environment Variables
Backend (backend/.env)
Variable
Default
Description
PORT
8080
Server listen port
DATABASE_URL
postgres://user:pass@localhost:5432/shipments
PostgreSQL DSN
JWT_SECRET
change-me
HMAC secret for JWT
Frontend (frontend/.env)
Variable
Description
VITE_OPENCAGE_API_KEY
OpenCage Geocoding API key
Documentation
frontend/docs/OVERVIEW.md β Frontend architecture, components, data flow
backend/docs/OVERVIEW.md β Backend architecture, routes, data model
backend/docs/WORKFLOW.md β Detailed request/response flows for every endpoint
About
A real-time shipment tracking platform with a Vue frontend and Go backend. π