A fully client-side linguistic repair engine that converts chaotic phonetic Bangla ("Takla Bangla") into grammatically correct Bengali script.
✅ Ultra-Minimal UI - Flat, monochrome, Google Translate-inspired
✅ Free AI Models - Trinity Large 400B, Solar Pro 3, more (all free!)
✅ Auto Dark Mode - Switches with system preference
✅ Zero Backend - Runs entirely in your browser
✅ User-Owned API Keys - Your keys never leave your device
✅ OpenRouter Integration - Access 100+ AI models through one API
✅ Real-Time Streaming - See translations as they're generated
✅ Monospace Design - JetBrains Mono font, clean typography
✅ Lightning Fast - Only 22KB bundle, loads instantly
- Visit OpenRouter.ai
- Sign up for an account
- Generate an API key
- Add credits to your account
Simply open index.html in any modern browser. That's it!
Or use a local server:
# Python
python -m http.server 8000
# Node.js
npx serve .
# PHP
php -S localhost:8000Visit http://localhost:8000
This app is pure static HTML/CSS/JS and works on any static hosting:
vercel --prodDrag and drop the folder into app.netlify.com/drop
npx wrangler pages publish .- Push to a GitHub repo
- Settings → Pages → Deploy from
mainbranch
- Enter your OpenRouter API key
- Type phonetic Bangla in English letters:
ami tore onk vlobashi kmon acho tumi? - Click "Translate →"
- Get corrected Bengali:
আমি তোকে অনেক ভালোবাসি কেমন আছো তুমি?
- Temperature: Control creativity (0.0 = deterministic, 0.5 = creative)
- Streaming: Enable/disable real-time output
- Safety Filter: Toggle content filtering
Free Models (Default):
arcee-ai/trinity-large-preview- Trinity Large 400B (DEFAULT)upstage/solar-pro-3- Solar Pro 3 102Bliquid/lfm-2.5-1.2b-thinking- LFM 1.2B Thinkingliquid/lfm-2.5-1.2b-instruct- LFM 1.2B Instructgoogle/gemini-2.0-flash-exp:free- Gemini 2.0 Flash
Paid Models:
anthropic/claude-3.5-sonnet- Claude 3.5 Sonnetopenai/gpt-4o- GPT-4o
You can manually enter any OpenRouter model ID in custom mode.
User Browser
↓
OpenRouter API (https://openrouter.ai/api/v1)
↓
[Claude / GPT / Gemini / 100+ other models]
No proprietary backend. No data collection. No tracking.
Mitigation:
- Keys stored in
localStorage(device-only) - Never sent to any server except OpenRouter
- Set spending limits on your OpenRouter account
- Use disposable keys for public demos
- First token: < 1.2s (with streaming)
- Full translation: < 4s average
- Bundle size: ~22KB uncompressed, ~8KB gzipped
- Works offline after first load (with cached SDK)
- Chrome/Edge: ✅ Full support
- Firefox: ✅ Full support
- Safari: ✅ Full support (iOS 14+)
- Opera: ✅ Full support
Requires: ES6 modules, Fetch API, localStorage
Edit SYSTEM_PROMPT in app.js:
const SYSTEM_PROMPT = `Your custom instructions here...`;Edit UNSAFE_PATTERNS in app.js:
const UNSAFE_PATTERNS = [
/your-regex-here/i,
];Edit styles.css - all styles use CSS variables for easy theming:
:root {
--primary: #2563eb;
--secondary: #64748b;
/* ... */
}Typical usage:
- Short message (50 chars): ~$0.0001
- Paragraph (500 chars): ~$0.001
- Long text (5000 chars): ~$0.01
Actual costs vary by model. Claude Sonnet is recommended for quality/cost balance.
- Double-check your OpenRouter key
- Ensure you've added credits to your account
- Try testing the key in OpenRouter's playground first
- Wait 60 seconds
- Switch to a different model
- Check your OpenRouter dashboard for limits
- Check your internet connection
- Try a different model
- Verify the model ID is correct
- Ensure your browser supports ReadableStream
- Try disabling streaming in Advanced Settings
- Check browser console for errors
No build step required! Just edit the files:
index.html- Structurestyles.css- Stylingapp.js- Logic
Changes are reflected immediately on refresh.
takla-bangla/
├── index.html # Main HTML
├── styles.css # All styles
├── app.js # Application logic
└── README.md # This file
POST https://openrouter.ai/api/v1/chat/completions
Headers:
Content-Type: application/json
Authorization: Bearer YOUR_KEY
Body:
{
"model": "anthropic/claude-3.5-sonnet",
"messages": [...],
"temperature": 0.2,
"stream": true
}See OpenRouter docs for full API reference.
MIT License - Use freely in any project
This is a reference implementation. Fork and customize as needed!
- OpenRouter Issues: openrouter.ai/docs
- General Questions: Check browser console for errors
- Initial release
- Full OpenRouter integration
- Streaming support
- Safety filtering
- Cost estimation
Built with ❤️ for the Bangla-speaking community