mirror of
https://github.com/tiennm99/try-gstack.git
synced 2026-05-14 08:58:50 +00:00
638af314ea0ac3ddac3d91cb2cc6a0e6804c2aa8
* feat(geom-engine): triangle module + position-strict congruentSSS Third pure module under src/geom-engine/. Adds Triangle type, sides() (returns named AB / BC / CA lengths), and congruentSSS() with position-strict semantics: labels define the correspondence (AB↔A'B', BC↔B'C', CA↔C'A'), permuted matches are NOT counted as congruent. This preserves SGK pedagogy where the labels and the matched-pair encoding (color + tick marks) carry meaning. 10 new unit tests: identical, translated-congruent, similar-not-congruent (2x scale), shape-different, EPSILON_LEN tolerance (within and just outside), label-permutation rejection, and symmetry of the relation. Total tests: 29 → 39. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(module-1): drag-to-explore tam giác bằng nhau (lớp 7, SSS) Second interactive theorem demo. Page at /lop-7/tam-giac-bang-nhau/. Component: src/components/congruence-sss.ts owns 6 draggable vertices (3 per triangle), each independently captured via setPointerCapture per vertex. Drag-clamping (16px viewBox padding) keeps every vertex on-screen. Encoding per autoplan Decision D3 (a11y + SGK-correct in one move): AB / A'B' → pair1 #D7263D + 1 tick BC / B'C' → pair2 #1B998B + 2 ticks CA / C'A' → pair3 #F46036 + 3 ticks Tick marks are SVG line segments perpendicular to each side at the midpoint, spaced 5 viewBox-units apart for multi-tick. Redrawn live during drag. Page: viewBox 400x300 (4:3, side-by-side triangles), single 6KB page including inline JS bundle (entire geom-engine + canvas controller, minified). Live side-length readout table + green badge "Hai tam giác bằng nhau (c.c.c)" that appears when SSS condition holds within EPSILON_LEN. Badge has role="status" + aria-live="polite" so screen readers announce the moment the triangles become congruent. Rigid-motion overlay animation EXPLICITLY DROPPED per autoplan — color+tick match is the success state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(hub): activate lớp 7 card linking to tam giác bằng nhau module Status flips from sap-ra-mat to live; href points at the new module. i18n/vi.ts gains module1.* strings (intro, instruction, theorem, example, SGK-aligned theorem statement) so every user-facing string still routes through t() — adding English in the future is one en.ts file away. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: VERSION 0.0.3.0 + CHANGELOG + TODOS update v0.0.3.0 = scaffold + Module 3 (góc nội tiếp) + Module 1 (tam giác bằng nhau). 2 of 3 MVP modules now live. Module 2 (tam giác đồng dạng) is next. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: TODOS Module 1 reflects v0.0.3.0 (SSS shipped) Original P1 items "SSS detector" + "SGK tick-mark encoding" already moved to Completed in the previous commit. Replace the still-pending M1 section with the actual remaining work: P2 toggles for SAS/ASA/AAS/cạnh huyền cases, P3 for extra examples. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hình Học Sống
Interactive Vietnamese THCS (lớp 7–9) geometry visualizer. Drag the points; watch the theorems hold. Aligned to the SGK curriculum.
Sandbox repo currently doubling as a gstack trial — see
CLAUDE.md.
Status
Scaffold only (v0.0.1.0). Modules are placeholders — landing page lists three grades with "Sắp ra mắt" badges. See the design doc at ~/.gstack/projects/tiennm99-try-gstack/ for the full plan.
Develop
bun install
bun run dev # http://localhost:4321/try-gstack/
bun run test # Vitest (geom-engine unit tests)
bun run typecheck # Astro check + TS strict
bun run build # Static output to dist/
Deploy
Auto-deploys to GitHub Pages from main via actions/deploy-pages@v4. See RUNBOOK.md for rollback + domain-migration procedure.
Architecture (locked decisions, per autoplan review)
- Static: Astro SSG,
base: '/try-gstack/', outputdist/ - Typography: Be Vietnam Pro single family, weights 400/500/700, woff2 only, Vietnamese subset
- Math engine: pure
src/geom-engine/module (no DOM imports), Vitest unit tests; property tests withfast-checkto be added with first canvas module - Canvas: vanilla SVG + Pointer Events +
setPointerCapture(no Konva) — to be added with first canvas module - Math rendering: KaTeX, bundled locally + SSR-rendered — to be added with first canvas module
- Animation: Web Animations API +
requestAnimationFrame(no GSAP / Motion One / Lottie) - Analytics: Cloudflare Web Analytics, deferred until 50+ daily sessions
- i18n: every string via
t()fromsrc/i18n/vi.ts; English added by addingen.ts
License
TBD.
Description
Sandbox repo for trying out gstack — a collection of Claude Code slash-command skills for planning, review, deploys, design, and browser automation.
Languages
TypeScript
64.8%
Astro
31.8%
CSS
1.7%
JavaScript
1.7%