LLM-powered RESTful Web Service for Moroccan Darija translation. Built with Spring Boot and Google Gemini 3 Flash, featuring a distributed architecture with multiple client integrations (Chrome Extension, React Native, Python, and PHP).
# 🇲🇦 Darija Translator --- LLM-Powered RESTful Web Service
**Mini Project 2 \| Advanced Distributed Programming Paradigms**\
**Professor:** Pr. El Habib Nfaoui
------------------------------------------------------------------------
## Overview
A robust Spring Boot RESTful Web Service designed to translate text from
multiple source languages (English, French, Spanish, and Arabic MSA)
into Moroccan Arabic Dialect (Darija).
The system leverages the **Google Gemini 3 Flash model** for
high-accuracy, context-aware translations.
------------------------------------------------------------------------
## Why Spring Boot?
To align with modern distributed paradigms, Spring Boot was utilized to
replace traditional Jakarta EE boilerplate:
- **Embedded Tomcat:** No manual WildFly or GlassFish setup\
- **Java-Based Security:** Replaced web.xml with a fluent
SecurityFilterChain\
- **Simplified Configuration:** Credentials and API keys managed in
`application.properties`\
- **Jakarta Mapping:** REST concepts follow course slide patterns
------------------------------------------------------------------------
## Project Structure
darija-translator/
│
├── java-rest-service/
│ ├── src/main/java/ma/project/
│ │ ├── DarijaTranslatorApplication.java
│ │ ├── TranslatorController.java
│ │ ├── GeminiService.java
│ │ └── SecurityConfig.java
│ └── resources/application.properties
│
├── chrome-extension/
│ ├── sidepanel.html/js
│ └── manifest.json
│
├── php-client/
│ └── translator_client.php
│
├── python-client/
│ └── translator_client.py
│
└── react-native-client/
└── DarijaTranslatorApp/
├── App.js
└── api.js
------------------------------------------------------------------------
## Quick Start
### 1. Configure the Backend
- Obtain a Gemini API Key from Google AI Studio\
- Open:
java-rest-service/src/main/resources/application.properties
- Add your key:
gemini.api.key=YOUR_ACTUAL_KEY
### 2. Launch the Service
``` bash
cd jav …