Skip to content

harvestsure/codetrans

Repository files navigation

CodeTrans - AI-Powered Code Language Converter

License: MIT Next.js TypeScript Tailwind CSS

Transform code between 30+ programming languages using advanced AI models like DeepSeek Coder, GPT-4, Claude, and Gemini. Free, unlimited, no registration required.

🌐 Live Demo: https://codetrans.dev

✨ Features

  • 🤖 AI-Powered: Uses DeepSeek Coder, GPT-4 Turbo, Claude 3.5 Sonnet, and Gemini 2.0 Flash
  • 🔍 Auto-Detection: Automatically detects source code language
  • 🌍 30+ Languages: JavaScript, TypeScript, Python, Java, C#, C++, C, Go, Rust, PHP, Ruby, Swift, Kotlin, Scala, Dart, R, MATLAB, Perl, Lua, Shell, PowerShell, SQL, HTML, CSS, JSON, XML, YAML, Markdown, and more
  • 🆓 Free & Unlimited: No registration required, unlimited conversions
  • 🎨 Beautiful UI: Dark and light themes with responsive design
  • Fast & Accurate: Quick conversions with high accuracy
  • 📱 Mobile-Friendly: Works perfectly on desktop and mobile devices
  • 🔒 Privacy-First: No data storage, all processing happens in real-time

🚀 Supported Languages

Popular Languages

  • JavaScript ↔ TypeScript, Python, Java, C++, Go, Rust
  • Python ↔ JavaScript, Java, C++, Go, Rust, R, MATLAB
  • Java ↔ C#, Kotlin, Scala, JavaScript, Python
  • C++ ↔ C, Rust, Go, Java, Python
  • Go ↔ Rust, C++, Java, Python, JavaScript
  • Rust ↔ C++, Go, C, Java, Python

Web Technologies

  • HTML, CSS, JavaScript, TypeScript
  • JSON, XML, YAML

System Languages

  • C, C++, Rust, Go, Zig

Mobile Development

  • Swift (iOS), Kotlin (Android), Dart (Flutter)

Data Science & Analytics

  • Python, R, MATLAB, Julia

Scripting

  • Shell, PowerShell, Perl, Lua

🛠️ Getting Started

Prerequisites

  • Node.js 18+
  • At least one AI model API key

Installation

  1. Clone the repository: ```bash git clone https://github.com/harvestsure/codetrans.git cd codetrans ```

  2. Install dependencies: ```bash npm install ```

  3. Set up environment variables: ```bash cp .env.example .env.local ```

  4. Add your AI model API keys to .env.local: ```env

At least one is required

DEEPSEEK_API_KEY=your_deepseek_api_key_here OPENAI_API_KEY=your_openai_api_key_here ANTHROPIC_API_KEY=your_anthropic_api_key_here GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_api_key_here

Site configuration

NEXT_PUBLIC_SITE_URL=http://localhost:3000 ```

  1. Run the development server: ```bash npm run dev ```

  2. Open your browser and visit http://localhost:3000

🔑 API Keys Setup

DeepSeek API (Recommended)

  1. Visit DeepSeek Platform
  2. Create an account and get your API key
  3. Add DEEPSEEK_API_KEY=your_key_here to your .env.local

OpenAI API

  1. Visit OpenAI Platform
  2. Create an account and get your API key
  3. Add OPENAI_API_KEY=your_key_here to your .env.local

Anthropic API (Claude)

  1. Visit Anthropic Console
  2. Create an account and get your API key
  3. Add ANTHROPIC_API_KEY=your_key_here to your .env.local

Google AI API (Gemini)

  1. Visit Google AI Studio
  2. Create an account and get your API key
  3. Add GOOGLE_GENERATIVE_AI_API_KEY=your_key_here to your .env.local

🚀 Deployment

Vercel (Recommended)

Deploy with Vercel

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add environment variables in Vercel dashboard
  4. Deploy!

Other Platforms

The app can be deployed to any platform that supports Next.js:

🏗️ Tech Stack

📊 SEO Features

  • ✅ Comprehensive meta tags and Open Graph
  • ✅ JSON-LD structured data
  • ✅ XML sitemap generation
  • ✅ Robots.txt configuration
  • ✅ Semantic HTML structure
  • ✅ Accessibility optimizations
  • ✅ Mobile-first responsive design
  • ✅ Fast loading with optimized assets

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • DeepSeek for their excellent code-focused AI models
  • OpenAI for GPT-4 and API access
  • Anthropic for Claude AI models
  • Google for Gemini AI models
  • Vercel for the AI SDK and hosting platform

📞 Support


Made with ❤️ by the CodeTrans Team

WebsiteGitHubTwitter

About

AI-Powered Code Language Converter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published