astrnox/TATAbox
astrnox/TATAbox has 88 GitHub stars and 7 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-15 17:44 UTC. Last push 2026-11-13.
Measured star growth
- in 24h
- +1
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Your Complete Biology Study Companion — From Gaokao to Competition Level;高中生生物学习平台-高考到竞赛全链路学习方案
LearningREADME-en.md
OriginalTATABOX — Biology Learning Platform for High School Students

From biology-league prep to Gaokao mock exams — practice biology with one website.
🇨🇳 中文版 · 🌐 Live Demo · 📝 Start Practicing · 💬 Report an Issue
What is this?
TATABOX is a biology learning website built specifically for high school students. Whether you are preparing for the National High School Biology League, grinding Gaokao mock exams, or reinforcing what you learned in class, you can use it.
[!IMPORTANT] 📚 Question bank status: the bank now contains 3,400+ questions across 80 biology topics (league past papers, module drills, logic questions, daily league, and more — 9 data sources). High-quality past papers and explanations are still being expanded.
Quick Start
👉 Just want to use it (students / teachers)
Open the online version directly: https://tatabox.cc.cd/
- You can practice without registering; registering lets you sync your wrong-answer book and learning progress.
- Lite mode: on phones or low-end devices open tatabox.cc.cd/lite.html — only five views (Today / Practice / Review / Wrong / Board), zero framework and faster startup.
- Wrong-answer book, practice, and quiz pages all support printing: A4 pagination, with questions and answer explanations printable separately.
- Features like the AI tutor and photo-based question search require you to configure your own API Key (they all use the free tiers of various providers — no cost, tutorial included).
- Supports offline use — add it to your phone's home screen and use it like an app; download the core or full offline question bank from Profile → Data.
👨💻 Want to deploy / modify the code yourself
This is a pure static site with no backend — deployment is simple:
# 1. Clone the repo
git clone https://github.com/astrnox/TATAbox.git
cd TATAbox
# 2. Preview locally (pick one)
python -m http.server 8000 # Python
npx serve . # Node.js
# 3. Open http://localhost:8000 in your browser
Deploy online: just drop the whole folder onto any free hosting platform (GitHub Pages, Vercel, Netlify, Cloudflare Pages). No build step, no server needed.
Things you may want to configure:
- Database: create a free project at Supabase, run the canonical baseline
sql/schema.sql, thensql/migration_tracker.sql, and finally allsql/migration_v2.sql→migration_v22_profiles_policy_cleanup.sqlmigrations in version order (do not cherry-pick:v18locks downprofiles,v19hardens the username-login RPC,v20adds admin user-operation RPCs,v21closes self-service account deletion, andv22cleans up duplicated/over-restrictive profiles policies;schema_safe.sql/incremental_update.sqlare legacy repair scripts for existing databases only). Existing deployments that already ran v15 must re-run v15 after v18 (its TOTP admin-upgrade function now uses the internal-write flag; otherwise the hardened trigger will revert it). Always deploy SQL before the frontend code, then fill the URL and key intojs/core/supabase-client.js(optional — without it, it automatically falls back to browser local storage). - AI features: users enter their own API Key in "Profile → Settings"; developers don't need to manage it.
- Quality gates: run
npm testbefore contributing (manifest anchor + data/migration checks + ESLint + design audit + unit tests/coverage + smoke test).
Feature Highlights
| Feature | What it does |
|---|---|
| Practice & Mock Exams | Module drills across 80 biology topics with 3,400+ questions (league papers, module drills, logic, daily league), auto-graded with explanations |
| Smart Wrong-Answer Book | Wrong answers auto-collected; add questions by photo (print/handwriting OCR); FSRS due-date badges and sorting |
| Printing | Print wrong-answer book, practice, or quiz sets in three modes (questions + answers / questions only / answers only), with A4 pagination and a per-page footer |
| Knowledge Cards | Anki-style spaced repetition, automatically scheduled by your forgetting curve |
| Knowledge Graph v5.0 | 80 exam nodes + encyclopedia layer (401 local seed entries, cloud-extensible) + word cloud, with AI explanations and direct wiki links |
| Video Library | 37 topic demo videos with seven tag filters (animation / 3D / microscopy / time-lapse / realistic / lecture / live-action) |
| Lite Mode | Standalone lite.html with five views (Today / Practice / Review / Wrong / Board) — zero framework, fast startup, phone-friendly |
| Skill Diagnosis | A radar chart after each session shows which topics you're weak in |
| AI Tutor | Ask anything anytime — supports drawing, explaining, and generating similar questions |
| Virtual Labs | Plasmolysis, chromatography, DNA extraction and more — simulate experiments right in the browser |
| Molecule Visualization | Enter SMILES to view 2D structures, load PDB for 3D molecules, plus a genome browser |
| Learning Analytics | See how long you study each day and which questions you miss most |
| Community Discussion | Discuss questions with other students |
| Security & Privacy | Supabase Row-Level Security, public profile views, admin TOTP, server-side protection for sensitive fields |
Recent updates
- Printing system: zero-dependency
print-utils.js; three scenarios × three modes; dirty records no longer break a whole batch - FSRS loop: create a card on a wrong answer, only advance existing cards on correct answers; due badges and today's review queue
- Knowledge graph v5.0: on-demand encyclopedia layer (DB → local seed fallback), weighted word cloud
- Video library: 34 new competition-topic videos, tags and license whitelist checks for all 37
- Lite login: mint-paper + forest-green single CTA, password visibility, error focus, clear password on close
- Security hardening:
profilesself-only, narrow login RPC, TOTP-only admin access
Core Algorithms (for the technically inclined)
Click to expand: the algorithms that make it "smart"
1. Memory / review algorithm (FSRS)
Replaces the traditional Anki SM-2 algorithm. It automatically computes the optimal next review time based on how hard a card is for you, using three memory metrics: stability, difficulty, and retrievability.
Wrong answers now form a closed loop: a wrong answer mirrors Again locally and creates a cloud review_cards entry; a correct answer only advances cards that already exist, so ordinary questions never get spurious cards; guests fall back to the local due queue.
const scheduler = tsFsrs.fsrs({ request_retention: 0.9, maximum_interval: 36500, enable_fuzz: true });
const result = scheduler.next(card, now, Rating.Good);
2. Ability estimation (IRT)
Instead of a simple "how many did you get right," it uses item response theory (3PL model) on your answer history to estimate ability level, taking into account how hard and how discriminative each question is. It also uses Bayesian Knowledge Tracing (BKT) to estimate the probability you've mastered each knowledge point. Note: item parameters (a/b/c) are currently heuristic estimates from question type and option count, not offline-calibrated; treat the result as a relative trend / weak-spot signal, not a standardized test score.
3. OCR photo-based question search
Two-layer recognition: if the user has configured a multimodal LLM key, AI recognition is used first (higher accuracy, handles italics and formulas); otherwise Tesseract.js runs locally in the browser — upscaling, grayscale, contrast stretch, and binarization before recognition, then a few regexes to fix common recognition errors.
// Image preprocessing
const stretched = gray.map(v => ((v - min) / (max - min)) * 255);
const bin = stretched.map(v => v > 140 ? 255 : 0);
4. Streaming rendering
While the AI answers, it first streams plain text character by character (fast), then re-renders the full response as Markdown once complete, auto-drawing any inline SVG diagrams.
chunkEl.textContent += delta; // streaming: plain text append
finalEl.innerHTML = DOMPurify.sanitize(marked.parse(text)); // render after completion
Tech Stack
Pure frontend architecture — no backend server to run:
- Frontend: vanilla JavaScript (SPA) + CSS3 + PWA (offline support); plus a zero-framework lite mode (
lite.html) - Data: Supabase (free tier, RLS + narrow RPCs) + IndexedDB (browser-side local database)
- AI: directly connects to 6 LLM providers from the frontend (DeepSeek, Zhipu, Qwen, Kimi, NVIDIA, SiliconFlow) with streaming output
- Visualization: Chart.js, Cytoscape.js, a pure-SVG force-directed knowledge graph (with encyclopedia layer / word cloud), Mermaid, 3Dmol.js, igv.js
- Printing: zero-dependency
js/core/print-utils.js— A4, pagination, fixed footer, browser-native print - OCR: Tesseract.js (local) + multimodal LLM (cloud)
- Video: Wikimedia Commons public-domain / CC assets, individually whitelisted
- Font: LXGW WenKai (loaded locally, no network wait)
Open-Source Dependencies
This project bundles 24 open-source third-party libraries, all under permissive licenses (MIT/Apache/BSD) compatible with CC BY-NC-SA. Full license statements are in js/vendor/THIRD_PARTY_LICENSES.txt.
Some notable ones:
- ts-fsrs — spaced repetition algorithm (MIT)
- KaTeX — math rendering (MIT)
- Dexie.js — browser local database (Apache-2.0)
- Chart.js — charts (MIT)
- 3Dmol.js — 3D molecule visualization (BSD-3)
- RDKit.js — SMILES to 2D molecule (BSD-3)
- DOMPurify — XSS protection (MPL-2.0/Apache-2.0)
- Excalidraw — hand-drawn whiteboard (MIT)
- PhET — interactive simulations (CC BY 4.0)
- LXGW WenKai — Chinese font (OFL-1.1)
License
This project is dual-licensed:
- Code (
js/,css/,scripts/,*.htmlstructure, etc.): MPL-2.0 - Content (
data/question bank,images/, PDF study materials, encyclopedia entries, animations, etc.): CC BY-NC-SA 4.0
Code (MPL-2.0)
MPL-2.0 is a weak copyleft license: modification and commercial use are allowed, but modified files (and their derivatives) must remain available under MPL-2.0; it is file-level and can be combined with closed-source projects.
Content (CC BY-NC-SA 4.0) — non-commercial clause
As long as you're not directly selling the content itself, learning & educational use is fine:
✅ Personal study and reuse
✅ Schools, tutoring/extension centers using it for teaching (even if you charge tuition — you're selling a teaching service, not the content)
✅ Non-profit education projects and education-aid initiatives
❌ Selling the question bank/PDFs/animations content directly
❌ Removing the copyright or claiming you wrote it
Content commercial licensing
Content is not permitted for commercial use by default. Using the question bank, PDFs, animations, etc. for commercial purposes (corporate training, paid platforms / commercial SaaS, reselling the question bank) falls outside the default license and requires a separate written commercial licensing agreement with the copyright holder astrnox (reachable via GitHub Issues). Education / non-profit projects are generally granted the license free of charge.
Roadmap
Planned work:
- Continue expanding the high-quality question bank (currently 3,400+ questions; keep raising the share of past papers and explanation quality)
- Wrong-answer book printing (browser-native A4, can save as PDF; questions and answers printable separately)
- FSRS cloud loop and multi-device sync (cards, due sorting, today's review entry)
- Competition-topic video library with tag filters
- Knowledge Graph v5.0 encyclopedia layer and word cloud
- Auto-grading for biology drawing questions
- More virtual labs
- More animations and encyclopedia entries
- Class/teacher management improvements
- Mobile app packaging (TWA/PWA already supported; native shell considered later)
Feel free to open an Issue for features you'd like!
Contributing
Contributions are welcome! Whether you:
- Know biology: expand the question bank, fix question errors, write explanations
- Can code: fix bugs, add features
- Can design: improve the UI
- Or none of the above: open an Issue if something's wrong or you have an idea
How to contribute code
- Fork this repository
- Create your branch (
git checkout -b feat/xxx— see CONTRIBUTING.md for the naming rules) - Commit your changes (
git commit -m 'feat: describe your change (#issue)', following Conventional Commits) - Push to your branch (
git push origin feat/xxx) - Open a Pull Request
Before submitting, run npm run lint:js && npm run audit:design to self-check.
The full code style guide is in docs/代码风格指南.md (Chinese).
Question-bank data lives in the data/ folder — just edit the JSON to add questions.
Acknowledgements
- Thanks to Congqianguo for contributions and support
- Thanks to the Open Spaced Repetition community for the FSRS algorithm
- Thanks to all the open-source library authors
- Thanks to PhET Interactive Simulations (University of Colorado Boulder) for high-quality interactive simulations
- Thanks to every student using TATABOX to study biology — best of luck on your exams!
Note: I'm a high school student myself, so it may take a while to respond to issues 😅