I built a secured REST service that translates any language into Moroccan Darija with an LLM, plus four clients that call it: a Chrome extension, a PHP site, a Python app and a React Native mobile app.
Darija is the everyday language of more than 30 million people, but most translation tools only offer Modern Standard Arabic (Fus7a). Fus7a is what you read in the news, not what you say at the hanout. This project, Mini Project 2 of my course, asks a general-purpose LLM to produce the Darija people actually speak.
Architecture
Every client sends the same JSON request with HTTP Basic credentials. Inside the server, the request passes the security layer, then the resource, the service and the LLM client, which calls whichever model is configured.
The server: plain Jakarta EE
The server uses only Jakarta EE 10 APIs and the JDK.…