Skip to content

Rewrite on Better-T-Stack, archive v1 - #21

Merged
narze merged 3 commits into
mainfrom
v2-rewrite
Jun 13, 2026
Merged

Rewrite on Better-T-Stack, archive v1#21
narze merged 3 commits into
mainfrom
v2-rewrite

Conversation

@narze

@narze narze commented Jun 13, 2026

Copy link
Copy Markdown
Member

What

A ground-up rewrite of Learn Manoonchai (the Manoonchai Thai-layout typing trainer) on a modern stack, plus a repo restructure:

  • The new app is promoted to the repo root.
  • The previous app is archived under v1/ (moved intact, still runnable).

Stack: SvelteKit 2 · Svelte 5 (runes) · Tailwind v4 · TypeScript · Bun workspace · Oxlint + Oxfmt · Vite+ (Vitest) · self-hosted Sarabun · LayerChart. Scaffolded with Better-T-Stack.

Why

v1 was on Svelte 3 with broken tests, an unthemed Tailwind-default look, and a stats chart that was mislabeled and faked (labeled "Raw WPM" while plotting a cumulative running average; per-second values hardcoded to +12/keystroke). This rewrite modernizes the stack and corrects the domain model.

Highlights

  • Honest stats engine — per-keystroke records derive real raw WPM (per-second), net WPM, and accuracy. See docs/adr/0001-honest-stats-engine.md.
  • Reimagined UI — focus lens with per-character feedback, animated on-screen keymap with next-key glow, LayerChart raw+net+error chart, end-of-drill summary. Light/dark theming (system default), WCAG AA, prefers-reduced-motion honored.
  • Thai correctness — grapheme-cluster rendering (Intl.Segmenter) keeps combining tone marks attached to their base; error feedback carries a non-color cue (underline), not color alone.
  • Parity — all 30+ lessons and the Manoonchai layout ported verbatim; configurable drill length (10/25/50).
  • Docs — domain glossary in CONTEXT.md, product brief in PRODUCT.md.

Tests & checks (all green)

Check Result
Vitest (unit + component) 36 passed
Playwright e2e 3 passed
svelte-check 0 errors
oxlint clean
bun run build succeeds

Reviewer notes

  • Dropped from v1 (intentional, per design): Ko-fi widget, in-app changelog, and the hide-logo / Esc-to-settings / Tab-restart toggles (Tab-restart and Esc-settings are now fixed behaviors).
  • .github/ CI is unchanged and still targets v1's layout (semantic-release, yarn build); it will need updating to run against the new root.
  • Deploy stays on adapter-auto (deployment was out of scope).
  • The server bundle is large (~966 kB → 211 kB gzip) because the lesson corpus is ~6.8k lines of data; lazy-loading is the obvious follow-up if it matters.

🤖 Generated with Claude Code

Reimagine Learn Manoonchai on a modern stack (SvelteKit 2 + Svelte 5 runes,
Tailwind v4, Bun workspace, Oxlint/Oxfmt, Vite+/Vitest). The previous app is
archived under v1/ and the new app is promoted to the repo root.

- Honest per-keystroke stats engine (raw WPM, net WPM, accuracy) replacing
  v1's mislabeled running-average chart (see docs/adr/0001).
- Reimagined UI: focus lens with per-char feedback, animated keymap with
  next-key glow, LayerChart raw+net+error chart, end-of-drill summary.
  Light/dark theming (system default), WCAG AA, reduced-motion.
- Grapheme-cluster rendering (Intl.Segmenter) so Thai combining marks stay
  attached to their base; error states carry a non-color cue.
- All 30+ lessons and the Manoonchai layout ported verbatim.
- Domain language in CONTEXT.md, product brief in PRODUCT.md.
- Tests: 26 unit + 10 component (Vitest) + 3 e2e (Playwright); type-check,
  lint, and build all clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
learn-manoonchai Ready Ready Preview, Comment Jun 13, 2026 5:44am

Request Review

The monorepo build placed adapter-auto's Vercel output under
apps/web/.vercel/output, but Vercel looked at the repo root and failed with
"No Output Directory named 'public'".

The app has no server routes, so switch to @sveltejs/adapter-static with full
prerendering (prerender = true) — index.html keeps its <head> meta/OG tags — and
add a root vercel.json pointing the output to apps/web/build. This is
dashboard-independent and works with Root Directory at the repo root.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The v1 workflows ran `yarn install` on Node 16 against the repo root, which is
now the bun-workspace v2 app — failing on the `bun@1.4.0` packageManager field
and the absent root yarn.lock.

- Rewrite test.yml: setup-bun, `bun install --frozen-lockfile`, then check,
  test (Vitest), build, and Playwright e2e from apps/web.
- Remove release.yml: the v1 semantic-release/npm flow no longer applies (v2 is
  a private static app deployed via Vercel). Its config remains under v1/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@narze

narze commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

Follow-up: CI and deploy are now fixed for the new root layout.

  • Vercel (5d13b1e): switched to @sveltejs/adapter-static with full prerender + a root vercel.json (output apps/web/build). Fixes the "No Output Directory named public" error.
  • GitHub Actions (4840061): rewrote test.yml for the bun/Vitest/Playwright stack and removed the obsolete v1 release.yml (semantic-release/npm no longer applies; its config stays under v1/).

Supersedes the "`.github/` CI is unchanged" note in the description above.

@narze
narze merged commit 4364899 into main Jun 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant