How pranavreddygaddam/gittranslate works
Project Type and Purpose
• This is a full-stack web application (“GitTranslate”) that enables users to fetch code repositories, translate comments/documentation via OpenAI’s GPT-3.5 Turbo, transcribe and translate audio files using Whisper, and synthesize new audio via TTS. It also provides automation via an Orkes workflow script.
File Structure Analysis
• Top-level directories:
• backend/ – Python FastAPI service
• frontend/ – Next.js + React + TypeScript UI
• scripts/ – Python scripts for automation and Orkes workflow
• backend/app/routes, services, utils – clear separation of API endpoints, business logic, and helper modules
• frontend/src/components, api, lib – component library, API client, utility functions
• Config files: requirements.txt, package.json, .env files, Vite and Tailwind configs
• No persistent database folder – the system relies on external APIs and temp storage.
README Insights
• Frontend deploys on Vercel, backend runs on Uvicorn/FastAPI
• External dependencies: GitHub/GitLab APIs, OpenAI (GPT, Whisper), TTS engine, Orkes for workflow orchestration
• Main flows: repository fetch → translation → response to UI; audio upload → transcription → translation → synthesis.
Relationships & Data Flow
• GitHub/GitLab APIs (fetch code/comments)
• OpenAI GPT API (translate text)
• Whisper (transcribe audio)
• TTS (synthesize translated audio)
• Orkes engine (via orkes-fe-script.py)
Architectural Patterns & Design Principles
• Clear separation of concerns:
• Presentation (frontend components)
• API layer (FastAPI routes)
• Business logic (services)
• Utility modules (config, helpers)
• Modular, script-based automation for workflows
• Environment-driven configuration (.env files)
• Stateless backend relying on external services