High Command
LibraryTemplatesGet startedPricing
Get Pro · $79

Guide

Browse everythingGetting startedThemingYour data

Site

HomeTemplatesPricingChangelog

Templates 4

Command centerProFleetProCustomer trackingProField servicePro

Ops and shell 9

App shellProOps modelProAttention queueProMorning briefProShift handoverProLane panelProOwn-fleet partsProAgent action barProCustomizable dashboardPro

Map 17

PMTiles basemapPMTiles routeTrip hologramProBasemap styleMap geometryMapLand texture and dot lensProException heatmap and risk contoursProLane arcsProShipment layerOwn fleet layerProFleet map layersCurated place labels and sitesRoute traceEdge chipsProMap key, filters and paddingMap kitPro

Time and trips 11

Time and trip modelsEvent fieldProIn-transit rowsProImpact lineProActivity barProReplay clockTime controlPlayback overlayProTrip timetableProStage rowWeek cursorPro

Figures, charts and tables 14

Sourced valueKey-figure tileFigure groupPart barBand sparklineKPI stripProChart kitPop barWaterfall cascadeMargin chartsPro13-week cash ladderProWork tableProField railProHorizon gridPro

Zones and dispatch 10

Zones modelDispatch modelProGeofence layerGeofence eventsGeofence drawProService ringsDensity heatmapJob queueProAssign dialogProStop listPro

Design system 3

ThemeShared helpersUI primitives

Routing 3

Offline road routerAustin road graphAustin areas

Libraries 2

Fleet coreRoute core
High Command

Map, fleet and ops-console components for React. Built in-house, copied into your app with the shadcn CLI.

Product

  • Library
  • Templates
  • Pricing
  • Changelog

Build

  • Get started
  • Accessibility
  • Trip hologram

Templates

  • Command center
  • Fleet
  • Field service

New pieces by email. A short note when a release lands.

One email per release. Unsubscribe any time.

© 2026 High Command Pro licenseTermsPrivacyRefundsMap data © OpenStreetMap contributors · OpenFreeMap
Library/Libraries

Fleet core

Shared types and helpers: vehicles, freshness, distance, clocks.

Free · MITLibrary@highcommand/fleet-core1 file
See it in context
09:00:00simulated · 10x
4 live1 stale0 offline
  • V-101Maria Lopez · 2.0 mi from depotLive · 0s
  • V-104Jamal Carter · 3.7 mi from depotLive · 0s
  • V-107Priya Shah · 3.3 mi from depotLive · 0s
  • V-112Diego Ramos · 3.8 mi from depotLive · 0s
  • V-115Ava Nguyen · 6.9 mi from depotStale · 9m

Bars show time since the last GPS ping; the ticks are freshnessOf's defaults: stale after 2 min, offline after 10 min.

Customize

Installation

$ npx shadcn@latest add @highcommand/fleet-core

Copies the source into your project and pulls in what it needs. First time? Add the registry to components.json.

API

9 functions
  • freshnessOf(ageMs: number, staleAfterMs?: number, offlineAfterMs?: number): Freshness

    `live`, `stale` or `offline` for a ping this many ms old, using the stale/offline cutoffs (defaults 2 and 10 minutes).

  • formatAge(ageMs: number): string

    "45s", "4m", "2h", "3d"

  • formatClock(ms: number): string

    "2:05 PM" in the viewer's locale.

  • plainSpaces(s: string): string

    Node and browsers disagree on the spaces Intl puts in times (U+202F vs U+0020), which breaks SSR hydration. Normalize to plain spaces.

  • lerpAngle(from: number, to: number, t: number): number

    Shortest-path interpolation between two headings, result in [0, 360).

  • distanceMeters(a: LngLat, b: LngLat): number

    Great-circle distance in meters.

  • countByFreshness(vehicles: Vehicle[], now: number, staleAfterMs?: number, offlineAfterMs?: number): Record<Freshness, number>

    How many vehicles are live, stale and offline at `now` (epoch ms), from each vehicle's `lastSeen`.

  • toFeatureCollection(vehicles: Vehicle[], now: number, staleAfterMs?: number, offlineAfterMs?: number, visible?: Freshness[] | undefined): FeatureCollection<Point, GeoJsonProperties>

    GeoJSON points for a MapLibre source (properties: id, label, freshness, age text, heading when known); `visible` keeps only those freshness states.

  • useNow(tickMs?: number, override?: number | undefined): number

    Current time that re-renders every `tickMs`. Pass `override` to freeze it (replays, tests). Starts at 0 until mounted so SSR output is stable.

Dependencies

npm
None beyond React
Builds on
Nothing else in the kit
Used by
Offline road routerAustin areasRoute core
Pro pieces built on this
Trip hologram Pro

Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.

PreviousAustin areasNext Route core

On this page

PreviewInstallationAPIDependencies