DarijaTranslator is a full-stack application that leverages a Large Language Model (LLM) to translate English text and speech into Moroccan Arabic (Darija)
# Darija LLM Translator 🇲🇦
An LLM-powered English → Moroccan Arabic (Darija) translator
with voice input/output and Chrome extension support.
## Features
- English → Darija translation using Gemini LLM
- Speech-to-text & text-to-speech
- Secure REST API (Basic Auth)
- Web UI + Chrome Extension
## Architecture
darijaTranslator (backend)/
│ ├── src/main/java/org/mql/translator/
│ ├── pom.xml
│
frontend/
│ ├── indexAI.html
│ ├── app.js
│ ├── login.html
│ ├── login.js
│ └── style.css
│ └── chrome-extension/
├── manifest.json
├── sidepanel.html
├── sidepanel.js
## Tech Stack
### Front-End
HTML5 / CSS3
JavaScript (Vanilla JS)
Web Speech API (SpeechRecognition, SpeechSynthesis)
Chrome Extension APIs
### Backend
Java
Jakarta EE
JAX-RS (RESTful Web Services)
Servlet Filters
Apache Tomcat (deployment server)
### LLM Integration
Google Gemini API
Model: Gemini 2.5 Flash
## Deployment
### Backend
The application is packaged as a WAR file and deployed on Apache Tomcat.
The Gemini API key is supplied via an environment variable.
### Front-End
The web application runs in any modern browser.
The Chrome extension is loaded in developer mode.