Align the current prototype with SPEC-1-Shadow-Real-Time-KYC-Integrity-Validator, focusing on Role Separation (User/Tenant), Session Gateway, and Database Integration.
- Frontend: Single Dashboard combining Camera + Analysis.
- Backend: Single WebSocket endpoint (
/ws/live) processing frames and returning results to the same socket. No persistence. - Layers: 5 Implemented (Quality, Artifact, Liveness, Temporal, Deepfake). Spec requires 7 specific layers.
Enable the "User streams, Tenant watches" workflow.
- Session Manager (
app/core/session_manager.py):- Manage active sessions in memory.
- Support two roles per session:
CLIENT(sends video) andTENANT(receives analytics). - Generate 6-digit session codes.
- WebSocket Endpoint Update (
app/main.py):- Update
/ws/live/{client_type}/{session_id}. - Route frames from
CLIENTtoOrchestrator. - Broadcast results to
TENANT.
- Update
- Dependencies: Install
react-router-dom. - Routes:
/-> User Portal (Input Session Code or Upload)./session/:code-> Live Client (Camera only, simple UI status)./tenant-> Tenant Portal (Login/Create Session)./tenant/monitor/:code-> Integrity Dashboard (The current complex UI).
- Refactor:
- Extract
VideoInputlogic touser/LiveClient.jsx. - Extract
Dashboardlogic totenant/Monitor.jsx.
- Extract
- Database Module: Setup
app/core/database.pyusing SQLAlchemy. - Models:
Session,Evidence,Score. - Persistence: Save final reports to DB in
orchestrator.finalize_session.
- Layer Extension: Implement placeholders for L6 (Environment) and L5 (Lip-Sync).
- Meta Fusion: Refactor
RiskEnginetoMetaFusionEnginewith specific "Explainable AI" output tags.
Next Step: Phase 1 (Backend Session Manager) & Phase 2 (Frontend Routing) in parallel.