MobileByteLabs Translator is an intelligent translation service platform that provides advanced translation capabilities through a modern web interface. The application leverages AI-powered translation services and GitHub integration to help developers and teams manage multilingual content efficiently.
- AI-Powered Translation: Integrated with Google Gemini AI for high-quality translations
- GitHub Integration: Seamless OAuth authentication, repository management and automated PR generation.
- Repository Scanning: Automated analysis of codebases for translation opportunities
Frontend:
- React with TypeScript
- React Router for navigation
- Axios for API communication
Backend:
- Node.js with Express
- GitHub OAuth integration
- Google Gemini AI integration (Extends in future).
Follow these instructions to set up the project locally for development.
- Node.js (v16 or higher)
- npm or yarn package manager
- Git
- GitHub account (for OAuth integration)
- Google Gemini AI API key
-
Clone the repository
git clone https://github.com/your-username/mobilebytelabs-translator.git cd mobilebytelabs-translator -
Run the setup script
chmod +x setup.sh ./setup.sh
-
Configure GitHub OAuth (Required)
Update the following variables in
backend/.env:# GitHub OAuth (Get from https://github.com/settings/applications/new) GITHUB_CLIENT_ID=your_github_client_id_here GITHUB_CLIENT_SECRET=your_github_client_secret_here
If you prefer to set up manually:
-
Backend Setup
cd backend npm install cp .env.example .env -
Frontend Setup
cd frontend npm install cp .env.example .env
-
Start the Backend Server
cd backend npm run devThe backend will start on
http://localhost:3001 -
Start the Frontend Development Server
cd frontend npm startThe frontend will start on
http://localhost:3000 -
Access the Application
- Open your browser and navigate to
http://localhost:3000 - The application should load
- Use GitHub OAuth to authenticate and access repository features
- Open your browser and navigate to
Backend:
cd backend
npm run build
npm startFrontend:
cd frontend
npm run buildThe build files will be generated in the frontend/build directory.
The backend provides the following main API endpoints:
GET /health- Health check endpointGET /api/test- API test endpointPOST /api/auth/github- GitHub OAuth authenticationGET /api/repositories- List user repositoriesPOST /api/scan/:owner/:repo- Scan repository for translationsPOST /api/translate- Translation services
Backend Required Variables:
GITHUB_CLIENT_ID- GitHub OAuth application client IDGITHUB_CLIENT_SECRET- GitHub OAuth application secretJWT_SECRET- Secret for JWT token generation
Optional Variables:
PORT- Server port (default: 3001)NODE_ENV- Environment mode (development/production)CORS_ORIGIN- Frontend URL for CORS (default: http://localhost:3000)
Common Issues:
-
GitHub OAuth not working:
- Ensure your GitHub OAuth app is configured correctly
- Check that the callback URL matches your settings
- Verify
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETare correct
-
Translation features not working:
- Verify your
GEMINI_API_KEYis valid and has sufficient quota - Check the backend logs for API errors
- Verify your
-
CORS errors:
- Ensure
CORS_ORIGINin backend.envmatches your frontend URL - For production, update this to your deployed frontend URL
- Ensure
-
Build errors:
- Run
npm installin both frontend and backend directories - Check that all environment variables are properly set
- Ensure Node.js version is 16 or higher
- Run
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For support and questions:
- Create an issue in the GitHub repository
- Check the troubleshooting section above
- Review the API documentation in the codebase
MobileByteLabs