Professional Arabic Transliteration Tool
A modern, AI-powered web application for transliterating Arabic text to Latin script using various academic transliteration standards. Perfect for scholars, researchers, students, and anyone working with Arabic texts.
- π― Multiple Academic Standards: Support for IJMES, ALA-LC, DIN 31635, Buckwalter, SHARIAsource, and Custom styles
- π Bidirectional Conversion: Convert Arabic to Latin script and reverse transliteration
- β‘ Batch Processing: Process multiple texts simultaneously via API
- π± Responsive Design: Optimized for desktop, tablet, and mobile devices
- π Real-time Processing: Instant transliteration with smart loading states
- π‘οΈ Robust Error Handling: Comprehensive error handling with automatic retry logic
- π¨ Modern UI: Clean, accessible interface built with Radix UI components
- π API First: RESTful API with comprehensive documentation
| Standard | Description | Use Case |
|---|---|---|
| IJMES | International Journal of Middle Eastern Studies | Academic publications |
| ALA-LC | American Library Association - Library of Congress | Library cataloging |
| DIN 31635 | German transliteration standard | German academic institutions |
| Buckwalter | ASCII-only transliteration system | Digital text processing |
| SHARIAsource | Enhanced IJMES with scholarly conventions | Islamic law research |
| Custom | Simplified, readable romanization | General readability |
- Framework: Next.js 15 with App Router
- Frontend: React 19, TypeScript, Tailwind CSS 4
- UI Components: Radix UI primitives with custom styling
- AI Integration: OpenAI GPT-4 / Azure OpenAI
- Styling: Tailwind CSS with custom design system
- Forms: React Hook Form with Zod validation
- Animations: Framer Motion
- Icons: Lucide React
- Node.js 18 or higher
- Package Manager: npm, yarn, pnpm, or bun
- API Access: OpenAI API key or Azure OpenAI endpoint
-
Clone the repository
git clone https://github.com/your-username/tansis-ai.git cd tansis-ai -
Install dependencies
npm install # or your preferred package manager -
Set up environment variables
Copy the example environment file:
cp .env.example .env.local
Update
.env.localwith your API credentials:# For OpenAI API OPENAI_API_KEY=your_openai_api_key_here # OR for Azure OpenAI (if using Azure) AZURE_SECRET_KEY=your_azure_secret_key_here AZURE_ENDPOINT_URL=https://your-instance.openai.azure.com/ AZURE_4_1_DEPLOYMENT=your_deployment_name
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000 to see the application.
Tansis AI provides a comprehensive RESTful API for programmatic access to transliteration services.
https://your-domain.com/api/transliterate
POST /api/transliterateTransliterate a single text string.
Request Body:
{
"text": "Ψ§ΩΨ³ΩΨ§Ω
ΨΉΩΩΩΩ
",
"style": "IJMES",
"reverse": false
}Response:
{
"transliteration": "al-salΔm ΚΏalaykum"
}POST /api/transliterate/batchProcess multiple texts in a single request for better performance.
Request Body:
{
"texts": ["Ψ§ΩΨ³ΩΨ§Ω
ΨΉΩΩΩΩ
", "Ω
Ψ±ΨΨ¨Ψ§"],
"style": "IJMES",
"reverse": false
}Response:
{
"results": [
{
"text": "Ψ§ΩΨ³ΩΨ§Ω
ΨΉΩΩΩΩ
",
"transliteration": "al-salΔm ΚΏalaykum"
},
{
"text": "Ω
Ψ±ΨΨ¨Ψ§",
"transliteration": "marαΈ₯aban"
}
]
}GET /api/transliterateReturns comprehensive API documentation with available styles, examples, and usage guidelines.
tansis-ai/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ transliterate/ # Transliteration endpoints
β βββ [style]/ # Dynamic style-specific pages
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ components/ # React components
β βββ ui/ # Reusable UI primitives (Radix UI)
β βββ ActionButtons.tsx # Copy/Clear/Share actions
β βββ ExamplesSection.tsx # Example texts showcase
β βββ StyleDropdown.tsx # Transliteration style selector
β βββ TextArea.tsx # Input/output text areas
β βββ TransliteratorCard.tsx # Main transliteration interface
βββ lib/ # Core utilities
β βββ openai.ts # OpenAI/Azure OpenAI configuration
β βββ styles.ts # Transliteration styles & prompts
β βββ utils.ts # Helper utilities (cn, etc.)
βββ types/ # TypeScript definitions
β βββ transliteration.ts # Type definitions
βββ public/ # Static assets
β βββ og.png # Open Graph image
β βββ favicon.ico # Favicon
βββ scripts/ # Development scripts
βββ test-api.js # API testing utilities
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Build production application |
npm run start |
Start production server |
npm run lint |
Run ESLint checks |
Test the API endpoints using the provided scripts:
node scripts/test-api.jsWe welcome contributions! Please follow these guidelines:
- Code Style: Follow existing TypeScript and React conventions
- Documentation: Update documentation for new features
- Testing: Test your changes thoroughly before submitting
- Error Handling: Implement proper error handling
- Accessibility: Ensure UI changes maintain accessibility standards
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and commit:
git commit -m "Add your feature" - Push to the branch:
git push origin feature/your-feature-name - Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Full API documentation available at
/api/transliterate - Issues: Report bugs or request features via GitHub Issues
- Discussions: Join community discussions in GitHub Discussions
- OpenAI for providing the AI capabilities that power the transliteration engine
- Radix UI for the accessible component primitives
- Vercel for the hosting platform and developer experience
- Contributors who help improve this project
Made with β€οΈ for the Arabic language research community
Live Demo β’ Documentation β’ API Reference
