How laaqshya/campus-compass works
This is a campus wayfinding web app: visitors open the map, search or select a location, inspect occupancy, choose a start/destination, and follow a crowd-aware walking route. The map route owns that interaction and periodically recalculates routes; navigation state and bundled campus data support it. The tree and excerpts show simulated occupancy rather than a live occupancy service. The router and server provide page delivery and branded error handling; unsampled UI-kit internals are not expanded.
Main entry points: map.tsx Interactive map · server.ts Request handler · routeTree.gen.ts Route registry · LocationPopup.tsx Location details
Components 20
Campus navigation
- Interactive map
src/routes/map.tsx - Navigation state
src/stores/navigationStore.ts - Crowd-aware routing
src/lib/crowdAwareDijkstra.ts - Location markers
src/components/map/LocationBox.tsx - Location details
src/components/map/LocationPopup.tsx - Route display
src/components/map/RoutePath.tsx - Person marker
src/components/map/PersonMarker.tsx - Name formatting
src/utils/titleCase.ts
Map and occupancy data
- Campus locations
src/data/locations.ts
Web application
- Welcome page
src/routes/index.tsx - Route registry
src/routeTree.gen.ts - Router setup
src/router.tsx - App root
src/routes/__root.tsx - Mobile detection
src/hooks/use-mobile.tsx
Error handling
- Request handler
src/server.ts - Start handler
src/start.ts - Error capture
src/lib/error-capture.ts - Branded error page
src/lib/error-page.ts
Other components
- Campus visitor
- TanStack server entry
Connections 25
- Campus visitor → Welcome page: opens
src/routes/index.tsx - Welcome page → Interactive map: links to
src/routes/index.tsx - Router setup → Route registry: loads
src/router.tsx - Route registry → App root: registers
src/routeTree.gen.ts - Route registry → Welcome page: registers
src/routeTree.gen.ts - Route registry → Interactive map: registers
src/routeTree.gen.ts - Campus visitor → Interactive map: uses
src/routes/map.tsx - Interactive map → Campus locations: reads
src/routes/map.tsx - Interactive map → Navigation state: reads and updates
src/routes/map.tsx - Interactive map → Crowd-aware routing: calculates routes
src/routes/map.tsx - Crowd-aware routing → Campus locations: uses locations
src/lib/crowdAwareDijkstra.ts - Interactive map → Location markers: renders
src/routes/map.tsx - Interactive map → Location details: renders
src/routes/map.tsx - Interactive map → Route display: renders
src/routes/map.tsx - Interactive map → Person marker: renders
src/routes/map.tsx - Location details → Navigation state: reads status
src/components/map/LocationPopup.tsx - Location markers → Navigation state: reads state
src/components/map/LocationBox.tsx - Location details → Name formatting: formats names
src/components/map/LocationPopup.tsx - Interactive map → Name formatting: formats names
src/routes/map.tsx - Interactive map → Mobile detection: checks viewport
src/routes/map.tsx - Request handler → TanStack server entry: dispatches requests
src/server.ts - Request handler → Error capture: consumes errors
src/server.ts - Request handler → Branded error page: renders failure
src/server.ts - Start handler → Branded error page: uses fallback
src/start.ts - Request handler → Campus visitor: returns response