BrailleBridge is an accurate bidirectional English ↔ Braille converter that supports both Grade 1 (uncontracted) and Grade 2 (contracted) Unified English Braille (UEB).
- Framework: Next.js 16 (App Router)
- Language: TypeScript (strict)
- Styling: Tailwind CSS v4
- Animations: Framer Motion 12
- State Management: Zustand 5
- Notifications: Sonner 2
To get started with BrailleBridge, follow these steps:
# 1. Install dependencies
npm install
# 2. Configure environment variables
cp .env.example .env.local
# 3. Start development server (Turbopack)
npm run dev # → Open in your browser: http://localhost:3000
# 4. Build for production
npm run build && npm start{ "text": "Hello World", "direction": "encode", "grade": 2 }{ "result": "⠠⠓⠑⠇⠇⠕⠀⠠⠺⠕⠗⠇⠙" }| Field | Type | Required | Notes |
|---|---|---|---|
text |
string | ✅ | Maximum 50,000 characters |
direction |
"encode" | "decode" |
✅ | Specify conversion direction |
grade |
1 | 2 |
optional | Default: 1 |
| Type | Count | Description |
|---|---|---|
| Always contractions | 19 | ch, sh, th, wh, ed, er, ou, ow, ar, ing, st, and, for, of, the, with, ble, ous |
| Strong-word signs | 28 | but, can, do, every, … single-cell whole-word only |
| Short-form words | 49 | about, should, braille, children, because, … multi-cell abbreviations |
- Strip leading/trailing punctuation temporarily.
- Try short-form lookup (whole word, highest priority).
- Try strong-word lookup (whole word).
- Fall back to character-by-character with greedy longest-match for always-contractions.
- Re-attach punctuation.
- Handle whitespace → reset word-level states.
- Check multi-cell indicators (⠠⠠⠠, ⠠⠠, ⠠⠄, ⠰⠰, ⠰⠄).
- Check single-cell indicators (⠠, ⠼, ⠰).
- Numeric mode: digit lookup.
- Greedy longest-match contraction (skipped if ⠰ grade-1 active).
- Strong-word contractions only applied at word boundaries.
- Two-cell punctuation.
- Letter lookup.
- Single-cell punctuation.
- Unknown → warn and skip.
- Grade 2 word-boundary detection uses space-splitting; hyphenated tokens are treated as one unit.
- No support for Nemeth Code (math braille).
- No support for music braille.
- No support for 8-dot computer braille.
- Short-form "word" and "would" share the same braille pattern (⠺⠙); both decode to "would" — context-dependent disambiguation is not implemented.
- WCAG AAA contrast (pure monochrome palette).
aria-liveon all conversion output regions.- Roles:
tabpanel,tablist,alert,region. - Full keyboard navigation supported.
prefers-reduced-motionrespected.- Skip-to-main-content link included.
- Screen-reader labels on all interactive elements.
This project is licensed under the MIT License.