# ❓ Frequently Asked Questions — HMG ACADEMY CLASS DECK v9

---

## General

### Q1: Is this really free?
**A:** Yes — 100% free. No subscriptions, no in-app purchases, no ads. The platform uses only free-tier services (Cloudflare Pages, PeerJS cloud, GitHub Pages for `revoked.json`, browser Web Speech API).

### Q2: Do students need accounts?
**A:** No. Students just enter the room code. No emails, no passwords, no friction.

### Q3: Does it work on my itel Vista Tab 30s?
**A:** Yes. The platform was designed for low-end Android tablets. The whiteboard supports palm rejection (tuned for cheap styluses). All resources are tiny — vendor JS files total ~600 KB.

### Q4: Does it work on iPhone?
**A:** Yes. Install via Safari → Share → Add to Home Screen. The PWA runs in standalone mode.

### Q5: Does it work without internet?
**A:** Yes — once you've visited a page, the service worker caches it. The whiteboard, PDF, notes, toolkit, flashcards, timer, dashboard, gradebook, parent portal all work fully offline. The live class (camera/chat) still needs internet, but you can prep lessons offline.

---

## Live class

### Q6: How do students join?
**A:** Two ways:
1. **Normal:** teacher clicks ▶ Go Live → 6-char room code appears → student opens `join.html` → enters code.
2. **Backup:** teacher clicks 📡 QR Join → QR code appears → student scans (or pastes the URL) → connects pure P2P.

### Q7: Why isn't my student connecting?
**A:** Most common causes:
1. **Wrong code** — check capitalization (codes are uppercase).
2. **Different network** — both devices must be on the same internet (or use QR/URL fallback).
3. **PeerJS cloud blocked** — the school's firewall blocks the PeerJS signalling server. Use QR/URL fallback.
4. **Browser too old** — needs Chrome 80+, Safari 13+, Firefox 75+, Edge 80+.

### Q8: Why is the video laggy?
**A:** WebRTC P2P means video streams directly between devices. If your network is slow, lower the camera resolution (in your browser's camera settings). The composite whiteboard+PDF stream is typically 100–500 kbps.

### Q9: Can more than 30 students join?
**A:** Yes — but performance depends on the teacher's upload bandwidth. PeerJS cloud has a soft limit of ~50 concurrent peers per room. For larger classes, we recommend running the class as Companion mode (`teach.html?meet=1`) on Google Meet and only using ClassDeck for the workspace.

---

## Assignments & grading

### Q10: How do I create an assignment?
**A:** Dashboard → Assignments tab → fill in the form → Create.

### Q11: Can I import questions from a CSV?
**A:** Yes — for the Quick Quiz (🏆 in the Activities drawer). Type:
```
Question text | Wrong option | Correct! | Another wrong option
```
The `!` marks the correct answer.

### Q12: How do I export grades to Excel?
**A:** Dashboard → Gradebook tab → click **📥 Export CSV**. Open in Excel or Google Sheets.

### Q13: Can parents see grades?
**A:** Yes — they see them in the parent portal (`parent.html`). But only via the unique parent code you give them. They cannot see other students' grades.

---

## Standards & badges

### Q14: What standards frameworks are supported?
**A:** NERDC (Nigeria primary), WAEC (Nigeria secondary), CCSS-Math (USA K-12 math), CCSS-ELA (USA K-12 English), NGSS (USA science), UK National Curriculum (England). 16 standards bundled. Add more by editing `locales/.../standards.js` — see `docs/FEATURES.md` §E2.

### Q15: How are badges awarded?
**A:** Automatically, by a rule engine. After every graded action, the platform checks 8 built-in rules (First Perfect Score, 7-Day Streak, Helper, Math Wizard, etc.). You can also manually award custom badges from the Dashboard → Badges tab.

### Q16: Can students earn a badge more than once?
**A:** No — each badge is awarded once per student. If you manually award a badge, it's recorded with a `source: "manual"` flag so you can distinguish auto vs manual awards.

---

## Security & privacy

### Q17: Where is my data stored?
**A:** In your browser's IndexedDB. Never on a server. Export to CSV anytime for backup.

### Q18: Is the data encrypted?
**A:** At rest, no — IndexedDB is plain text in your browser. To encrypt, use your OS's full-disk encryption (standard on phones and laptops). In transit, all WebRTC streams are encrypted with DTLS-SRTP.

### Q19: What happens if I forget my password?
**A:** Account is device-bound. There is no recovery — by design (we don't store passwords anywhere). Workaround: sign up a new account on the same device. If you have an active licence, contact HMG ACADEMY support to transfer it.

### Q20: Can someone forge a license key?
**A:** No — the key is `sha256(secret + name + expiry)`, where `secret` is a 40-char random string pinned to your deployment. To forge, they'd need both the secret and the name. The secret never leaves the browser.

---

## Deployment

### Q21: How do I deploy to my school's domain?
**A:** See `docs/DEPLOYMENT.md` §8. Cloudflare Pages makes it free + automatic.

### Q22: How do I revoke a leaked license?
**A:** Add the key to `revoked.json` → push to GitHub → Cloudflare Pages deploys → every install blocks it within 30 minutes. For instant revocation, set up the optional Cloudflare Worker (see `docs/DEPLOYMENT.md` §6).

### Q23: Can I white-label it?
**A:** Yes — the source is MIT-licensed. Replace the HMG ACADEMY logo in `assets/`, edit `index.html` footer text, and you have a fully rebranded version.

---

## Multi-language

### Q24: How do I add Yoruba?
**A:** Copy `locales/en.json` → translate → save as `locales/yo.json` → reload. No build step. We'd love a PR!

### Q25: My language is missing. Can I contribute?
**A:** Yes! Open a PR at <https://github.com/hmgacademyhub/hmgacademyclassdeck/pulls>. Translation files are pure JSON.

---

## Advanced

### Q26: Can I run this on my Raspberry Pi as a local server?
**A:** Yes — `python3 -m http.server 8080`. But you'd lose HTTPS (which is required for getUserMedia). Use a Cloudflare Tunnel to expose HTTPS for free.

### Q27: Can I integrate with Google Classroom?
**A:** Not yet — planned for v10. The current platform is fully self-contained.

### Q28: How do I add a new tool to the toolkit?
**A:** Edit `js/toolkit.js`. The toolkit uses raw SVG. Add your button in `tb` and your draw function below.

### Q29: How do I add a new badge rule?
**A:** Edit `BADGE_RULES` in `js/badges.js`. Each rule is `{ id, icon, name, desc, check(ctx) }`. The `check` function receives a context object with the student's stats.

### Q30: How do I add a new language to the join.html?
**A:** Add a `<button class="lang-tile" data-set-lang="<code>">` in the language modal of `join.html`, `teach.html`, `dashboard.html`, `parent.html`. Then drop `locales/<code>.json`.

---

## Troubleshooting

### My whiteboard is laggy on tablet.
Try:
- Reduce browser zoom to 100%
- Close other tabs
- Use a stylus (the palm-rejection is tuned for a stylus, not a finger)

### Microphone not working on student side.
- Check the browser permission (🔒 icon in URL bar)
- HTTPS required (localhost or a real domain)
- Some browsers need a user gesture to start audio — students must click something first

### Service worker not registering.
- Make sure you're on HTTPS or localhost
- Check DevTools → Application → Service Workers

### PDF won't load.
- Most likely CORS-blocked. Download the PDF to your device and open from there.

---

## Still have a question?

Open an issue: <https://github.com/hmgacademyhub/hmgacademyclassdeck/issues>
