How prabhakaran-jm/stepclear works
StepClear is a Ring-camera accessibility agent. A resident selects a device, views its live stream, captures a frame, marks the accessible route, and explicitly requests analysis; the server validates the request, asks Bedrock to detect objects, and applies deterministic route-overlap geometry. The resident then reviews and resolves findings, with review metadata and the route stored locally. The graph also preserves Ring events and the optional video-processor dashboard. Some UI-to-API details are documented rather than visible in sampled excerpts, so those links are marked dashed where appropriate.
Main entry points: page.tsx App dashboard · stream/route.ts WHEP session endpoint · analyze/route.ts Analysis endpoint · devices/route.ts Device endpoint
Components 31
Resident experience
- App dashboard
app/page.tsx - Live stream hook
app/hooks/useWebRTCStream.ts - Route editor
app/components/RouteZoneEditor.tsx - Analysis panel
app/components/RouteAnalysisPanel.tsx
Ring integration
- Ring authentication
lib/auth.ts - Ring configuration
app/api/ring/config/route.ts - Device endpoint
app/api/ring/devices/route.ts - WHEP session endpoint
app/api/ring/stream/route.ts - Stream utilities
lib/stream-utils.ts
Route assessment
- Route geometry
lib/zone.ts - Analysis endpoint
app/api/analyze/route.ts - Detection validation
lib/analysis.ts - Overlap assessment
lib/obstruction.ts
Events and processors
- Event stream hook
app/hooks/useEventStream.ts - Event panel
app/components/EventPanel.tsx - Event card
app/components/EventCard.tsx - Event endpoint
app/api/ring/events/route.ts - Event broadcaster
lib/sse-broadcast.ts - Webhook endpoint
app/api/webhook/route.ts - Webhook validation
lib/schemas/webhook.ts - Processor dashboard
app/components/ProcessorPanel.tsx - Frame processing loop
lib/video-processors/useVideoProcessing.ts - Processor registry
lib/video-processors/registry.ts - Built-in processors
lib/video-processors/index.ts - Canvas overlay
app/hooks/useCanvasOverlay.ts
Human review
- Review panel
app/components/ReviewPanel.tsx - Review workflow
lib/review.ts - Browser localStorage
Other components
- Resident
- Amazon Bedrock
- Ring Partner API
Connections 38
- Resident → App dashboard: uses
- App dashboard → Live stream hook: renders
app/page.tsx - App dashboard → Route editor: renders
app/page.tsx - Route editor → Route geometry: validates route
app/components/RouteZoneEditor.tsx - App dashboard → Analysis panel: renders
app/page.tsx - Analysis panel → Analysis endpoint: submits frame
- Analysis endpoint → Detection validation: validates request
app/api/analyze/route.ts - Analysis endpoint → Amazon Bedrock: requests detection
- Analysis endpoint → Overlap assessment: assesses result
app/api/analyze/route.ts - Overlap assessment → Route geometry: uses geometry
lib/obstruction.ts - App dashboard → Review panel: renders
app/page.tsx - Review panel → Review workflow: updates review
app/components/ReviewPanel.tsx - Review panel → Browser localStorage: reads and writes
- App dashboard → Ring configuration: fetches config
app/page.tsx - Ring configuration → Ring authentication: gets auth mode
app/api/ring/config/route.ts - App dashboard → Device endpoint: loads devices
- Device endpoint → Ring authentication: gets token
app/api/ring/devices/route.ts - Device endpoint → Stream utilities: uses utilities
app/api/ring/devices/route.ts - App dashboard → WHEP session endpoint: opens live view
- WHEP session endpoint → Ring authentication: gets token
app/api/ring/stream/route.ts - WHEP session endpoint → Stream utilities: uses utilities
app/api/ring/stream/route.ts - WHEP session endpoint → Ring Partner API: manages WHEP session
- Live stream hook → WHEP session endpoint: uses session
- App dashboard → Event stream hook: loads events
app/page.tsx - App dashboard → Event panel: renders
app/page.tsx - Event panel → Event card: renders cards
app/components/EventPanel.tsx - Event stream hook → Event endpoint: subscribes
- Event endpoint → Event broadcaster: reads events
app/api/ring/events/route.ts - Webhook endpoint → Webhook validation: validates payload
app/api/webhook/route.ts - Webhook endpoint → Event broadcaster: publishes event
app/api/webhook/route.ts - App dashboard → Processor dashboard: renders
app/page.tsx - App dashboard → Frame processing loop: runs processing
app/page.tsx - Frame processing loop → Processor registry: gets processors
lib/video-processors/useVideoProcessing.ts - Built-in processors → Processor registry: registers examples
lib/video-processors/index.ts - App dashboard → Built-in processors: registers built-ins
app/page.tsx - App dashboard → Canvas overlay: draws overlays
app/page.tsx - Canvas overlay → Event card: uses event types
app/hooks/useCanvasOverlay.ts - Canvas overlay → Frame processing loop: draws results