CodeTrans — AI-Powered Code Translation
Java | C | C++ | Python | Rust | Go |
CodeTrans is an intelligent code translation platform that converts source code between six programming languages using large language models, with a side-by-side editor interface and built-in PDF code extraction.
Developed as an open-source blueprint under the Cloud2 Labs Innovation Hub, CodeTrans demonstrates how code-specialized language models, multi-provider LLM integration, and flexible inference configurations can be combined into a practical end-to-end developer workflow.
It showcases a production-style microservices architecture with a FastAPI backend for code validation, PDF extraction, and inference orchestration, paired with a React + Vite + Tailwind CSS frontend featuring dark mode by default, language pill selectors, and one-click copy — containerized and orchestrated via Docker Compose and Nginx.
What It Demonstrates
CodeTrans illustrates how to
- Translate source code between six languages with a single click
- Extract and translate code directly from uploaded PDF documents using pattern recognition
- Support multiple LLM providers (OpenAI-compatible APIs, Ollama, Custom Endpoints) for flexible deployment
- Switch inference configurations without changing application code
- Display side-by-side source and translated code with one-click copy
- Deploy reproducibly via Docker Compose with Nginx reverse-proxying the backend
Designed for developers, software engineers, platform architects, innovation groups, CodeTrans serves as a reference implementation for AI-driven code migration and cross-language porting workflows.
Key Capabilities

Multi-Language Code Translation
Translates between Java, C, C++, Python, Rust, and Go using code-specialized large language models.

PDF Code
Extraction
Accepts PDF uploads with drag-and-drop; automatically extracts code blocks using pattern recognition before translation.

Multi-Provider LLM
Support
Supports OpenAI-compatible APIs, Ollama, and custom inference endpoints, allowing flexible deployment across cloud, on-premises, and local environments without code changes.

Modular Backend Architecture
Clean separation of configuration, data models, and service layers makes it straightforward to extend language support, swap inference providers, or integrate into existing developer toolchains.

Validated Model
Support
Pre-validated with code-specialized models including CodeLlama and Qwen3, supporting both large production-grade models and smaller models suited for local experimentation.

Containerized Microservices Architecture
Docker Compose orchestrates transpiler-api (FastAPI) and transpiler-ui (React + Nginx) on a shared network, enabling reproducible local and enterprise deployment.

