cd Plainview
npm installnpm run devThis launches:
- Dashboard: http://localhost:5173 (React dev server with HMR)
- API: http://localhost:4000 (Fastify backend)
Navigate to http://localhost:5173 and explore the Command Center.
- Navbar: Logo + navigation tabs (COMMAND CENTER | MISSIONS | FLOWIQ | ALERTS)
- Command Center:
- Left: Asset tree with 4 sample devices
- Center: 3D map placeholder
- Right: Live telemetry metrics
- Bottom: Event timeline scrubber
- Click asset in tree to see telemetry
- Top nav tabs to switch views
- MISSIONS: DAG flow editor + mission list
- FLOWIQ: Pressure/Torque trend charts + AI insights
- ALERTS: Real-time alert stack with filtering
- Go to COMMAND CENTER
- Valve should appear in sidebar
- Behind the scenes: SSE events stream to dashboard in real-time
- Click ALERTS in navbar
- Try "CRITICAL" filter
- Acknowledge or delete alerts
- Look for MISSION REPLAY view (can add to navbar)
- Scrub timeline with slider
- See camera stream + event markers sync
# Dev
npm run dev # All services
npm run dev -w @plainview/api # API only (port 4000)
npm run dev -w @plainview/dashboard # Dashboard only (port 5173)
# Build
npm run build # Production builds
npm run build -w @plainview/api
# Test
npm run test # All tests
npm run test -w @plainview/api -- -t "MODULES" # Single test
# Type Check
npm run typecheck # All workspaces
# Check Coverage
cd services/api && npm run test # Shows coverage┌─────────────────────────────────────────┐
│ Browser (React + Vite) │
│ Dashboard, Views, UI Components │
│ State: Zustand + React Hooks │
└──────────────┬──────────────────────────┘
│ HTTP + SSE
┌──────────────▼──────────────────────────┐
│ Fastify API (Node.js) │
│ /health, /modules, /valves, /events │
│ SSE streaming at /events │
└──────────────┬──────────────────────────┘
│ File I/O
┌──────────────▼──────────────────────────┐
│ data/ (JSON files) │
│ incidents.json, valves.json │
└─────────────────────────────────────────┘
| Token | Value | Usage |
|---|---|---|
| bg | #0C0C0E |
Main background |
| accent | #F5A623 |
Buttons, highlights |
| secondary | #2E9AFF |
Data streams, secondary |
| success | #5FFF96 |
Online, completed |
| warning | #F5A623 |
Alerts, anomalies |
| danger | #FF4040 |
Critical errors |
curl http://localhost:4000/modulescurl http://localhost:4000/valvescurl http://localhost:4000/eventscurl -X POST http://localhost:4000/valves/v-101/actuateapps/dashboard/src/
├── components/
│ ├── ui/ # Design system (Button, Card, Badge, etc.)
│ └── layout/
│ └── Navbar.tsx # Top navigation
├── views/
│ ├── CommandCenter.tsx # Main dashboard
│ ├── Missions.tsx # Mission planner
│ ├── Analytics.tsx # FlowIQ charts
│ ├── Alerts.tsx # Alert console
│ ├── AssetDetail.tsx # Drill-down view
│ └── MissionReplay.tsx # Compliance/replay
├── App.tsx # Main router
├── store.ts # Zustand state
└── index.css # Tailwind + global
services/api/src/
├── modules/ # Domain logic
│ ├── valveops.ts
│ ├── pipelineguard.ts
│ ├── rigsight.ts
│ └── flowiq.ts
├── sse.ts # Event streaming
├── store.ts # File-based persistence
├── server.ts # Fastify setup
└── shared.ts # Constants
- Open Dashboard: http://localhost:5173
- Check Navbar: Navigate through Command Center → Missions → FlowIQ → Alerts
- Click an asset in the left sidebar to see telemetry
- Try the Alerts tab and filter by Critical
- Explore code: All TypeScript—types are enforced end-to-end
- Hot Reload: Dashboard reloads on file changes (Vite)
- API Logs: Check terminal for request/response logging
- Browser DevTools: React DevTools + Network tab show SSE streams
- Data Persistence:
data/directory stores incidents & valve state - CORS Enabled: API accepts requests from localhost:5173
Need help? Check README_BUILD.md for detailed architecture & roadmap.