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 β¦