← All write-ups

Building a Zero-Dependency Phonetic Sinhala (Singlish) Transliteration NPM Library for React, Next.js and Vue

Open Source & Frontend Architecture1 min read·Case study: Singlish Pro

Building localized web applications in Sri Lanka often hits a UX roadblock: users want to type Sinhala phonetically using a standard English QWERTY keyboard (Singlish), but existing browser extensions or heavy third-party scripts break controlled React/Vue inputs or introduce noticeable input lag. I built and published Singlish Pro on NPM to give developers a zero-dependency, drop-in phonetic Sinhala input engine.

11. Zero-Latency Sliding Buffer Phonetic Parsing

Sinhala Unicode is a complex abugida script where consonant clusters and vowel modifiers (pilla) combine dynamically across multiple keystrokes—such as 'nd', 'th', or 'ksha'. Replacing characters naively on every keydown breaks cursor positions and causes flickering.

I designed a sliding keystroke buffer that matches character sequences against an optimized phonetic lookup tree in under a millisecond, mutating only the active grapheme cluster while preserving native undo/redo and cursor selection.

22. Framework-Agnostic Core with Native React, Vue & Angular Adapters

Modern teams work across Next.js, React, Vue 3, Nuxt, Angular, and Laravel Blade. Rather than maintaining separate codebases, I built a pure JavaScript core lifecycle engine with thin, idiomatic wrappers for React Hooks, Vue Composables, and Angular Directives.

  • Under 40KB total footprint with zero external runtime dependencies
  • Global keyboard shortcut (Ctrl + Shift + S) and floating UI toggle to switch between English and Sinhala modes instantly
  • Built-in interactive Keyboard Layout reference modal for complex Sinhala character combinations

Need something similar built?

I build and ship platforms like this for startups and retailers. Tell me what you are trying to launch and I will reply with how I would approach it.