Chronos is a privacy-first engagement and identity intelligence layer for online classrooms.
It performs computer-vision inference on the client side and stores only embeddings and engagement analytics, not raw video frames.
- Frontend: React, Vite, TensorFlow.js, MediaPipe
- Backend: FastAPI, WebSockets
- Database/Auth: Supabase
- Video infrastructure: 100ms
Chronos is designed for real-time classroom engagement monitoring and identity-aware participation workflows, with privacy built into the architecture from the start.
- Client-side inference for privacy-sensitive processing
- No storage of raw video frames
- Persistence of embeddings and analytics only
- Real-time classroom telemetry via WebSockets
- End-to-end flow across teacher and student experiences
Use the steps below to run the full Chronos stack locally.
Chronos uses Supabase for authentication and database persistence.
Create a new project at Supabase.
For local testing, disable email confirmation so test accounts can sign up and log in immediately.
- Go to Authentication
- Open Providers
- Select Email
- Turn Confirm email off
Open the SQL Editor in Supabase and run the following SQL:
CREATE TABLE IF NOT EXISTS identity_embeddings (
user_id UUID PRIMARY KEY REFERENCES auth.users(id) ON DELETE CASCADE,
embedding JSONB NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
);
CREATE TABLE IF NOT EXISTS session_analytics (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
session_id TEXT NOT NULL,
teacher_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
start_time TIMESTAMP WITH TIME ZONE NOT NULL,
end_time TIMESTAMP WITH TIME ZONE NOT NULL,
duration_minutes FLOAT NOT NULL,
avg_engagement_score FLOAT NOT NULL,
total_students INTEGER NOT NULL,
metrics_timeline JSONB DEFAULT '[]'::jsonb,
confusion_hotspots JSONB DEFAULT '[]'::jsonb,
at_risk_students JSONB DEFAULT '[]'::jsonb,
tpi FLOAT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
);Chronos uses 100ms for WebRTC-based video conferencing.
-
Create a free account at 100ms
-
Create a new app or workspace
-
Open Developer settings
-
Copy the following credentials:
- App Access Key
- App Secret
-
In the 100ms dashboard, create a room and copy:
- Room ID
- Space ID if your setup requires it
Chronos has separate environment files for the backend and frontend.
Path:
main/app/backend/Copy .env.example to .env and add the following values:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
HMS_ACCESS_KEY=your-hms-access-key
HMS_SECRET=your-hms-secret
HMS_ROOM_ID=your-hms-room-id
HMS_SPACE_ID=your-hms-space-id
# Optional: token lifetime in minutes (default: 120)
HMS_TOKEN_TTL_MINUTES=120
# Optional: allowed frontend origin(s) in production, comma-separated
# CORS_ORIGINS=https://your-frontend.example.comPath:
main/app/frontend/Copy .env.example to .env and add the following values:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
VITE_BACKEND_URL=http://localhost:8000
VITE_BACKEND_WS_URL=ws://localhost:8000
VITE_HMS_TOKEN_ENDPOINT=http://localhost:8000/hms-token
VITE_HMS_ENV=dev
# Optional: enable verbose engagement debug logs in development
VITE_DEBUG_LOGS=falseYou will need two terminal sessions.
cd main/app/backend
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
# source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadcd main/app/frontend
npm install
npm run devOnce both services are running, open: http://localhost:5173
Use this quick validation before deeper testing.
- The backend starts without a
Missing required environment variableserror - The frontend loads without the red
Environment Configuration Errorscreen - A teacher can sign up, sign in, choose a role, and access the dashboard
- A student can join from an incognito window and appear in teacher metrics
- Ending a session generates a report that appears under Past Sessions
- Check that your system clock and timezone are correct
- Confirm your HMS credentials are valid
- Make sure
HMS_TOKEN_TTL_MINUTESis set to a positive integer
- Verify that
main/app/frontend/.envexists - Confirm all required
VITE_*variables are present - Restart the frontend after updating
.env
- Make sure camera permissions were granted
- Confirm the student completed readiness checks
- Verify that the backend is running
- Confirm the frontend WebSocket URL points to the correct backend
- Set
CORS_ORIGINSin the backend.env - Include the deployed frontend origin(s), comma-separated if more than one
Run these checks before opening a pull request.
cd main/app/frontend
npm run lint
npm run buildRun from a shell where the backend virtual environment is activated:
cd main/app/backend
python -m compileall .Use the following flow to validate the product end to end.
Before testing, confirm:
- Backend is running locally
- Frontend is running locally
- Environment configuration is complete
- Open a standard Chrome window
- Go to
http://localhost:5173 - Click Sign Up
- Create a dummy teacher account
Example:
teacher@chronos.local/password123 - Choose the Teacher role
- Complete the readiness flow
- Grant camera permission
- Click Verify & Join as Teacher
- In the teacher dashboard, find the Meeting ID / Copy Link control
- Copy the invite link
- Open a Chrome incognito window
- Paste the invite link
- Sign up with a different dummy account
Example:
student@chronos.local/password123 - Choose the Student role
- Finish the student readiness flow
- Grant camera permission
- Make sure the face is clearly visible and centered
- Click Verify to enter the session
- Keep the teacher and student windows visible side by side
- As the student, look directly at the screen
- Confirm the teacher sees attentive behavior or a higher score
- Look away for 10 to 15 seconds
- Confirm the teacher sees the score drop or disengagement indicators
- Validate that nudges and teacher actions behave as expected
- In the student window, open DevTools with
F12 - Open the Network tab
- Set throttling to Offline
- Confirm the reconnect banner appears
- Switch back to No throttling
- Confirm the session recovers successfully
- End the session from the teacher dashboard
- Confirm the session report is generated
- Open Past Sessions
- Verify that session data persists correctly
Chronos can be considered working end to end when all of the following pass successfully:
- Authentication
- Teacher and student readiness flows
- Real-time engagement tracking
- WebSocket recovery behavior
- Session analytics persistence
- Report visibility in past sessions