Project Info
Inspiration
I'm a Lead Controls Operator at a hospital. I run the building automation systems that keep patient floors safe. In that world, "the student got the right answer" isn't good enough. I need to know why they got it right, because when a chilled water plant fails at 2 AM, the person on call has to understand the system, not just recall a checklist. I'm also a Human-Centered AI student at Texas Tech, and I watched classmates use ChatGPT the way you'd use a vending machine: insert prompt, receive answer, feel smart, fail the exam. Every AI education tool on the market pushes explanations at students. They all optimize for the moment the answer appears on screen, and none of them measure the moment the concept actually lands in the student's head. So I asked a stupid, obvious question: what if the AI never gave an answer? What if it only asked questions — really good ones, in the specific pattern a great teacher uses — and the student had to think for themselves? That question wouldn't leave me alone. Mirror is what it turned into.
What it does
Mirror is a reverse-Socratic learning platform. The student explains a topic to GPT-5.6, and GPT interviews them — probing what they know, what they think they know, and what they've quietly skipped. For students: Join a class, pick a topic, start a session. GPT-5.6 streams Socratic questions that climb Bloom's taxonomy: recall → comprehension → application → analysis It never gives you the answer. If you're wrong, it asks a question that exposes the gap. If you're right, it pushes deeper — "how does that connect to X?", "what breaks if you change Y?" When the session ends, GPT produces a structured comprehension assessment: a ReactFlow knowledge map where each concept node is color-coded by depth (deep / surface / misconception / unexplored), with every node linking back to the exact message where that judgment was made For teachers: A class-wide heatmap showing aggregate comprehension per concept Misconception alerts, grouped by concept, so you can see which wrong beliefs are spreading Drill down into any student's individual map with their Bloom's profile and evidence-linked exchanges The knowledge map isn't just a picture. It's an audit trail from visualization back to evidence.
How we built it
Solo build, on top of my Human-Centered AI coursework and a full-time controls job. Stack: Frontend: React + Vite + ReactFlow for the interactive knowledge map Backend: Node.js + Express + SQLite (better-sqlite3) AI: OpenAI GPT-5.6 Socratic dialogue via SSE streaming, topic-concept structure generation, and structured JSON assessment Voice: gpt-4o-mini-transcribe and gpt-4o-mini-tts for optional voice sessions (some students explain better out loud than in writing) Auth: JWT + bcrypt, role-based (student/teacher) Built with Codex for scaffolding, component iteration, and prompt engineering The system prompt is the actual product. It went through I don't know how many revisions to reach the version that reliably never gives answers. Early versions collapsed into helpful mode the second a student said, "I don't know." The working version tells GPT to treat "I don't know" as a signal, not a stop sign — reframe smaller, probe an adjacent concept, but never lecture. The comprehension assessment is a structured JSON schema — concept nodes, edges, depth ratings, misconceptions, Bloom's profile, and evidence linked by message index. That last piece is what makes the map trustworthy: click any node, see the exact exchange it came from.
Challenges we ran into
Getting GPT to refuse to help. This was the hard problem. Language models are trained to be helpful, and Socratic teaching looks unhelpful from the outside. Early versions of the prompt would ask two questions, then cave in and explain. Fixing this required explicit rules ("acknowledgment is one sentence, then the next question — never a paragraph"), examples of the failure mode ("don't do this"), and post hoc validators on the streaming output. Structured output under a streaming dialogue. SSE streaming for the chat, then a separate structured-output call to generate the assessment JSON — with the assessment referencing the streamed conversation by message index. Getting message indices to stay consistent across reconnects was uglier than it sounds. Depth over correctness. Traditional edtech grades right/wrong. Mirror had to grade depth — surface recall vs. transferable understanding — and represent that in a way a teacher could scan in three seconds. That's where the color-coded map came from: yellow-green (surface) vs. solid green (deep) is a distinction teachers already make intuitively; the map makes it visible. Solo scope discipline. I had a list of twelve features I wanted. I shipped six. Cutting adaptive difficulty, longitudinal tracking, and LMS export hurt, but shipping the six that make the core loop work was the right call.
Accomplishments we're proud of
The refusal actually holds. In demo sessions, GPT-5.6 has remained in Socratic mode across 20+ exchanges without collapsing into explanation mode. The constraint is the feature. Evidence-linking works. Every node on the knowledge map is one click from the exact message that produced it. That transforms the map from "interesting visualization" into "defensible assessment" — a teacher can justify a rating to a parent by showing the transcript. Bloom's progression is visible in the transcripts. You can literally watch a student climb from recall to application inside a single session. That's the moment I knew this wasn't just a hackathon demo — it was measuring something real. The class heatmap surfaces group-level misconceptions. Teachers have never had this. It's the aggregate view of "which wrong ideas are spreading in my class right now." I shipped it solo, on nights and weekends, while working a critical-infrastructure job.
What we learned
Students learn more when the AI refuses to help. The constraint isn't a limitation — it's the pedagogy. Every "I don't know" that GPT-5.6 doesn't rescue is a moment when the student actually has to think. Structured output beats free text for education. A JSON schema with typed fields (depth, misconception, evidence_message_idx) is dramatically more useful than a paragraph summary — for visualization, for aggregation, and for teacher trust. Evidence is what turns AI assessment from a toy into a tool. The message-index link between assessment and transcript is the single change that made teachers I demoed to lean forward instead of nodding politely. My controls-operator instincts transferred. In critical infrastructure, you don't trust a sensor reading you can't trace to a physical point. Same rule here: don't trust an assessment you can't trace to an exchange. Formally, Mirror measures comprehension along two axes: $$ \text{Understanding}(c) = f(\text{Bloom-level}(c),\ \text{Depth}(c)) $$ where $c$ is a concept node, $\text{Bloom-level} \in {1,2,3,4}$ (recall → analysis), and $\text{Depth} \in {\text{unexplored}, \text{misconception}, \text{surface}, \text{deep}}$. The right answer on Bloom-1 with surface depth is not the same as the right answer on Bloom-4 with deep depth — and Mirror is the first tool I've used that treats them differently.
What's next
Longitudinal tracking — how does a student's knowledge map evolve across three sessions on the same topic? That's the real learning curve, not the test score. Adaptive difficulty — GPT-5.6 adjusts questioning based on the student's demonstrated Bloom's level in real time, so strong students get pushed and struggling students get scaffolded. Multi-modal Socratic sessions — diagram drawing, equation input, and voice — so students can explain how their brains actually work. LMS integration — knowledge maps as gradebook entries with the evidence trail intact. Longer-term: publish the pedagogy. The refusal pattern, the Bloom's climb, the evidence-linked assessment — those generalize beyond any one app. I want the paper to exist so other builders can steal the idea and improve education faster than I can alone. Mirror is the AI that learns from you — so you learn about yourself.
Mirror — The AI That Learns From You

Every AI education tool explains TO the student. Mirror reverses the paradigm: the student explains TO the AI.
Mirror is a Socratic learning platform where GPT acts as an interviewer — probing depth, following threads, and surfacing misconceptions the student didn't know they had. The result is a live knowledge map that shows what a student truly understands, not just what they can parrot back.
Built for OpenAI Build Week — Education Track
How It Works
- Teacher creates a class and assigns a topic (e.g., "Mitosis vs. Meiosis")
- Student joins the class and starts a Mirror session
- GPT asks Socratic questions — never giving answers, only probing understanding
- After the dialogue, GPT produces a structured comprehension assessment:
- Knowledge Map: interactive node graph showing depth of understanding per concept
- Bloom's Profile: how much of the student's understanding is recall vs. comprehension vs. application vs. analysis
- Misconception Detection: specific wrong beliefs surfaced during the dialogue
- Teacher sees a class-wide heatmap — which concepts the class understands, common misconceptions, and per-student drill-down
Key Design Decision
The AI never gives the answer. Learning happens in the student's head, not in the AI's output. Mirror creates a mirror — reflecting the student's own understanding back at them so they can see their own gaps.
Tech Stack
| Layer | Tech |
|---|---|
| Frontend | React + Vite |
| Knowledge Map | ReactFlow (interactive node graph) |
| Backend | Node.js + Express |
| AI Engine | OpenAI GPT-4.1 API |
| Database | SQLite (better-sqlite3) |
| Auth | JWT + bcrypt (role-based: student/teacher) |
| Built with | Codex |
Setup
Prerequisites
- Node.js 18+
- OpenAI API key
Backend
cd backend
npm install
cp .env.example .env
# Add your OPENAI_API_KEY to .env
npm run seed # Load demo data
npm run dev # Start on :3001
Frontend
cd frontend
npm install
npm run dev # Start on :5173, proxies /api to :3001
Demo Accounts (after seeding)
| Role | Password | |
|---|---|---|
| Teacher | teacher@demo.com | demo1234 |
| Student | alex@demo.com | demo1234 |
| Student | jordan@demo.com | demo1234 |
| Student | maya@demo.com | demo1234 |
| Student | sam@demo.com | demo1234 |
Class join code: BIO101
Features
For Students
- Socratic Chat — streaming AI dialogue that probes your understanding
- Knowledge Map — interactive visualization of what you know (green = deep, yellow = surface, red = misconception, gray = unexplored)
- Bloom's Profile — see where your understanding sits on the taxonomy
- Click any concept node to see the exact exchange where it was assessed
For Teachers
- Class Heatmap — aggregate comprehension bars per concept across all students
- Misconception Alerts — grouped by concept, showing which students hold which wrong beliefs
- Per-Student Maps — drill into any student's knowledge graph
- Topic Assignment — create topics with learning objectives; GPT generates the expected concept structure
- Bloom's Profile per Student — see if students are stuck at recall or pushing into analysis
How Codex Was Used
- Scaffolding — project initialization, routing, database schema, auth boilerplate
- UI Components — chat interface, dashboard layouts, knowledge map visualization
- API Endpoints — CRUD for users, classes, topics, sessions
- System Prompt Iteration — designing and refining the Socratic engine behavior
- Seed Data — generating realistic demo dialogues and assessments
How GPT-4.1 Is Used
- Socratic Engine — real-time streaming dialogue that follows Bloom's taxonomy progression, never gives answers, uses the student's own words in follow-ups
- Concept Structure Generation — teacher provides learning objectives, GPT generates the expected concept graph
- Comprehension Assessment — after each session, GPT produces a structured JSON assessment with per-concept depth ratings, misconception detection, Bloom's profile, and evidence linked to specific message indices
Architecture
Frontend (React + Vite)
├── Auth (Login/Signup with role selection)
├── Student Dashboard (classes, sessions, progress)
├── Teacher Dashboard (classes, join codes, analytics)
├── Socratic Chat (streaming SSE, markdown rendering)
├── Knowledge Map (ReactFlow, click-to-inspect)
├── Class Heatmap (aggregate bars, misconception alerts)
└── Student Map View (teacher's per-student drill-down)
Backend (Node.js + Express)
├── Auth (JWT, bcrypt, role middleware)
├── Classes (create, join codes, roster)
├── Topics (create with AI concept generation)
├── Sessions (create, streaming chat, complete with assessment)
└── Knowledge Maps (per-student, per-class heatmap, misconceptions)
Database: SQLite (users, classes, topics, sessions, knowledge_maps)
Branding & Assets
Brand assets live in assets/branding/:
| Asset | File | Use |
|---|---|---|
| Hero banner (16:9) | assets/branding/mirror-hero-banner.png | Devpost cover, README header, slides |
| App icon / logo (1:1) | assets/branding/mirror-icon.png | Logo, Devpost thumbnail, source for favicons |
Favicons are generated from the app icon and served from frontend/public/: favicon.ico, favicon-16x16.png, favicon-32x32.png, favicon-48x48.png, apple-touch-icon.png (180px), plus mirror-192.png / mirror-512.png for PWA. They're wired into frontend/index.html.
License
MIT
Author
Benjamin Duske — LinkedIn
Analysis
View
Metric
- 15
- 4
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- ReactIn code
- Node.jsClaimed
6 of 7 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- CodexCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
178 KB
Source files
42
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
BenDuske/mirror
64 files · 4.1 MB · @ f5b0e7e
Structure
Interface
12 files · 19%Screens, components and styles rendered to the user.
API & routing
10 files · 16%Request entry points: routes, handlers and controllers.
Application logic
13 files · 20%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript70%
- Markdown22%
- CSS8%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 13- @xyflow/react
- axios
- d3
- react
- react-dom
- react-markdown
- react-router-dom
- reactflow
- +5 more
backend/package.json
npm · 9- bcryptjs
- better-sqlite3
- cors
- dotenv
- express
- jsonwebtoken
- nodemailer
- openai
- uuid
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.