# Darija Translator: LLM-Powered RESTful Web Service
An LLM-powered RESTful web service that translates text from multiple languages (English, French, Spanish, Arabic) to **Moroccan Arabic Dialect (Darija)** using Google Gemini AI.
## Project Overview
This project implements a complete translation system with:
- **Java REST API Backend** — Jakarta RESTful Web Services (JAX-RS) deployed on Payara Micro
- **Chrome Extension** — Manifest V3 with side panel and context menu integration
- **Python Client** — CLI-based translation client
- **PHP Client** — Web and CLI translation client
- **React Native Mobile App** — Cross-platform mobile application
- **Security** — Basic Authentication via Jakarta Authentication Specification
- **LLM Integration** — Google Gemini 1.5 Flash for AI-powered translations
## Architecture
```
┌──────────────────────────────────────────────────┐
│ CLIENT LAYER │
│ ┌──────────┐ ┌──────┐ ┌─────┐ ┌──────────────┐ │
│ │ Chrome │ │Python│ │ PHP │ │ React Native │ │
│ │Extension │ │Client│ │Client│ │ Mobile App │ │
│ └────┬─────┘ └──┬───┘ └──┬──┘ └──────┬───────┘ │
└───────┼──────────┼────────┼────────────┼─────────┘
│ │ │ │
▼ ▼ ▼ ▼
HTTP POST + Basic Auth + JSON
│
┌───────┼──────────────────────────────────────────┐
│ ▼ SERVER LAYER │
│ ┌─────────────────────────────────────────────┐ │
│ │ Payara Micro (Jakarta EE) │ │
│ │ ┌──────────────┐ ┌────────────────────┐ │ │
│ │ │BasicAuthFilter│ │ CorsFilter │ │ │
│ │ └──────┬───────┘ └────────────────────┘ │ │
│ │ ▼ │ │
│ │ ┌──────────────────┐ │ │
│ │ │TranslatorResource│ POST /api/translate │ │
│ │ └──────┬───────────┘ │ │
│ │ ▼ │ │
│ │ ┌──────────────────┐ …