A free, fully client-side web app for designing and exporting professional corporate letters in Persian (RTL) and English (LTR).
No backend. No sign-up. Everything runs in the browser.
🌐 Live Demo
·
Demo license key: OPEND-EMO20-26LTR-BLDR0
| 📄 Live A4 Preview | Every change reflects instantly on the page |
| 📥 PDF Export | High-quality output with correct Persian font rendering |
| 🔄 RTL ↔ LTR Toggle | Full direction switch — layout, labels and alignment all reverse |
| 🖼️ Logo Upload | Drag-and-drop (JPG, PNG, WebP, SVG — max 2 MB) |
| ✍️ Rich Text Editor | Bold, italic, underline, headings, lists, tables, images, text color |
| 📅 Jalali Date Picker | Shamsi calendar for Persian letters |
| 📂 Template System | Save / load / delete letter templates stored in the browser |
| 💾 JSON Import / Export | Transfer all settings between devices |
| 🌙 Dark / Light Mode | Full theme support |
| 🔢 Auto Letter Number | Jalali year + auto-incrementing counter (1405/آ/01) |
| 🔐 License Gate | Optional soft-lock — easily customizable (see below) |
git clone https://github.com/Alirewa/Letter-Builder.git
cd Letter-Builder
npm install
npm run devNote: The app uses B Nazanin for Persian text. Place
BNazanin.ttfandBNazaninBold.ttfinpublic/fonts/— this font is not redistributable and must be obtained separately.
The license gate is a client-side soft-lock defined in src/lib/license.ts.
To set your own key, edit the VALID_CODE constant:
// src/lib/license.ts
const VALID_CODE = 'YOURKEY0000000000000'; // exactly 20 alphanumeric charsRules:
- Exactly 20 alphanumeric characters (A–Z, 0–9, case-insensitive)
- Dashes are stripped automatically — users can enter
XXXXX-XXXXX-XXXXX-XXXXXor without dashes - The gate is wired into
src/app/layout.tsxby default (<LicenseGate>{children}</LicenseGate>). The unlock state is stored inlocalStorage, so it's only asked once per browser - To disable the gate entirely, remove the
<LicenseGate>wrapper insrc/app/layout.tsxand render{children}directly
npm run build # outputs to /out — ready for any static hostGitHub Pages deploys automatically via the included Actions workflow on every push to master.
| Tool | Purpose |
|---|---|
| Next.js 16 (static export) | Framework |
| React 19 + TypeScript 5 | UI & type safety |
| Tailwind CSS v4 | Styling |
| Zustand 5 | State management with localStorage persistence |
| TipTap | Rich text editor |
| react-multi-date-picker | Jalali calendar |
| html2canvas + jsPDF | PDF generation |
MIT — free to use, modify, and distribute.
Designed & built by @Alirewa