Initial commit with GitLab CI/CD pipeline

This commit is contained in:
Emmanuel
2026-01-06 22:17:37 +01:00
commit b5a5b973f7
12 changed files with 779 additions and 0 deletions

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
# DeepLite BFF Server
Backend-for-Frontend proxy server for the DeepLite PWA.
## Configuration
Create a `.env` file:
```env
DEEPL_AUTH_KEY=your-deepl-api-key
BEARER_TOKEN=your-secure-token
PORT=8000
```
## API Endpoints
### POST /translate
Translates text using the DeepL API.
```bash
curl -X POST http://localhost:8000/translate \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text": "Hello world!", "target_lang": "FR"}'
```
**Parameters:**
- `text` (required): Text to translate
- `target_lang` (required): Target language code (e.g., "FR", "DE", "ES")
- `source_lang` (optional): Source language code (auto-detected if not provided)
### GET /languages
Retrieves the list of supported languages.
```bash
curl http://localhost:8000/languages \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
```
### GET /health
Health check endpoint (no authentication required).
```bash
curl http://localhost:8000/health
```