This project uses Node.js for the backend, React for the frontend, and GeminiAPI to translate from english to morrocan arabic (Darija)
# English to Moroccan Arabic Translator
A full-stack web application that translates English text to Moroccan Arabic (Darija) using AI models. The application features a clean, Google Translate-like interface with translation history, voice features, and OCR capabilities. Available as both a web application and Chrome extension.
## Features
- Real-time Translation: Translate English text to Moroccan Arabic instantly
- Multiple AI Models: Configure between Google Gemini and local LLMs (like Llama 3.2)
- Google Translate-like Interface: Two-column design with input and output panels
- Translation History: Sidebar that stores recent translations
- Quick Examples: Pre-defined common phrases for quick testing
- Voice Features: Speech-to-text input and text-to-speech output
- OCR Capability: Extract text from images (upload, drag & drop, or clipboard paste)
- Chrome Extension: Side panel extension for browser-based translation
- Responsive Design: Works on desktop, tablet, and mobile devices
- Copy to Clipboard: One-click copy of translated text
- User Authentication: Secure Basic Authentication for API access
## Architecture
The application consists of three main components:
### Backend (Node.js + Express)
- REST API with Express.js
- Modular AI Integration: Supports both Google Gemini and local LLMs (Ollama)
- Basic Authentication: Secure API endpoints
- Environment-based configuration using `.env` files
- CORS enabled for cross-origin requests
- Test endpoint for API connectivity checks
### Frontend (React)
- Modern React with Hooks
- Fetch API for HTTP requests with authentication
- Component-based architecture
- Responsive CSS with custom styling
- Local state management
- Web Speech API integration for voice features
- Tesseract.js integration for OCR functionality
### Chrome Extension (Manifest V3)
- Side Panel Interface: Translates alongside web content
- Manifest V3 compliance: Modern Chrome extension architecture
- Background Service Worker: Extension li …