Menu

Building a Darija Translator: Jakarta REST, an LLM, and Four Clients
📰

Building a Darija Translator: Jakarta REST, an LLM, and Four Clients

DEV Community: api·Nouha50215·about 22 hours ago
#MxnEIDG9
#devtoapi#devto#dev#darija#jakarta
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.