| Feature | Description | |
|---|---|---|
| π | Multi-Model Conversion | Run the same conversion task across multiple AI models simultaneously |
| π | Automatic Benchmark Scoring | Evaluate outputs using syntax validation, structural fidelity, and token efficiency |
| π | Leaderboard Rankings | See which AI models perform best across historical conversions |
| π§ | Language-Pair Benchmarking | Discover the best model for specific migrations like Python β Rust |
| π§© | Workspace Dashboard | Modern developer interface with model comparison and benchmark insights |
| π | Privacy-First Architecture | All conversions run directly from your browser to the AI provider β no backend |
| Python | JavaScript | TypeScript | Java | Go |
| Rust | C | C++ | C# | Ruby |
| PHP | Swift | Kotlin | Scala | Dart |
| R | Perl | Shell Script | Julia | MATLAB |
| Fortran | COBOL | Lisp |
CodexConvert works with any OpenAI-compatible API:
| Provider | Default Base URL |
|---|---|
| OpenAI | https://api.openai.com/v1 |
| DeepSeek | https://api.deepseek.com/v1 |
| Mistral | https://api.mistral.ai/v1 |
| Groq | https://api.groq.com/openai/v1 |
| Ollama (local) | http://localhost:11434/v1 |
| OpenRouter | https://openrouter.ai/api/v1 |
| Together AI | https://api.together.xyz/v1 |
| Custom | Any endpoint you trust |
ββββββββββββββββββββββββ
β π Upload Files β
β (browser memory) β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β π Model Execution β Parallel dispatch
β Manager β (max 3 concurrent)
ββββββββββββ¬ββββββββββββ
β
βββββββββββββΌββββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ
β Model A β β Model B β β Model C β
β (fetch) β β (fetch) β β (fetch) β
ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ
β β β
βββββββββββββΌββββββββββββ
βΌ
ββββββββββββββββββββββββ
β π Benchmark Engine β Syntax, structure,
β + Scoring β token efficiency
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β πΎ Benchmark Datasetβ localStorage
β (max 200 runs) β persistence
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β π Leaderboard β Rankings, filtering,
β System β top models
ββββββββββββββββββββββββ
| Layer | Responsibility |
|---|---|
| Model Execution Manager | Dispatches conversions in parallel with concurrency control and failure isolation |
| Benchmark Engine | Runs syntax check, structural fidelity, and token efficiency metrics on each output |
| Scoring | Combines metrics into a weighted 0β10 score per model |
| Benchmark Dataset | Persists runs to localStorage for historical analysis |
| Leaderboard System | Aggregates scores into global and language-pair rankings |
For the full architecture breakdown, see π Architecture.
Every conversion is automatically evaluated using three metrics:
| Metric | Weight | What It Measures |
|---|---|---|
| β Syntax Validity | 40% | Balanced brackets and delimiters |
| ποΈ Structural Fidelity | 40% | Preservation of file count, paths, functions, classes, and imports |
| β‘ Token Efficiency | 20% | Output conciseness relative to other models |
Scoring formula:
finalScore = syntaxScore Γ 0.4 + structuralScore Γ 0.4 + tokenScore Γ 0.2
Scores are normalized to a 0β10 scale. Full methodology: π Benchmarking.
CodexConvert was built with a privacy-first architecture and has undergone a comprehensive security audit:
| Protection | |
|---|---|
| π | API keys stored in sessionStorage only β cleared when the tab closes |
| π« | No backend server β zero server-side data collection |
| π‘ | Direct browser β AI provider communication |
| π‘οΈ | Path sanitization prevents ZIP traversal attacks from LLM responses |
| π¦ | No user code stored in benchmark dataset β only scores and metadata |
| π | TypeScript strict mode enabled across the entire codebase |
| π§± | Content Security Policy restricts script sources and connections |
| π | HTTPS enforced for all remote provider URLs |
Full details: π Security.
.
βββ App.tsx # Main app β state, conversion orchestration
βββ index.tsx # React entry point
βββ constants.ts # Languages, provider presets, model lists
βββ types.ts # Shared TypeScript interfaces
β
βββ core/
β βββ modelExecutionManager.ts # Parallel model execution (max 3)
β βββ benchmark/
β β βββ benchmarkEngine.ts # Runs metrics, produces results
β β βββ scoring.ts # Weighted scoring formula
β β βββ benchmarkDataset.ts # localStorage persistence (max 200 runs)
β β βββ rankingEngine.ts # Historical aggregation β rankings
β β βββ types.ts # Benchmark & leaderboard types
β β βββ metrics/
β β βββ syntaxCheck.ts # Balanced bracket validation
β β βββ structuralFidelity.ts # File/path/element comparison
β β βββ tokenUsage.ts # Token count estimation
β βββ leaderboard/
β βββ leaderboardEngine.ts # Global + language-pair queries
β
βββ services/
β βββ llmService.ts # OpenAI-compatible API client + path sanitization
β
βββ utils/
β βββ pathSanitizer.ts # ZIP path traversal prevention + display truncation
β
βββ context/
β βββ ProviderContext.tsx # LLM provider config (sessionStorage)
β βββ ToastContext.tsx # Notification system
β
βββ components/
β βββ layout/ # AppLayout, Sidebar, TopBar
β βββ converter/ # ConversionWorkspace (3-panel)
β βββ benchmark/ # ScorePanel (metrics breakdown)
β βββ leaderboard/ # LeaderboardView, tables, widgets
β βββ ProviderPicker.tsx # Provider/model configuration UI
β βββ ModelSelector.tsx # Multi-model checkbox selector
β βββ ComparisonPanel.tsx # Side-by-side model output cards
β βββ CodeDisplay.tsx # Original β converted viewer
β βββ FileTree.tsx # Collapsible file tree
β βββ PrivacyBadge.tsx # π Privacy mode indicator
β βββ Loader.tsx # Loading overlay
β
βββ docs/
βββ ARCHITECTURE.md # System architecture
βββ BENCHMARKING.md # Evaluation methodology
βββ SECURITY.md # Security model & privacy
| Phase | Feature | Status |
|---|---|---|
| Phase 1 | LLM Abstraction Layer | β Complete |
| Phase 2 | Multi-Model Conversion | β Complete |
| Phase 3 | Benchmark & Scoring Engine | β Complete |
| Phase 4 | Open Benchmark Leaderboard | β Complete |
| Phase 5 | Workspace UI Redesign | β Complete |
| Phase 6 | Security Hardening & Documentation | β Complete |
| Phase 7 | Community benchmark submissions & public leaderboard | π Planned |
| Phase 8 | Advanced metrics (AST comparison, runtime validation) | π Planned |
- Node.js >= 18
- An API key from any supported LLM provider
git clone https://github.com/aryanjsx/code-converter.git
cd code-converter
npm install
npm run devOpen the printed local URL (typically http://localhost:3000) in your browser.
- Select a provider from the dropdown (OpenAI, DeepSeek, Groq, etc.)
- Enter your API key
- Choose one or more models
- Upload a project folder or files
- Click Convert (or Compare N Models for multi-model)
No .env file is needed. All configuration happens in the browser at runtime.
| Layer | Technology |
|---|---|
| Framework | React 19 |
| Bundler | Vite 6 |
| Language | TypeScript 5.8 (strict mode) |
| AI Integration | Any OpenAI-compatible API |
| ZIP Export | JSZip + FileSaver |
| Styling | Tailwind CSS |
| Document | Description |
|---|---|
| π Architecture | System design and subsystem breakdown |
| π Benchmarking | Evaluation metrics and scoring methodology |
| π Security | Privacy model, audit results, and security practices |
| π€ Contributing | Development setup and contribution guide |
Contributions are welcome! Whether it's a new benchmark metric, a provider preset, a UI improvement, or a bug fix β check out our Contributing Guide for development setup, code structure, and pull request guidelines.
This project is licensed under the MIT License.
