Architecture of rockbenben/subtitle-translator
rockbenben/subtitle-translator is 149 source files holding 929 symbols across 3 modules, written mainly in TypeScript, JavaScript, Dockerfile. The largest module is src, with 115 files, and 1 file is an entry point into the dependency graph.
How subtitle-translator fits together
Subtitle files are read in the browser, where the parsers separate timecodes, cue numbers and format headers from the dialogue text. The src/app/lib/translation/registry.ts file belongs to the translation library and is one of the project's hotspot files. The src/app/lib/translation/services/llm.ts file contains the code that sends dialogue to LLM providers, with optional surrounding lines as context. The src/app/hooks/useTranslationState.tsx file is a React hook that holds translation state for the interface, and src/app/[locale]/SubtitleTranslator.tsx is the main page component. The scripts/cli.ts file is the single entry point for running the same engine from a terminal, and the Dockerfile builds a container image for the project.
Largest modules
- src: 115 files and 13,508 lines of code
- root: 5 files and 153 lines of code
- scripts: 2 files and 504 lines of code
Languages
By file count: TypeScript 118 files, JavaScript 3 files, Dockerfile 1 file.
Documentation
Repowise documents subtitle-translator in 162 pages generated from the source, 18 of them written explanations of the repository and its modules. Module guides include:
- root: Build and Lint Tooling
- scripts: CLI and Build Scripts
More on subtitle-translator: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos