Packages

@routess/core

Shared types, Zustand stores, and platform-agnostic utilities.

The foundation package. Everything safe for both web and React Native lives here.

Exports

SubpathContents
@routess/coreRe-exports of stores, types, utils, logger
@routess/core/storesZustand stores: routing, auth, ui
@routess/core/typesShared TypeScript types
@routess/core/utilsGeospatial helpers, formatters, validators

Notable types

  • Coordinate: [lng, lat] tuple
  • Waypoint: { coord: Coordinate, type: 'routed' | 'direct', name?, timestamp? }
  • RouteActivity: 'run' | 'cycle' | 'walk' (with the ROUTE_ACTIVITIES array for runtime validation)
  • RouteVisibility: 'private' | 'unlisted' | 'public' (with ROUTE_VISIBILITIES)
  • RoutingPreferences: { surfacePreference: SurfaceType, avoidFerries, avoidHighways }

Adding a new util

  1. Add the function in src/utils/
  2. Re-export from src/utils/index.ts
  3. Add a unit test alongside it
  4. Bump nothing; the package is workspace:* and not published

Adding a store

Stores live under src/stores/. Keep them framework-free: no React imports, no DOM. Use subscribeWithSelector if you need targeted subscribers.

On this page