AI-Tutor is a full-stack learning platform built to support children with Autism Spectrum Disorder through calm lessons, adaptive quizzes, emotion-aware pacing, parent progress tracking, and AI-assisted tutor conversations.
The goal is not to replace teachers, therapists, or caregivers. It is a supportive learning engine that helps each child practice at an appropriate pace while giving parents and educators clearer insight into progress, mood patterns, and topic readiness.
- Deliver autism-friendly lessons with predictable structure, simple language, and clear visual feedback.
- Personalize quiz difficulty across easy, medium, and hard levels using child progress and emotion trends.
- Provide topic-based recommended YouTube practice links for colors, numbers, letters, shapes, emotions, and social skills.
- Track caregiver-reviewed video practice completion.
- Let teachers or therapists assign topic goals and target levels.
- Track learning sessions, emotions, quiz accuracy, stars, streaks, and rewards.
- Generate parent-friendly reports and weekly learning summaries.
- Offer an AI tutor chat experience that can answer questions, explain topics, and review progress.
- React and Vite for the frontend
- Node.js and Express.js for the backend API
- MongoDB and Mongoose for database storage
- OpenAI SDK for AI tutor/report generation
- face-api.js for browser-based emotion detection support
- Postman for API testing
- VS Code for development
- Git and GitHub for version control
- npm for package management
- Lessons for colors, numbers, letters, shapes, emotions, and social skills
- Adaptive quiz levels:
- Easy: fewer choices and simpler questions
- Medium: standard topic practice
- Hard: more questions, stronger distractors, and reasoning prompts
- Recommended YouTube practice resource for each topic
- Video completion tracking after caregiver review
- Text-to-speech support for lesson items and quiz questions
- Star rewards after lesson completion
- Optional camera-based emotion detection
- Support prompts when repeated negative emotion patterns are detected
- Calm reset activities such as breathing, movement breaks, and confidence-building tasks
- Difficulty adjustment when a learner appears frustrated, sad, or sleepy
- Child profile management
- Teacher/therapist goal assignment with topic and target level
- Emotion check-ins
- Accuracy, session, and practice-time analytics
- Daily quest and streak tracking
- Parent alerts and notifications
- Downloadable TXT, JSON, and PDF reports
- Weekly digest generation
- Child-aware chat context
- Progress-aware fallback responses
- AI-powered tutoring when the backend OpenAI key is configured
- Helpful prompts for lessons, feelings, reports, and next-step recommendations
AI-Tutor/
backend/
config/
controllers/
middleware/
models/
routes/
services/
tests/
.env.example
server.js
public/
models/
src/
api/
components/
pages/
styles/
utils/
package.json
vite.config.js
README.md
PowerShell may block npm.ps1 on some Windows systems. If that happens, use npm.cmd.
npm.cmd install
npm.cmd --prefix backend installCreate backend/.env from the example file:
Copy-Item backend\.env.example backend\.envRequired/backend keys:
PORT=5000
MONGO_URI=mongodb://127.0.0.1:27017/ai-tutor
OPENAI_API_KEY=OPENAI_API_KEY is optional for basic app exploration, but AI tutor/report features need it.
Start a local MongoDB server, or replace MONGO_URI with your MongoDB Atlas connection string.
npm.cmd --prefix backend startBackend default URL:
http://localhost:5000
Open a second terminal:
npm.cmd run devFrontend default URL:
http://localhost:3000
Use Postman to test the backend endpoints while the server is running.
Common flows:
- Register/login a parent account
- Create a child profile
- Save a learning session
- Fetch progress analytics
- Generate reports
- Test AI tutor chat
Key endpoint groups:
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/meGET /api/childrenPOST /api/childrenGET /api/progressPATCH /api/progressPOST /api/progress/lessonPOST /api/session/savePOST /api/reportPOST /api/report/weekly-digestPOST /api/chatGET /api/notifications
Frontend:
npm.cmd run dev- start Vite development servernpm.cmd run build- build production frontendnpm.cmd run preview- preview production buildnpm.cmd run test:frontend- run frontend learning engine testsnpm.cmd run test- run frontend and backend tests
Backend:
npm.cmd --prefix backend start- start Express API servernpm.cmd --prefix backend test- run backend tests
Each learning topic now includes:
- A recommended YouTube practice link
- A caregiver-reviewed completion marker
- Separate easy, medium, and hard question sets
- More questions as difficulty increases
- Distinct prompts at each level so repeated lessons feel less static
Before uploading or opening a pull request:
- Confirm real
.envfiles are not staged. - Run
npm.cmd installandnpm.cmd --prefix backend installif dependencies changed. - Run
npm.cmd run test. - Run
npm.cmd run build. - Review
README.md,CONTRIBUTING.md, andSECURITY.md. - Commit only source, config, docs, lockfiles, and public assets. Do not commit
node_modules/ordist/.
- Add a therapist/teacher mode for manually assigning goals.
- Add offline printable worksheets for each topic.
- Add stronger accessibility controls for contrast, reading speed, and sound sensitivity.
- Add automated frontend tests for lesson completion and quiz behavior.
- Replace YouTube search links with a curated, reviewed video table before production use.
- Do not commit real
.envfiles or API keys. - The camera is optional and should be used only with caregiver consent.
- YouTube links should be reviewed by a parent/teacher before a child watches independently.
- This app is an educational support tool, not a medical diagnostic system.