Skip to content

Transearly/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ Transearly - AI-Powered Translation Platform

Transearly Banner NestJS React Native Google Cloud

Real-time multilingual translation platform powered by AI and Computer Vision

Features โ€ข Architecture โ€ข Quick Start โ€ข Tech Stack โ€ข Team


๐Ÿ“– About

Transearly is an innovative AI-powered translation platform that combines advanced computer vision with natural language processing to provide seamless, real-time translation services. The platform supports multiple translation modes including text, voice, image, and document translation.

๐ŸŽฏ Key Highlights

  • ๐Ÿ“ธ Image Translation with OCR - Detect and translate text in images using Google Cloud Vision API
  • ๐ŸŽค Voice Translation - Real-time speech-to-text translation
  • ๐Ÿ“„ Document Translation - Support for PDF, DOCX, XLSX, PPTX, CSV formats
  • ๐Ÿ’ฌ Text Translation - Fast and accurate text translation across 8+ languages
  • ๐Ÿ“ฑ Mobile-First Design - Beautiful React Native mobile application
  • โšก Real-time Processing - WebSocket integration for live translation updates
  • ๐ŸŽจ Interactive UI - Bounding box detection with tap-to-translate popups

โœจ Features

๐Ÿ–ผ๏ธ Image Translation

  • Smart OCR Detection - Uses Google Cloud Vision API for accurate text detection
  • Interactive Bounding Boxes - Tap on detected text regions to view translations
  • Multi-language Support - Automatically detects and translates text in images
  • Paragraph Grouping - Intelligently groups text into meaningful segments

๐ŸŽ™๏ธ Voice Translation

  • Real-time Recording - Record and translate voice input
  • Audio Playback - Listen to original recordings
  • Multiple Languages - Support for 8+ languages

๐Ÿ“ Document Translation

  • File Format Support - PDF, DOCX, XLSX, PPTX, CSV
  • Batch Processing - Queue-based translation for large documents
  • Progress Tracking - Real-time translation progress via WebSocket
  • Format Preservation - Maintains original document formatting

๐Ÿ’ฌ Text Translation

  • Instant Translation - Fast text-to-text translation
  • Context-Aware - Preserves semantic meaning
  • Copy to Clipboard - Easy result sharing

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    TRANSEARLY PLATFORM                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Mobile App         โ”‚         โ”‚   Backend API            โ”‚
โ”‚   (React Native)     โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   (NestJS)               โ”‚
โ”‚                      โ”‚   REST  โ”‚                          โ”‚
โ”‚  โ€ข Camera Screen     โ”‚   WebSocket  โ€ข Translation Service โ”‚
โ”‚  โ€ข Voice Recording   โ”‚         โ”‚   โ€ข Queue Processing     โ”‚
โ”‚  โ€ข Text Input        โ”‚         โ”‚   โ€ข Google Vision OCR    โ”‚
โ”‚  โ€ข File Upload       โ”‚         โ”‚   โ€ข AI Translation       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚                      โ”‚                  โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”
              โ”‚  Google    โ”‚      โ”‚  OpenRouter  โ”‚   โ”‚   Redis    โ”‚
              โ”‚  Cloud     โ”‚      โ”‚  (Gemini)    โ”‚   โ”‚   Queue    โ”‚
              โ”‚  Vision    โ”‚      โ”‚              โ”‚   โ”‚            โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Repository Structure

transearly/
โ”œโ”€โ”€ transearly-api/          # Backend NestJS API Server
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ modules/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ translator/  # Translation services & controllers
โ”‚   โ”‚   โ”œโ”€โ”€ main.ts
โ”‚   โ”‚   โ””โ”€โ”€ app.module.ts
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ””โ”€โ”€ mobile-app/              # React Native Mobile Application
    โ”œโ”€โ”€ src/
    โ”‚   โ”œโ”€โ”€ screens/         # App screens
    โ”‚   โ”œโ”€โ”€ components/      # Reusable components
    โ”‚   โ”œโ”€โ”€ services/        # API integration
    โ”‚   โ””โ”€โ”€ navigation/      # Navigation setup
    โ””โ”€โ”€ package.json

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Expo CLI (for mobile app)
  • Google Cloud Vision API credentials
  • OpenRouter API key

1๏ธโƒฃ Clone the Repository

git clone https://github.com/your-org/transearly.git
cd transearly

2๏ธโƒฃ Setup Backend API

cd transearly-api
npm install

# Create .env file
cp .env.example .env

# Add your credentials to .env
GOOGLE_APPLICATION_CREDENTIALS=./google-cloud-key.json
OPENROUTER_API_KEY=your_openrouter_key
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1/chat/completions
OPENROUTER_MODEL=google/gemini-2.0-flash-exp:free

# Start the server
npm run start:dev

The API will run on http://localhost:5010

3๏ธโƒฃ Setup Mobile App

cd mobile-app
npm install

# Create .env file
cp .env.example .env

# Update API_URL in src/config/api.config.js
# For local development: http://YOUR_LOCAL_IP:5010

# Start the app
npm start
# or use tunnel mode
npm run tunnel

4๏ธโƒฃ Google Cloud Vision Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Enable Cloud Vision API
  4. Create a Service Account and download JSON key
  5. Save the key as google-cloud-key.json in transearly-api/

๐Ÿ› ๏ธ Tech Stack

Backend

  • Framework: NestJS (Node.js)
  • Queue: Bull + Redis
  • OCR: Google Cloud Vision API
  • AI Translation: OpenRouter (Gemini Flash)
  • WebSocket: Socket.io
  • Document Processing: pdf-lib, mammoth, exceljs, pptxgenjs

Mobile App

  • Framework: React Native + Expo
  • UI Components: React Native core components
  • Navigation: React Navigation
  • HTTP Client: Axios
  • Real-time: Socket.io Client
  • Media: Expo Camera, Expo Audio

External Services

  • Google Cloud Vision API - Text detection and OCR
  • OpenRouter - AI translation (Gemini Flash model)
  • Redis - Queue management

๐Ÿ“ฑ Supported Languages

๐Ÿ‡ป๐Ÿ‡ณ Vietnamese | ๐Ÿ‡ฌ๐Ÿ‡ง English | ๐Ÿ‡ช๐Ÿ‡ธ Spanish | ๐Ÿ‡ซ๐Ÿ‡ท French ๐Ÿ‡ฉ๐Ÿ‡ช German | ๐Ÿ‡ฏ๐Ÿ‡ต Japanese | ๐Ÿ‡ฐ๐Ÿ‡ท Korean | ๐Ÿ‡จ๐Ÿ‡ณ Chinese


๐Ÿ“ธ Screenshots

Image Translation

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  [<]  Image Translation    [๐Ÿ‡ป๐Ÿ‡ณ] โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                 โ”‚
โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚     โ”‚  ็ฅ้€šๅฎ็މ่ƒ้™ข...  โ”‚โ—„โ”€ Tap  โ”‚
โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ”‚                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Translation             โ”‚   โ”‚
โ”‚  โ”‚ Original: ็ฅ้€šๅฎ็މ...    โ”‚   โ”‚
โ”‚  โ”‚ Translated: Chรบc bแบกn... โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                 โ”‚
โ”‚  [๐Ÿ“ท Translate]                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ API Endpoints

Translation Endpoints

POST   /translator/text              # Translate text
POST   /translator/image             # Translate image with OCR
POST   /translator/upload            # Upload document for translation
GET    /translator/status/:jobId     # Check translation job status
GET    /translator/download/:fileName # Download translated document

Response Format (Image Translation)

{
  "success": true,
  "targetLanguage": "Vietnamese",
  "segments": [
    {
      "position": {
        "x": 15.5,
        "y": 20.3,
        "width": 30.2,
        "height": 5.1
      },
      "original": "็ฅ ้€š ๅฎ ็މ ่ƒ ้™ข ไน‹ ๆ—… ๅ…… ๆปก ๅฟซ ไน",
      "translated": "Chรบc chuyแบฟn ฤ‘i ฤ‘แบฟn hแปc viแป‡n Ngแปc Bแบฃo Tแปฅy ฤ‘แบงy niแปm vui"
    }
  ]
}

๐Ÿ‘ฅ Team


Trฦฐฦกng Nguyแป…n Tiแบฟn ฤแบกt
Full-stack Developer

Nguyแป…n Minh Thแบฏng
Backend Developer

Nguyแป…n Bรก Trung Nguyรชn
Mobile Developer

Nguyแป…n Hแปฏu Anh Tuแบฅn
AI/ML Engineer

๐Ÿ“‹ Project Status

โœ… Text Translation โœ… Image Translation with OCR โœ… Voice Recording & Translation โœ… Document Translation (PDF, DOCX, XLSX, PPTX, CSV) โœ… Real-time WebSocket Updates โœ… Interactive Bounding Box UI ๐Ÿšง Multi-language Audio Output ๐Ÿšง Offline Translation Mode ๐Ÿšง Translation History & Favorites


๐Ÿค Contributing

We welcome contributions! Please follow these steps:

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

๐Ÿ“„ License

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


๐Ÿ™ Acknowledgments

  • Google Cloud Vision API for powerful OCR capabilities
  • OpenRouter for AI translation services
  • NestJS for the robust backend framework
  • Expo for streamlined React Native development

๐Ÿ“ž Contact

For questions or support, please open an issue or contact the team.


Made with โค๏ธ by the Transearly Team

GitHub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors