Contents
Table of Contents
MokoTranslate
Go-based admin GUI + API gateway for a self-hosted LibreTranslate translation server — API-key auth, per-key rate limiting, usage analytics, a translation playground, and Prometheus metrics.
| Type | Go service (admin GUI + API gateway) |
| Version | 01.00.00 |
| Go | 1.23+ |
| Engine | LibreTranslate (Argos/OpenNMT) |
| License | GPL-3.0-or-later |
| Platform | MokoGitea (primary) |
| Live | https://translate.mokoconsulting.tech |
Overview
LibreTranslate ships a great engine and REST API, but its only web surface is a translation playground — there is no admin GUI. Keys are managed with the ltmanage keys CLI + a SQLite DB, rate limits are env vars, and metrics are a raw Prometheus endpoint.
MokoTranslate fills that gap. It sits in front of a private LibreTranslate instance as the single public door and owns authentication, per-key rate limits, usage logging, and a browser dashboard. Because the gateway owns auth, the engine behind it is swappable without changing how clients authenticate.
client ──► MokoTranslate ──► LibreTranslate
:8080 :5000 (private, keys OFF)
• API-key auth • all languages
• per-key limits
• usage logging
• admin dashboard + playground
• /metrics, /healthz
Features
| Feature | Description |
|---|---|
| API-key management | Issue, label, rate-limit, and disable keys from the web UI. Keys are shown once, stored only as SHA-256 hashes. |
| Per-key rate limiting | Sliding-window log, configurable requests/minute per key (0 = unlimited). |
| Usage analytics | Per-key request/char counters, last-used, and a recent-activity feed. |
| Translation playground | Test translations from the browser (/admin/playground) — talks to the engine directly. |
| Prometheus metrics | /metrics (admin-auth) with total + per-key counters and engine reachability. |
| MokoOnyx UI | Bootstrap 5 + Font Awesome 7, vendored locally, with the MokoOnyx light/dark theme switcher. |
Guides
- Installation — deploy the stack on the beelink
- Configuration — the
MT_*environment variables - API Keys — issuing and managing keys
- Client Usage — calling the translation API
Reference
- Architecture — gateway + engine topology, storage, rate limiting
- Endpoints — HTTP API reference
- Deployment — restricted per-repo deploy pattern + CI
- Metrics — the Prometheus metrics catalog
Related Wikis
| Repo | Purpose |
|---|---|
| MokoOnyx | Bootstrap/FA theme structure used by the admin GUI |
| mokocli | CLI/CI deploy trigger + standards |
mokocli -- central standards hub for all Moko Consulting projects.
Repo: MokoTranslate · MokoStandards
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-07-21 | Moko Consulting | Initial version |