How sanjith0/sentry4d-cv works
Sentry4D is an interactive security-investigation console. The principal workflow is to synchronize CCTV recordings with a 3D room, calibrate camera poses, annotate subject positions from video, and inspect the resulting tracks and cross-camera evidence in the replay. Separate branches cover reconstructed appearance/avatar rendering, an AR view, and investigator tooling. The graph follows shown imports and calls plus README descriptions; several UI internals and the investigator API wiring were not sampled, so those relationships are omitted.
Main entry points: Scene3D.tsx 3D scene · App.tsx Application shell · useReplayStore.ts Master replay state · useEvidence.ts Evidence evaluation
Components 26
Investigation console
- Application shell
src/app/App.tsx - CCTV feeds
src/dashboard/CCTVFeed.tsx - Camera calibration
src/dashboard/CalibrationPanel.tsx - Camera configuration
src/config/cameras.ts - Replay timeline
src/dashboard/ReplayTimeline.tsx
Annotation and tracking
- Annotation panel
src/features/annotation/AnnotationPanel.tsx - Annotation data
src/features/annotation/useAnnotationStore.ts - Video-floor projection
src/lib/videoProjection.ts - Subject tracks
src/features/sentry/useSubjectTracks.ts - Trajectory fusion
src/features/sentry/trajectory.ts - Evidence evaluation
src/features/sentry/useEvidence.ts - Evidence rules
src/features/sentry/evidence.ts - Subject configuration
src/config/subjects.ts
3D scene and replay
- Master replay state
src/store/useReplayStore.ts - View state
src/store/useViewStore.ts - 3D scene
src/scene/Scene3D.tsx - Viewport camera
src/scene/viewportCamera.ts
Reconstruction and AR
- Appearance assets
src/features/reconstruction/useAppearanceStore.ts - Appearance rendering
src/features/reconstruction/AppearanceLayer.tsx - Avatar assets
src/features/reconstruction/useAvatarStore.ts - Avatar rendering
src/features/reconstruction/AvatarLayer.tsx - AR experience
src/ar/ARApp.tsx
Investigator tooling
- Investigator panel
src/features/investigator/InvestigatorPanel.tsx - Investigator service
server/investigator.ts - Server entry
server/vercel/entry.ts
Other components
- Investigator
Connections 29
- Investigator → Application shell: uses
src/app/App.tsx - Application shell → 3D scene: mounts
src/app/App.tsx - Application shell → Replay timeline: mounts
src/app/App.tsx - Application shell → Annotation panel: mounts
src/app/App.tsx - Application shell → Evidence evaluation: starts
src/app/App.tsx - CCTV feeds → Camera configuration: uses camera definitions
- Camera calibration → Camera configuration: edits poses
src/dashboard/CalibrationPanel.tsx - Camera calibration → Master replay state: updates poses
src/dashboard/CalibrationPanel.tsx - Replay timeline → Master replay state: controls playback
- 3D scene → Master replay state: reads time
src/scene/Scene3D.tsx - 3D scene → View state: reads view state
src/scene/Scene3D.tsx - 3D scene → Viewport camera: uses camera
src/scene/Scene3D.tsx - Annotation panel → Annotation data: records annotations
- Annotation panel → Video-floor projection: projects clicks
- Annotation data → Master replay state: reads master time
src/features/annotation/useAnnotationStore.ts - Subject tracks → Annotation data: reads observations
src/features/sentry/useSubjectTracks.ts - Subject tracks → Trajectory fusion: builds tracks
src/features/sentry/useSubjectTracks.ts - Trajectory fusion → Subject configuration: uses track settings
src/features/sentry/trajectory.ts - Evidence evaluation → Annotation data: reads observations
src/features/sentry/useEvidence.ts - Evidence evaluation → Evidence rules: builds and evaluates
src/features/sentry/useEvidence.ts - Evidence evaluation → Master replay state: reads replay state
src/features/sentry/useEvidence.ts - Evidence rules → Subject configuration: uses subject definitions
src/features/sentry/evidence.ts - 3D scene → Appearance rendering: renders
src/scene/Scene3D.tsx - Appearance assets → Appearance rendering: provides assets
- 3D scene → Avatar rendering: renders
src/scene/Scene3D.tsx - Avatar assets → Avatar rendering: provides motion
- AR experience → Appearance rendering: renders
src/ar/ARApp.tsx - AR experience → 3D scene: reuses scene components
src/ar/ARApp.tsx - Server entry → Investigator service: dispatches to
server/vercel/entry.ts