somali translation services: tool project with plan to scale and serve somali communities
# Somali Translation Services (STS)
A web application that translates between English and Somali using Meta's NLLB (No Language Left Behind) model. The application provides both text translation and document translation capabilities to support the Somali community in Minneapolis.
## Features
- **Text Translation**: Translate sentences and paragraphs between English and Somali
- **Document Translation**: Upload PDF or DOCX files and get translated versions
- **Simple, User-Friendly Interface**: Designed to be accessible for users with varying levels of tech proficiency
## Technologies Used
- **Frontend**: React.js
- **Backend**: Node.js with Express
- **Translation**: Meta's NLLB model via Hugging Face API
- **Document Processing**: pdf-parse (for PDFs) and mammoth (for DOCX)
## Prerequisites
- Node.js (v14 or newer)
- npm or yarn
- Hugging Face API key
## Installation
1. Clone the repository:
```
git clone
cd somali-translation-services
```
2. Install server dependencies:
```
npm install
```
3. Install client dependencies:
```
cd client
npm install
cd ..
```
4. Create a `.env` file in the root directory with your Hugging Face API key:
```
HUGGINGFACE_API_KEY=your_api_key_here
PORT=3000
```
## Development Mode
Run the application in development mode:
```
npm run dev
```
This will start both the backend server and the React development server concurrently.
## Production Deployment
### Building for Production
1. Build the React application:
```
npm run build
```
2. The production-ready application can be started with:
```
npm start
```
### Deployment on Vercel
1. Install Vercel CLI:
```
npm install -g vercel
```
2. Deploy to Vercel:
```
vercel
```
3. Add your environment variables in the Vercel dashboard.
## Project Structure
```
somali-translation-services/
├── .env # Environment variables
├── .gitignore # Gitignore file
├── package.json # Node.js project configuration
├── server/ # Backend c …