Project Info
Inspiration
ConfusionLayer was inspired by a simple problem we kept seeing in classrooms: teachers usually discover confusion too late. A quiz, test, or exam tells them what already went wrong, but by then the class has often moved on. We wanted to build something that helps teachers act earlier. Instead of only tracking marks, ConfusionLayer tracks concept mastery, prerequisite gaps, and confusion risk so a teacher can see what students may struggle with before the next lesson.
What it does
ConfusionLayer is an AI-powered school learning and operations platform. For students, it provides: Unlocked lesson concepts based on the classroom pace AI-generated explanations, examples, visuals, doubt support, quizzes, and teach-back grading Mastery tracking by concept Confusion Map to show weak and risky areas Exam Outlook and Exam Practice for focused revision Timetable view based on the student’s classroom For teachers, it provides: Student Insights with strengths, weaknesses, mastery, and forecast risk Forecast Brief to predict which upcoming concepts may cause trouble Confusion Brief to summarize classroom-level misconceptions Classroom and curriculum tools For school owners, it adds workspace features like members, roles, classrooms, parent linking, attendance, fees, HR, admissions, and timetables. The goal is not to replace teachers. The goal is to give teachers earlier signals and clearer priorities.
How we built it
We built ConfusionLayer as a full-stack web app. The frontend is built with Vue and a custom interface designed for schools, teachers, and learners. The backend handles authentication, role-based access, curriculum, mastery tracking, school operations, and AI workflows. We used a structured curriculum model with subjects, chapters, concepts, unlock states, and prerequisite relationships. AI is used on top of that structure for tutorials, doubt responses, quiz feedback, teach-back grading, forecast explanations, and curriculum cleanup from PDFs. The production demo runs with Docker on an Oracle VM, with HTTPS served through nginx and the app split into frontend, backend, and database services.
Challenges we ran into
One major challenge was making the product feel like a real school system instead of just an AI chatbot. That meant handling roles carefully: student, teacher, parent, school owner, institute owner, and platform admin all needed different access. Another challenge was keeping curriculum behavior realistic. Students should not see everything at once in a classroom setup. Teachers need to unlock chapters and topics step by step, while individual learners need more freedom for self-study. We also had to improve the AI flow so it was not just generic answers. The app needed structured context, clear loading states, safer PDF import, better demo data, and useful visual outputs.
Accomplishments we're proud of
We are proud that ConfusionLayer became more than a prototype screen. It has working authentication, role-based dashboards, classroom pacing, student progress, teacher insights, forecast briefs, confusion briefs, curriculum import, and school operations. The strongest part is the prediction layer. ConfusionLayer can connect mastery, prerequisite decay, and concept risk into a practical teacher briefing. That makes the product feel useful before failure happens, not only after. We are also proud of the demo experience. A judge can move from student learning to teacher analytics to school owner operations and see one connected product.
What we learned
We learned that AI in education is much more useful when it is grounded in structure. A chatbot can answer questions, but a school product needs curriculum, roles, progress, history, permissions, and teacher control. We also learned that small product details matter a lot. Things like locked chapters, student timetables, parent linking, clean role names, loading states, and realistic demo data make the difference between a concept and a believable product. Most importantly, we learned that the best use of AI here is not replacing the teacher. It is helping the teacher see earlier, decide faster, and support students better.
What's next
Next, we want to expand ConfusionLayer with deeper curriculum coverage, richer teacher planning tools, stronger parent reports, and better analytics across classrooms. We also want to improve the AI-generated visuals, add more interactive practice formats, and make the Forecast Brief even more useful for daily lesson planning. Long term, ConfusionLayer can become a complete early-warning layer for schools: helping every teacher know who needs help, what concept is causing confusion, and what to do next.
Slate
Run your school. Clear the confusion before it starts.
Slate is a multi-tenant school operating system with ConfusionLayer, an AI learning engine that helps teachers and learners catch gaps before they become exam problems. It supports three product shapes on one codebase:
- Schools: full workspace with owner, school admin, accountant, HR, teachers, students, parents, admissions, fees, payroll, timetable, attendance, curriculum and learning.
- Institutes: teaching and learning workspace with owners, teachers, students, classrooms, curriculum and learner insights.
- Individual learners: self-study workspace where a learner can create/import curriculum, unlock all self-study chapters, learn, practice and track progress.
Live demo: https://confusionlayer.znova.in
Demo Access
Use the Explore a demo workspace section on the sign-in page:
- School Owner shows the full school ERP and learning stack.
- Institute Owner shows institute member/classroom/curriculum management.
- Individual Student shows self-study curriculum, learn, progress, confusion map and exam practice.
- Platform Admin shows app-owner usage, content, user and audit visibility.
No demo password is needed for those buttons.
What Makes It Different
Most AI tutor demos generate explanations after a learner asks for help. Slate adds a persistent model around the learner:
- Curriculum graph: subjects, chapters, topics and prerequisite edges.
- Mastery decay: deterministic effective mastery from quiz, open answer, misconception recurrence and retention signals.
- Forecast engine: pure-code prediction of concepts likely to be difficult next, based on prerequisite gaps.
- Teacher-gated learning: school/institute students only access what a teacher unlocks for their classroom.
- Individual self-study: individual learners manage their own curriculum and all self-study chapters are available to them.
- Structured AI contracts: Codex CLI calls GPT-5.6 Luna for tutorials, Socratic doubt chat, quiz diagnosis, teach-back grading and curriculum cleanup.
The AI explains and diagnoses; the system calculates mastery and forecast numbers deterministically.
Features
- Real email/password auth with JWT cookie sessions.
- Role and segment routing for platform admin, school owner, school admin, accountant, HR, teacher, student and parent.
- School/institute member invitation flow with optional SMTP delivery.
- Owner-only Connect action for demoing member accounts.
- Classroom CRUD, teacher assignment, student enrollment and subject assignment.
- Dynamic curriculum authoring: subject, chapter and topic manager.
- PDF curriculum import: parses in memory, allows Codex cleanup, then saves reviewed structure.
- Learning flow: syllabus, concept detail, tutorial, doubt chat, quiz grading and teach-back grading.
- Student progress, confusion map, exam outlook and exam practice.
- Teacher classroom view, student insights, forecast brief and confusion brief.
- School operations: admissions, fees, ledgers, receipts, HR, payroll, attendance and timetable.
- Parent portal with learner summary, attendance, fees and learning signals.
- Platform admin dashboard for app-wide usage, content, users and audit logs.
Tech Stack
- Frontend: Vue 3, TypeScript, Vite, Pinia, Vue Router, Tailwind, Chart.js, Lucide icons.
- Backend: FastAPI, SQLAlchemy, Alembic, pypdf.
- Database: PostgreSQL.
- AI runtime: Codex CLI with
gpt-5.6-luna; no OpenAI Platform API key path. - Deployment: Docker Compose on an Oracle VM, public HTTPS handled by nginx reverse proxy.
Repository Layout
backend/
app/
main.py FastAPI routes and response models
models.py SQLAlchemy tables
auth.py auth, invitations, demo users
ai.py Codex CLI structured-output adapter
seed.py rich demo data
eval/ grader/tutor evaluation harness
alembic/ database migrations
tests/ backend regression tests
frontend/
src/
layouts/ public/app/admin shells
views/ marketing, auth, app, admin screens
components/ UI, app shell, charts, marketing pieces
stores/session.ts Pinia store and API client
router/index.ts route guards and page titles
public/ Slate SVG logo
scripts/
redeploy.sh VM redeploy helper
DESIGN.md visual system and UI rules
PROJECT_OVERVIEW.md full product and engineering overview
Local Setup
Prerequisites:
- Docker and Docker Compose
- Codex CLI logged in on the host for live AI calls:
codex login
cp .env.example .env
docker compose up -d --build
docker compose exec backend alembic upgrade head
docker compose exec backend python -m app.seed
Open:
http://localhost
Health check:
curl http://localhost/api/health
Reset local demo data intentionally:
docker compose exec -e CONFUSIONLAYER_ALLOW_DB_RESET=1 backend python -m app.seed --reset-demo
Environment Variables
Copy .env.example to .env.
| Variable | Purpose |
|---|---|
SITE_DOMAIN | Frontend/Caddy site domain for local compose usage |
POSTGRES_DB | PostgreSQL database name |
POSTGRES_USER | PostgreSQL user |
POSTGRES_PASSWORD | PostgreSQL password |
DATABASE_URL | SQLAlchemy database URL used by backend and Alembic |
CODEX_MODEL | Codex model string, currently gpt-5.6-luna |
CODEX_TIMEOUT_SECONDS | Max seconds per Codex subprocess call |
AI_DAILY_CALL_LIMIT | Per-user daily AI call cap |
JWT_SECRET | Long random secret for cookie JWT signing |
JWT_EXPIRES_HOURS | Session lifetime |
AUTH_COOKIE_SECURE | 1 for HTTPS, 0 for local HTTP |
SMTP_HOST | Optional SMTP host for invitation/reset emails |
SMTP_PORT | SMTP port, usually 587 |
SMTP_STARTTLS | 1 to use STARTTLS |
SMTP_USERNAME | Optional SMTP username |
SMTP_PASSWORD | Optional SMTP password |
SMTP_FROM | Sender address for outgoing emails |
CONFUSIONLAYER_ALLOW_DB_RESET | Set to 1 only when intentionally resetting demo data |
Without SMTP settings, emails are logged to backend container logs. This keeps local/demo setup simple while still allowing real invitation email delivery in production.
Testing
Backend:
PYTHONPATH=backend python -m pytest backend/tests
Frontend:
cd frontend
npm run build
Current verified state before this cleanup:
- Backend tests:
148 passed - Frontend production build: passing
- Live smoke: school, institute, individual and platform admin demo paths return
200
Deployment
Production runs on the Oracle VM from the git checkout:
./scripts/redeploy.sh
Actual public architecture:
Internet
-> nginx on VM, HTTPS for confusionlayer.znova.in
-> frontend container bound on 127.0.0.1:18080
-> backend container on Docker network
-> postgres container on Docker network only
Production secrets live in the VM .env file and are not committed.
Documentation
- Read
PROJECT_OVERVIEW.mdfor the full product, role, architecture, data and demo explanation. - Read
DESIGN.mdfor the visual system.
Disclaimer
Slate is an independent educational product and is not affiliated with or endorsed by CBSE or NCERT. Curriculum references are used only for educational alignment. Official textbooks remain available through NCERT and ePathshala.
Analysis
View
Metric
- 98
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
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- Tailwind CSSIn code
- TypeScriptIn code
- VueIn code
- DockerClaimed
- OpenAIClaimed
- PostgreSQLClaimed
8 of 11 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
895 KB
Source files
140
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
AyushPatel2021/confusionlayer
163 files · 995 KB · @ b6caad3
Structure
Interface
95 files · 58%Screens, components and styles rendered to the user.
Application logic
27 files · 17%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
- Python55%
- Vue32%
- TypeScript8%
- Markdown4%
- CSS1%
- YAML0%
- Other (3)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 13- @lucide/vue
- @vitejs/plugin-vue
- chart.js
- pinia
- vue
- vue-router
- +7 more
backend/requirements.txt
pypi · 7- alembic
- fastapi
- psycopg[binary]
- pypdf
- python-multipart
- SQLAlchemy
- uvicorn[standard]
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.