Developers

Code architecture

Responsibilities of the Python modules, API and React frontend.

tradoc/
├── api/
│   ├── app.py
│   └── routes.py
├── core/
│   ├── checkpoint.py
│   ├── chunker.py
│   ├── cleaner.py
│   ├── config.py
│   ├── credentials.py
│   ├── engine.py
│   ├── glossary.py
│   ├── llm_client.py
│   └── parser_*.py
├── tests/
├── web/
│   ├── src/components/
│   ├── src/demo/
│   └── src/i18n/
├── cli.py
└── main.py

Entry points

main.py exposes serve, dev and the cli group. api/app.py serves the API and, in production, the compiled SPA.

Domain logic

TranslationEngine selects the parser, prepares the project, orchestrates calls and reconstructs the file. CheckpointDatabase stores projects and segments. The LLM client normalizes provider APIs and errors.

Frontend

App.jsx owns global state. Main views are Dashboard, JobsInspector, TestSandboxModal, GlossaryWorkspace, SetupWizard and Settings. api.js selects either the real or demo adapter.

Demo

Vite's demo mode replaces the API with web/src/demo/api.js. Never add a bypass that could let this build contact the real backend.