How timothytnm26/abugikha works
NarakThai is a Thai-script learning product with web and mobile clients, a shared language engine, and an API for accounts and synced learning state. The main learner workflow is to explore Thai sounds and script, then compose syllables and inspect their pronunciation and tone rules. The README documents the clients’ shared-engine and mobile-sync roles; sampled API routes show how requests reach domain services. Some client-to-widget and unsampled engine internals are not shown, so those links are intentionally omitted.
Main entry points: app Mobile learning app · client.ts D1 database · pages Web learning app · app.ts API router
Components 25
Learning clients
- Web learning app
apps/web/src/pages - Mobile learning app
apps/mobile/src/app - Syllable builder
apps/web/src/features/build-syllable/model/builder-store.ts - Offline progress
apps/mobile/src/store/learning.ts
Thai language engine
- Syllable analysis
packages/core/src/syllable - Consonants and vowels
packages/core/src/consonant - Phonetics and romanization
packages/core/src/phoneme - Thai writing
packages/core/src/writing
Learning content
- Lexicon
packages/core/src/lexicon - Script history
packages/core/src/script-history - Localized content
packages/i18n/src/catalog.ts
Sync and accounts
- API router
apps/api/src/app.ts - Authentication routes
apps/api/src/modules/auth/routes.ts - Session service
apps/api/src/modules/auth/service.ts - Session authentication
apps/api/src/middleware/auth.ts - User routes
apps/api/src/modules/users/routes.ts - User service
apps/api/src/modules/users/service.ts - Preference routes
apps/api/src/modules/preferences/routes.ts - Preference service
apps/api/src/modules/preferences/service.ts - Progress routes
apps/api/src/modules/progress/routes.ts - Progress sync service
apps/api/src/modules/progress/service.ts - D1 database
apps/api/src/db/client.ts
Shared interfaces
- API schemas and client
packages/contracts/src/client.ts
Other components
- Learner
- Cloudflare D1
Connections 31
- Learner → Web learning app: explores
README.md - Learner → Mobile learning app: learns with
README.md - Web learning app → Syllable analysis: uses shared engine
README.md - Mobile learning app → Syllable analysis: uses shared engine
README.md - Web learning app → Localized content: displays localized content
README.md - Mobile learning app → Localized content: displays localized content
README.md - Mobile learning app → Offline progress: stores progress offline
README.md - Mobile learning app → API router: syncs progress
README.md - Web learning app → Syllable builder: offers composition controls
README.md - Syllable builder → Syllable analysis: builds syllables with
README.md - API router → Authentication routes: mounts routes
apps/api/src/app.ts - API router → User routes: mounts routes
apps/api/src/app.ts - API router → Preference routes: mounts routes
apps/api/src/app.ts - API router → Progress routes: mounts routes
apps/api/src/app.ts - Authentication routes → Session service: calls
apps/api/src/modules/auth/routes.ts - User routes → User service: calls
apps/api/src/modules/users/routes.ts - Preference routes → Preference service: calls
apps/api/src/modules/preferences/routes.ts - Progress routes → Progress sync service: calls
apps/api/src/modules/progress/routes.ts - Authentication routes → Session authentication: requires authentication
apps/api/src/modules/auth/routes.ts - User routes → Session authentication: requires authentication
apps/api/src/modules/users/routes.ts - Preference routes → Session authentication: requires authentication
apps/api/src/modules/preferences/routes.ts - Progress routes → Session authentication: requires authentication
apps/api/src/modules/progress/routes.ts - Session service → D1 database: reads and writes
apps/api/src/modules/auth/service.ts - Session service → User service: converts user
apps/api/src/modules/auth/service.ts - Session authentication → D1 database: checks sessions
apps/api/src/middleware/auth.ts - User service → D1 database: reads and writes
apps/api/src/modules/users/service.ts - Preference service → D1 database: reads and writes
apps/api/src/modules/preferences/service.ts - Progress sync service → D1 database: reads and writes
apps/api/src/modules/progress/service.ts - D1 database → Cloudflare D1: uses D1 binding
apps/api/src/db/client.ts - Mobile learning app → API schemas and client: uses API client
README.md - Web learning app → API schemas and client: uses API client
README.md