Files
thptqg/2016
tiennm99 6b21c625ac feat: replace xlsx (SheetJS) build pipeline with Rust xlsxread CLI (#1)
* feat(xlsxread): vendor Rust binary cloned from thptqg2017

Copies the xlsxread Rust crate from thptqg2017@8b4a755 (chore/xlsxread-rust).
Adds format_detect_2016 module with per-file column-layout auto-detection
mirroring detectFormat() in scripts/build-database.js (lines 63-87):
  - separate-scores: SBD/HOTEN/TOAN... fixed columns (dhhanghai files)
  - mapped: header-derived SOBAODANH|SBD + DIEM_THI dynamic indices
  - default: positional 6-col layout (no header)

Extends ParsedRow with ten_cum_thi and gioi_tinh fields.
Adds SCORE_FIELDS_2016 (12 cols: tieng_duc/tieng_nhat; no khtn/khxh/tieng_nga).
Adds thptqg2016-data.toml config with 18-column schema and format_detection flag.
58 tests pass (50 unit + 8 integration), 0 failures.

* feat(build): wire build:db to xlsxread CLI

Replaces the Node.js build:db script with the xlsxread Rust binary.
Adds build:rust script for the cargo compile step in isolation.

* chore: remove deprecated build-database.js

Superseded by the xlsxread Rust binary. All 119 source files (4 .xls +
115 .xlsx) are now processed by xlsxread with per-file format detection.

* ci: build xlsxread before running database build job

Adds dtolnay/rust-toolchain@stable and Swatinem/rust-cache@v2 steps
before the xlsxread build and database generation steps. Node/pnpm
steps now follow the Rust build rather than preceding it.

* chore: add Rust build artifacts to .gitignore

* docs: update README build instructions for xlsxread pipeline

* chore(deps): drop xlsx and better-sqlite3 from package.json and lockfile
2026-05-19 16:33:20 +07:00
..
2026-04-14 19:02:17 +07:00

thptqg2016

Lookup tool for Vietnam's 2016 National High School Graduation Exam (THPT Quốc gia) scores — 877,461 candidates nationwide.

Fully static app running entirely in the browser (SQLite via sql.js). No backend, no query logging.

Features

  • Quick lookup by exam ID (số báo danh) or full name (diacritics-insensitive)
  • Custom read-only SQL (SELECT / PRAGMA / EXPLAIN / WITH) with 7 built-in preset queries
  • Complete data: 12 subjects (Math, Literature, Physics, Chemistry, Biology, History, Geography, English, French, German, Japanese, Chinese), exam cluster, date of birth, gender
  • Safety caps: 100 rows for lookup, 1000 rows for custom SQL
  • Dark mode, Ctrl+Enter shortcut to run queries

Demo

https://tiennm99.github.io/thptqg2016/

Development

# Build the SQLite database from source Excel files (requires Rust stable)
pnpm run build:db

# Or build in two steps:
pnpm run build:rust          # compile the xlsxread binary
./tools/xlsxread/target/release/xlsxread build \
  --schema tools/xlsxread/configs/thptqg2016-data.toml \
  --input data \
  --output public/thptqg2016.db

pnpm run dev         # Vite dev server
pnpm run build       # Production bundle → dist/
pnpm run lint        # ESLint

The database is built by the xlsxread Rust binary (tools/xlsxread/), which reads the 119 mixed .xls/.xlsx files and auto-detects the column layout per file (separate-scores, mapped, or positional default). No Node.js Excel library is required at build time.

The GitHub Actions workflow (.github/workflows/deploy.yml) compiles xlsxread, builds the DB, gzips it, and deploys to GitHub Pages on every push to main.

Tech stack

React 19 · Vite · sql.js (WASM) · xlsxread (Rust, build-time) · GitHub Pages

Documentation

Source: Originally published at https://dtntbacgiang.edu.vn/tin-tuc/tin-tuc-su-kien/cong-bo-diem-thi-thptqg-2016-toan-bo-120-cum-thi-da-co-diem.html (currently inaccessible). Data is for reference only.