AI tutor that routes science questions to the best-performing model per subject - based on research for Ethiopian high school education
# Subject-Smart AI Tutor — pure HTML/CSS/JavaScript
No server, no build step, no framework, no `npm install`. Three files:
`index.html`, `style.css`, `app.js`. Open `index.html` in a browser (or
serve the folder with any static file server) and it works.
## How to run it
Just double-click `index.html`, or if your browser blocks local file
access for any reason, serve it with any one-line static server, e.g.:
```bash
cd ai-tutor-static
python3 -m http.server 8000
```
then open `
localhost`.
## Routing logic
Directly from the paper's findings — see the comments at the top of
`app.js` for the full mapping and rationale:
| Situation | Routed to |
|---|---|
| Biology | ChatGPT |
| Chemistry | DeepSeek |
| Physics | Copilot |
| Any non-English answer | Copilot |
| Exam Mode toggle | Perplexity |
## Adding real API keys — READ THIS FIRST
This page has no server, which means there is **no way to hide an API
key from the browser it's typed into**. Click "⚙ API Keys / Settings"
on the page itself to enter keys — they're saved to that browser's
`localStorage` only, and sent directly from your browser straight to
each provider's API when you ask a question.
**What this means in practice:**
- Anyone who opens DevTools → Application → Local Storage on that
browser can read your keys in plain text.
- Anyone who opens DevTools → Network tab while you ask a question can
see the key in the outgoing request.
- If you ever host this page publicly with keys saved in that browser
session, or if you let someone else use your logged-in browser, your
key is exposed to them.
**This is fine for:** your own local testing, a live demo on your own
laptop, a personal project. **This is not fine for:** deploying this
page publicly and expecting keys to stay private, or having students
share a single browser/computer with a key already saved in it.
If you need real key privacy while still serving many students, you
need a server sitting between the browser and each provider' …