Logo Lanfrica

oumaymasgithub/Translator-Service

Domain:

natural language processing

Record type:

software
Creator:
oum
Host:
LLM-powered RESTful web service that translates text into Moroccan Darija using Google Gemini, built with Jakarta EE 10, secured with Basic Auth, and consumed by a Chrome Extension, PHP, Python, and React Native clients. # Darija Translator An LLM-powered RESTful web service that translates text into Moroccan Arabic Dialect (Darija) using Google Gemini, built with Jakarta EE 10 and consumed by four multi-platform clients. --- ## What is this? Darija is the spoken Arabic dialect of Morocco. It blends Arabic, French, Amazigh, and Spanish and is largely absent from standard translation tools. This project fills that gap by combining structured prompt engineering with Google Gemini 1.5 Flash to produce authentic, colloquial Darija translations, exposed as a secure REST API and consumed by four different client applications. --- ## Features - REST API built with Jakarta JAX-RS, secured with HTTP Basic Authentication - Translation powered by Google Gemini 1.5 Flash with Darija-tuned prompts - Chrome Extension using Manifest V3 and the Side Panel API - PHP web client using cURL - Python Flask web client using the requests library - React Native mobile app for iOS and Android with translation history - Embedded Payara Micro container — no external server setup required --- ## Architecture ``` +------------------+ | Chrome Ext. |--+ +------------------+ | +---------------------------+ | PHP Client |--+-- HTTP Basic ->| Payara Micro :8080 | +------------------+ | Auth + JSON | translator-service.war | | Python Client |--+ | Jakarta EE 10 / JAX-RS | +------------------+ | +-------------+-------------+ | React Native |--+ | +------------------+ | HTTPS v +------------------------+ | Google Gemini API | | gemini-1.5-flash | +------------------------+ ``` --- ## Project Structure ``` translator-service/ ├── pom.xml ├── src/main/ │ ├── java/com/example/translator/ │ │ ├── config/ # JaxRsApplication, SecurityConfig, IdentityStoreConfig │ │ ├── resource/ # TranslatorResource — REST endpoints │ │ ├── …