AI-assisted construction traffic control planning. Planners enter a job address, Claude suggests MUTCD-compliant device placement on an interactive map, plans are saved to Supabase, and a supervisor approves before field crew can act.
- Planner enters the work zone address and selects road type and speed limit.
- Planner draws the work zone on the map and (optionally) traces road restrictions.
- Claude reads the address, road type, work zone polyline, and notes, then returns devices as offsets (
along_m,lateral_m) which the server projects into exact GPS positions along the polyline using haversine geometry. - Planner fine-tunes positions by dragging markers.
- Plan saves as a Draft. A supervisor must approve before field crew can view it — every AI plan carries a "Requires Licensed Supervisor Approval" disclaimer.
| Layer | Technology |
|---|---|
| Framework | Expo SDK 54 / React Native 0.81.5 |
| Routing | Expo Router v6 (server output for API routes) |
| Map | Mapbox GL JS v3 (web) |
| Database | Supabase (PostgreSQL + RLS + Realtime) |
| AI | Claude claude-sonnet-4-6 via @anthropic-ai/sdk |
Create .env.local in the project root (see .env.example):
EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN=pk.xxx...
EXPO_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=sb_publishable_xxx...
ANTHROPIC_API_KEY=sk-ant-api03-xxx...
EXPO_PUBLIC_ vars are exposed to the browser. ANTHROPIC_API_KEY is server-side only and never sent to the client.
No Anthropic key? The AI falls back to a mock device layout so you can still test the UI.
Run supabase/schema.sql in Supabase Dashboard → SQL Editor to create the tables, RLS policies, updated_at trigger, and realtime publication.
npm install
npm run webOpens at http://localhost:8081.
| Screen | Path | Description |
|---|---|---|
| Plans list | /(tabs) |
All plans with Draft/Approved badges, realtime sync |
| New plan | /plan/new |
Address → draw work zone → AI → save |
| Plan detail | /plan/[id] |
View/drag devices, approve plan |
| Team | /(tabs)/explore |
Team members list |