A professional AI-powered Computer-Assisted Translation (CAT) tool built with FastAPI and React. Logion 2 combines Translation Memory, Glossary Management, and RAG-based context retrieval with LLM-powered translation workflows.
- Multi-file project management — DOCX, XLIFF, TMX, RTF, PDF support
- AI Translation Workflows — Pre-analysis, batch translation, sequential translation, optimization
- Translation Memory (TM) — Automatic TM with semantic search via Voyage AI embeddings
- Glossary Management — Manual and AI-extracted glossaries with auto-enforcement
- RAG Context — Legal, background, and reference documents enrich translations
- Track Changes — DOCX revision tracking preserved through translation
- Inline Editing — Tiptap-based rich text editor with XML tag preservation
- Backup System — Automatic project backups with configurable intervals
| Dependency | Version | Notes |
|---|---|---|
| Python | 3.13+ | Backend runtime |
| Node.js | 18+ | Frontend build (22+ recommended) |
| PostgreSQL | 15+ | Primary database |
| pip | latest | Python package manager |
macOS (using Homebrew):
brew install python@3.13 node postgresql@15
brew services start postgresql@15Windows:
- Python: Download from python.org. During installation, check "Add Python to PATH".
- Node.js: Download LTS from nodejs.org.
- PostgreSQL: Download from postgresql.org. The installer includes pgAdmin. Remember the password you set for the
postgresuser.
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install python3.13 python3.13-venv nodejs npm postgresql postgresql-contrib
sudo systemctl start postgresqlCreate the database. Logion 2 will auto-create all tables on first startup.
macOS / Linux:
createdb logion2Windows (in pgAdmin or psql):
CREATE DATABASE logion2;If your PostgreSQL uses a different user/password than the defaults (postgres/postgres), note them for the .env file below.
macOS / Linux:
cd backend
python3 -m venv venv
source venv/bin/activateWindows (Command Prompt):
cd backend
python -m venv venv
venv\Scripts\activateWindows (PowerShell):
cd backend
python -m venv venv
.\venv\Scripts\Activate.ps1pip install -r requirements.txtThis installs FastAPI, SQLAlchemy, LangChain, Voyage AI, Google Generative AI, spaCy, sentence-transformers, and all other dependencies. The installation may take a few minutes due to PyTorch and transformer models.
Copy the example file and fill in your values:
# From the project root (not backend/)
cp .env.example .envEdit .env with your settings:
# --- Database (PostgreSQL) ---
DB_HOST=localhost
DB_PORT=5432
DB_NAME=logion2
DB_USER=postgres
DB_PASS=postgres
# --- File Storage ---
# Local filesystem path for project files (source docs, TM, references).
# Default: ./projectdata (relative to backend/ directory)
# STORAGE_ROOT=./projectdata
# --- AI API Keys ---
# Google Gemini (translation, optimization, chat)
# Get yours at: https://aistudio.google.com/apikey
GOOGLE_API_KEY=your-google-api-key-here
# Anthropic Claude (translation, chat — optional, needed for Claude models)
# Get yours at: https://console.anthropic.com/
ANTHROPIC_API_KEY=your-anthropic-api-key-here
# Voyage AI (semantic embeddings & reranking — required for RAG)
# Get yours at: https://www.voyageai.com/
VOYAGE_API_KEY=your-voyage-api-key-here
VOYAGE_MODEL=voyage-3-largeRequired keys:
GOOGLE_API_KEY— needed for Gemini models (default translation engine)VOYAGE_API_KEY— needed for semantic search (TM, glossary, context retrieval)
Optional keys:
ANTHROPIC_API_KEY— only needed if you want to use Claude models for translation/chat
The available AI models are defined in backend/ai_models.json. The default configuration includes:
| Model | Provider | Purpose |
|---|---|---|
| Gemini 3.1 Pro Preview | Translation (default) | |
| Gemini 3 Pro Preview | Translation | |
| Gemini 3 Flash Preview | Translation (fast) | |
| Gemini 2.5 Pro | Translation (stable) | |
| Gemini 2.5 Flash | Translation (fast) | |
| Claude Opus 4.6 | Anthropic | Translation (premium) |
| Claude Sonnet 4.6 | Anthropic | Translation |
| Voyage 3 Large | Voyage | Embeddings |
| Rerank 2.5 | Voyage | Reranking |
To add or remove models, edit backend/ai_models.json:
{
"models": [
{
"id": "gemini-2.5-flash",
"name": "Gemini 2.5 Flash",
"provider": "google",
"usage": "mt",
"context_window": 1000000,
"input_cost_per_m": 0.3,
"output_cost_per_m": 2.5
}
]
}Fields:
id— API model identifier (must match the provider's model ID)name— Display name in the UIprovider—"google","anthropic", or"voyage"usage—"mt"(machine translation / chat) or"bg"(background / embeddings)context_window— Max tokensinput_cost_per_m/output_cost_per_m— Cost per million tokens (for usage tracking)
The first model in the list is used as the default if no model is selected in project settings.
cd backend
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
uvicorn app.main:app --reload --port 8000The API will be available at http://127.0.0.1:8000. Tables are created automatically on first startup.
cd frontend
npm installnpm run devThe UI will be available at http://localhost:5173.
You need two terminal windows running simultaneously:
Terminal 1 — Backend:
cd backend
source venv/bin/activate # macOS/Linux (or venv\Scripts\activate on Windows)
uvicorn app.main:app --reload --port 8000Terminal 2 — Frontend:
cd frontend
npm run devThen open http://localhost:5173 in your browser.
logion2/
├── .env # Environment variables (not in git)
├── .env.example # Template for .env
├── backend/
│ ├── ai_models.json # AI model definitions
│ ├── requirements.txt # Python dependencies (pip-compiled)
│ ├── requirements.in # Top-level Python dependencies
│ ├── app/
│ │ ├── main.py # FastAPI app, CORS, startup events
│ │ ├── config.py # AI model config loader
│ │ ├── database.py # PostgreSQL connection (SQLAlchemy)
│ │ ├── storage.py # Local file storage
│ │ ├── models.py # SQLAlchemy models
│ │ ├── routers/ # API endpoints
│ │ │ ├── project.py # Project CRUD, workflows
│ │ │ ├── segment.py # Segment updates, propagation
│ │ │ ├── translate.py # AI draft generation
│ │ │ ├── glossary.py # Glossary CRUD
│ │ │ ├── chat.py # Segment AI chat
│ │ │ └── settings.py # Global app settings, backups
│ │ ├── services/ # Business logic
│ │ ├── workflows/ # Background workflows (translate, optimize, reingest)
│ │ ├── rag/ # RAG pipeline (embeddings, retrieval, assembly)
│ │ └── parsers/ # Document parsers (DOCX, XLIFF, TMX, etc.)
│ └── projectdata/ # File storage (created at runtime)
├── frontend/
│ ├── package.json
│ ├── src/
│ │ ├── App.jsx # Root component, routing
│ │ ├── api/client.js # API client functions
│ │ ├── components/ # React components
│ │ │ ├── SplitView.jsx # Main translation editor
│ │ │ ├── TiptapEditor.jsx # Rich text editor with tag support
│ │ │ ├── ProjectList.jsx # Project dashboard
│ │ │ └── settings/ # Settings tabs (AI, RAG, Glossary, Workflows)
│ │ ├── hooks/ # Custom React hooks
│ │ └── utils/ # Utilities (tag transforms, etc.)
│ └── public/
└── backups/ # Auto-backup directory (configurable)
- macOS:
brew services start postgresql@15 - Linux:
sudo systemctl start postgresql - Windows: Check that the PostgreSQL service is running in Services (
services.msc)
Make sure you have Xcode Command Line Tools:
xcode-select --install# Find and kill the process
lsof -i :8000 # macOS/Linux
# or
netstat -ano | findstr :8000 # WindowsThe backend allows requests from localhost:5173, 5174, 5175, and 3000. If your frontend runs on a different port, add it to the allow_origins list in backend/app/main.py.
- Check that your API keys are set correctly in
.env - Verify the keys work by checking the provider's console (Google AI Studio, Anthropic Console, Voyage dashboard)
- Check the backend terminal for error messages