An interactive app that teaches children to read using AI-generated stories and quizzes.
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
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.py
Backend will run on: http://localhost:8000
API Documentation (Swagger UI): http://localhost:8000/docs
cd frontend
# Install dependencies
npm install
# Start development server
npm start
Frontend 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 infoPOST /api/stories/generate - Generate new storyGET /api/stories/{session_id} - Get story by sessionPOST /api/quizzes/generate - Generate quizzes for sessionPOST /api/quizzes/submit - Submit quiz answerPOST /api/quizzes/{session_id}/complete - Complete sessionGET /api/reports/{user_id} - Get comprehensive user reportGET /api/reports/words/{user_id} - Get word progressEdit the reading level logic in backend/ai_service.py:
models.py to support new question typesai_service.py quiz generationReplace SQLite with PostgreSQL:
DATABASE_URL in backend/database.pypsycopg2: pip install psycopg2-binarycd backend
pytest
cd frontend
npm test
Frontend:
cd frontend
npm run build
Backend:
Use a production ASGI server like gunicorn:
pip install gunicorn
gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker
.envreading_app.db and restart to reset databaseallow_origins in main.py matches frontend URLMIT License
Built for IC HACK 2026