This document describes the implemented state of thai_script_pro as of March 28, 2026.
This file is the source of truth for the shipped MVP in this repository. Historical planning docs in docs/ remain useful background, but they do not override the behavior documented here.
The app is a single-page worksheet generator for Thai script practice. It is entirely client-side and currently focuses on worksheet configuration, live preview, and PDF export.
These decisions define the current MVP and should not be silently widened by later planning:
- Output is
PDF downloadonly. Print support is out of scope for MVP. - Paper size is not user-configurable in MVP. Export targets
A4only. - The shipped font scope is the current in-app set:
Traditional,Modern,Cursive. - Phase 2 planning is gated on MVP alignment and stronger regression coverage for current flows, not on adding more surface area first.
44Thai consonants are available in traditional order28vowel forms are available for practice- Consonants can be selected individually or through preset groups:
LCG1: Low Class Consonants, UnpairedLCG2: Low Class Consonants, PairedMC: Middle Class ConsonantsHC: High Class Consonants
- Vowels can be selected individually or through preset groups:
SHORTLONG
- Each category supports
Select AllandClear
The current SheetConfig supports:
rowsPerCharacter:1through8columns:3through12, constrained by selected font size and printable widthghostCopiesPerRowgridGuide:cross,sandwich,thaifont:traditional,modern,cursivefontSize:small,medium,large
Default configuration:
rowsPerCharacter: 3columns: 3ghostCopiesPerRow: 2gridGuide: thaifont: traditionalfontSize: medium
- The preview updates immediately as content or options change
- Preview columns are initialized from the rendered width, then normalized so the layout still fits a printable page
- Empty state is shown until at least one consonant or vowel is selected
- Vowels are rendered with placeholder-aware formatting so preposed and combining forms preview correctly
- Export uses
jsPDF - Output is generated as an
A4portrait PDF - The PDF embeds local font assets from
public/fonts/ - Export progress is surfaced through three phases:
preparinggeneratingdownloading
- Generated file name:
thai-script-practice.pdf
- There is no print action in the current UI; output is PDF download only
- There is no persistence layer or local storage for selections/settings
- There is no backend
- The current font set differs from the original MVP planning docs
- PDF export targets A4 only; paper-size selection remains out of scope for MVP
- Playwright covers browser smoke flows, but broader end-to-end coverage is still in progress
- Vitest covers data, hooks, components, and selected app-level flows
- Playwright smoke coverage exists in
e2e/for preview updates, download flow, and mobile sanity - A fresh worktree is not ready for verification until
pnpm installhas been run locally
src/App.tsx: app orchestration and PDF export statesrc/components/ContentSelection.tsx: consonant and vowel selection UIsrc/components/SheetOptions.tsx: worksheet controlssrc/components/Preview.tsx: live worksheet previewsrc/components/OutputActions.tsx: PDF export action and statussrc/hooks/useContentSelection.ts: selection state helperssrc/data/: Thai data, presets, and sheet option helperssrc/pdf/downloadPracticePdf.ts: PDF font loading, layout, drawing, and download
These files remain useful as background, but they are not the source of truth for current functionality: