AI-powered coding assessment with cognitive profiling, behavioral telemetry, and recruiter-grade analytics.
MindCode goes beyond traditional coding tests. It captures how a candidate thinks β not just whether their code compiles. By combining real-time keystroke telemetry, webcam-based proctoring, Judge0 code execution, and an AI-driven cognitive report pipeline, MindCode produces deep, recruiter-ready profiles from a single assessment session.
For candidates β a smooth, Monaco-powered coding experience with live code execution and detailed post-assessment feedback.
- Timed assessment β language and difficulty selection, fullscreen-locked exam mode with anti-cheat guards
- Monaco Editor β production-grade code editing with syntax highlighting
- Live code execution β run against sample inputs via Judge0, instantly
- Rich result page β skill radar chart, behavioral heatmap, timeline replay, and AI narrative feedback
- Webcam monitoring β TensorFlow.js + BlazeFace for real-time head-position tracking
- Keystroke telemetry β captures typing speed, pauses, backspaces, rewrites, and hesitation patterns
- Behavioral timeline β visual chronology of focus, struggle, and momentum events
- Line-level heatmap β identifies exactly where a candidate struggled in their code
MindCode evaluates candidates across five cognitive dimensions:
| Dimension | What It Measures |
|---|---|
| Problem Solving | Structural approach and logical decomposition |
| Debugging | Edit-revert cycles and error recovery |
| Focus | Sustained attention and distraction indicators |
| Planning | Code structure written before execution attempts |
| Adaptability | Response to failed test cases and strategy pivots |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CANDIDATE BROWSER β
β ββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββ β
β β Monaco Editorβ β Webcam (BF/TF) β β Keystroke Trackerβ β
β ββββββββ¬ββββββββ ββββββββββ¬βββββββββ ββββββββββ¬βββββββββββ β
β ββββββββββββββββββββ¬β΄ββββββββββββββββββββββ β
β β React + Zustand β
ββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β HTTP / REST
ββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β NODE.JS / EXPRESS API β
β /run /question /analysis /generate-report β
β /generate-recommendations /submit-code /user-report β
β /recruiter-dashboard /recruiter-report /recruiter-analysis β
ββββββββββ¬ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β β
ββββββββββΌβββββββββ ββββββββββββΌβββββββββββ
β Judge0 API β β Supabase Postgres β
β Code Execution β β users Β· skill_tests β
βββββββββββββββββββ β keystroke_logs β
β submissions β
βββββββββββββββββββ β reports β
β Gemini / LLM ββββββββΆβ recommendations β
β Report & Recs β β emotion_logs β
βββββββββββββββββββ ββββββββββββββββββββββββ
mind_code_new/
βββ backend/
β βββ server.js # Express API: Judge0 proxy, telemetry, reports, recommendations
β βββ lib/
β β βββ keystrokeDatabase.mjs # Keystroke persistence helpers
β β βββ keystrokeRoutes.mjs # Keystroke-specific API routes
β βββ scripts/ # Utility scripts
β βββ package.json
β
βββ frontend/
β βββ src/
β β βββ pages/
β β β βββ Assessment.tsx # Exam UI, timer, proctoring, submission flow
β β β βββ Result.tsx # Radar chart, insights, verdict, report rendering
β β βββ hooks/
β β β βββ useAssessmentSession.ts
β β β βββ useKeystrokeTracker.ts
β β βββ components/ # Shared UI components
β β βββ lib/ # Utilities and API clients
β βββ supabase_schema.sql # Full database schema
β βββ package.json
β
βββ scripts/
β βββ dev.mjs # Concurrent backend + frontend runner
βββ keystroke_logs_migration.sql # Keystroke table migration
βββ README.md
| Requirement | Version |
|---|---|
| Node.js | 18+ |
| npm | 9+ |
| Supabase project | Any plan |
| Judge0 instance | Self-hosted or RapidAPI |
| Gemini / LLM API key | For report generation |
git clone https://github.com/your-org/mindcode.git
cd mindcode
npm installBackend β create backend/.env:
PORT=3001
# Code execution
JUDGE0_URL=https://your-judge0-instance
JUDGE0_TOKEN=your_optional_token
# Database
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# AI report generation
BYTEZ_API_KEY=your_api_key
BYTEZ_MODEL=your_model_nameFrontend β create frontend/.env:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_SUPABASE_REDIRECT_TO=http://localhost:8080/auth/callback
VITE_CODE_RUNNER_URL=http://localhost:3001
VITE_AI_API_BASE= # Optional: custom AI base URLRun the schema and migration files against your Supabase project:
# Via Supabase CLI
supabase db push --file frontend/supabase_schema.sql
supabase db push --file keystroke_logs_migration.sql
# Or paste directly into the Supabase SQL Editor# Run both services concurrently (recommended)
npm run dev
# Or run individually
npm run dev:backend # β http://localhost:3001
npm run dev:frontend # β http://localhost:8080| Method | Endpoint | Description |
|---|---|---|
POST |
/run |
Execute code via Judge0 |
POST |
/question |
Generate an assessment question |
POST |
/analysis |
Compute code + telemetry analysis |
| Method | Endpoint | Description |
|---|---|---|
POST |
/submit-code |
Persist final submission metadata |
POST |
/generate-report |
Build cognitive profile β upsert to reports |
POST |
/generate-recommendations |
Build AI feedback + study plan β upsert to recommendations |
GET |
/user-report/:test_id |
Fetch latest report and recommendations for a test |
| Method | Endpoint | Description |
|---|---|---|
GET |
/recruiter-dashboard |
Aggregate candidate overview |
GET |
/recruiter-report/:reportId |
Full cognitive report for a candidate |
GET |
/recruiter-analysis |
Cross-candidate comparison data |
1. Candidate starts assessment
β
βΌ
2. Frontend creates session β opens timed fullscreen exam
β
ββ Webcam proctoring active (BlazeFace head-position)
ββ Keystroke telemetry streaming
ββ Behavioral signals captured continuously
β
βΌ
3. Candidate writes code in Monaco Editor
β
βΌ
4. Candidate runs code β POST /run β Judge0 executes β result returned
β
βΌ
5. Candidate submits
β
ββ POST /submit-code β persists submission
ββ POST /generate-report β AI builds cognitive profile
ββ POST /generate-recommendations β AI generates study plan
β
βΌ
6. Result page loads
β
ββ Skill radar chart (5 dimensions)
ββ Behavioral timeline
ββ Line-level struggle heatmap
ββ AI narrative feedback
ββ PDF export available
| Table | Description |
|---|---|
users |
Candidate and recruiter accounts |
skill_tests |
Assessment sessions and configuration |
keystroke_logs |
Raw keystroke telemetry (speed, pauses, rewrites) |
submissions |
Final code submissions with metadata |
reports |
AI-generated cognitive profiles |
recommendations |
Study plans, topic lists, practice questions |
emotion_logs |
Webcam-derived engagement signals |
Full schema: frontend/supabase_schema.sql
Migration: keystroke_logs_migration.sql
# Frontend
cd frontend
npm run test # Run test suite
npm run lint # ESLint checks
npm run verify:supabase # Verify Supabase connection and schema
# Backend
cd backend
npm run dev # Start with hot-reload| Layer | Technology |
|---|---|
| Frontend framework | React 18 + TypeScript + Vite |
| Styling | TailwindCSS + shadcn/ui + Radix UI |
| State management | Zustand |
| Code editor | Monaco Editor |
| Charts | Recharts |
| Computer vision | TensorFlow.js + BlazeFace |
| Backend | Node.js + Express |
| Database | Supabase (Postgres) |
| Auth | Supabase Auth (OAuth + email) |
| Code execution | Judge0 API |
| AI / LLM | Gemini (report and question generation) |
- Assessment duration is derived from telemetry timestamps in
keystroke_logsβ not wall-clock time β making it resistant to tab-switching or pausing. - Typing speed is computed from keystroke counters with a sample-speed fallback for sparse sessions.
- AI behavioral narratives are grounded in these computed metrics so candidates always see realistic, specific feedback rather than generic summaries.
| Document | Contents |
|---|---|
KEYSTROKE_IMPLEMENTATION_GUIDE.md |
How keystroke capture and scoring works |
KEYSTROKE_SYSTEM_SUMMARY.md |
High-level telemetry system design |
KEYSTROKE_TESTING_GUIDE.md |
Testing keystroke collection end-to-end |
BEHAVIORAL_TRACKING_IMPLEMENTATION.md |
Webcam + behavioral signal pipeline |
AI_INSIGHTS_FIX.md |
Known issues and fixes for AI insight generation |
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Commit with a clear message:
git commit -m "feat: add X" - Push and open a Pull Request
Please ensure npm run lint passes and all existing tests are green before submitting.
This project is licensed under the MIT License.