An interactive app that teaches children to read using AI-generated stories and quizzes.
- Initial Assessment: Short quiz to determine reading level and interests
- AI-Generated Stories: Custom stories based on reading level, age, and interests
- Interactive Quizzes: Reading comprehension, fill-in-the-blank, and general knowledge questions
- Progress Tracking: Tracks word familiarity, pronunciation, and learning progress
- Card-Based Interface: Simple, one-question-at-a-time interface with smooth transitions
- Comprehensive Reports: View student progress, accuracy, and areas for improvement
- Word Mastery Tracking: See which words the child has mastered
- Session History: Review past reading sessions and quiz performance
- FastAPI: Python web framework
- SQLAlchemy: Database ORM
- SQLite: Database (can be swapped for PostgreSQL)
- OpenAI API: AI story and quiz generation
- React: UI framework
- React Router: Navigation
- Framer Motion: Smooth animations and transitions
- Axios: API communication
- Python 3.8+
- Node.js 16+
- OpenAI API key
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
copy .env.example .env
# Edit .env and add your OpenAI API key- Go to https://platform.openai.com/
- Sign up or log in
- Navigate to API Keys
- Create a new API key
- Copy the key and paste it in
backend/.env:OPENAI_API_KEY=sk-your-key-here
Note: OpenAI API requires payment. The app uses gpt-4o-mini model which is cost-effective (~$0.15 per 1M input tokens).
cd backend
python main.pyBackend will run on: http://localhost:8000
API Documentation (Swagger UI): http://localhost:8000/docs
cd frontend
# Install dependencies
npm install
# Start development server
npm startFrontend will run on: http://localhost:3000
ICHACK2026/
├── backend/
│ ├── main.py # FastAPI app entry point
│ ├── database.py # Database configuration
│ ├── models.py # SQLAlchemy models
│ ├── schemas.py # Pydantic schemas
│ ├── ai_service.py # OpenAI integration
│ ├── routers/
│ │ ├── auth.py # Registration & assessment
│ │ ├── stories.py # Story generation
│ │ ├── quizzes.py # Quiz generation & submission
│ │ └── reports.py # Progress reports
│ ├── requirements.txt # Python dependencies
│ └── .env.example # Environment variables template
│
└── frontend/
├── public/
│ └── index.html
├── src/
│ ├── components/
│ │ ├── Registration.js # User registration
│ │ ├── Assessment.js # Initial quiz
│ │ ├── ReadingSession.js # Story & quiz flow
│ │ └── Report.js # Progress report
│ ├── App.js # Main app component
│ ├── api.js # API client
│ ├── index.js # Entry point
│ └── index.css # Styles
└── package.json
POST /api/auth/register- Register new userGET /api/auth/assessment/questions- Get assessment questionsPOST /api/auth/assessment/submit- Submit assessmentGET /api/auth/users/{user_id}- Get user info
POST /api/stories/generate- Generate new storyGET /api/stories/{session_id}- Get story by session
POST /api/quizzes/generate- Generate quizzes for sessionPOST /api/quizzes/submit- Submit quiz answerPOST /api/quizzes/{session_id}/complete- Complete session
GET /api/reports/{user_id}- Get comprehensive user reportGET /api/reports/words/{user_id}- Get word progress
- Login/Signup: Users can create a new account or login with existing credentials
- Profile Setup: New users fill in their profile through quiz-card interface (name → age → interests)
- Initial Assessment: Answer 5 questions to determine reading level
- Reading Session:
- Read AI-generated story
- Answer quiz questions (card-by-card interface)
- Receive immediate feedback
- View session results
- Progress Tracking: System tracks word familiarity and performance
- Reports: Teachers/parents can view comprehensive progress reports
Edit the reading level logic in backend/ai_service.py:
- Modify word counts per level
- Adjust story generation prompts
- Change quiz difficulty
- Update
models.pyto support new question types - Modify
ai_service.pyquiz generation - Update frontend components to handle new types
Replace SQLite with PostgreSQL:
- Update
DATABASE_URLinbackend/database.py - Install
psycopg2:pip install psycopg2-binary
cd backend
pytestcd frontend
npm testFrontend:
cd frontend
npm run buildBackend:
Use a production ASGI server like gunicorn:
pip install gunicorn
gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker- Verify API key is correct in
.env - Check API credit balance at OpenAI dashboard
- Review rate limits if getting 429 errors
- Delete
reading_app.dband restart to reset database - Check file permissions in backend directory
- Ensure backend is running on port 8000
- Check
allow_originsinmain.pymatches frontend URL
- Voice recognition for pronunciation practice
- Multi-language support
- Gamification with badges and achievements
- Parent/teacher dashboard improvements
- Mobile app version
- Offline mode with cached content
MIT License
Built for IC HACK 2026