- Updated .env.example to include new configuration options for AI gateway and WebUI secret key. - Modified Nginx configuration to support additional API routes for model management and migration. - Implemented new API endpoints for discovering organization-level LLM models and managing hosted mail services. - Enhanced AI gateway logic to support organization-specific model access and permissions. - Improved error handling and response structures in the AI and mail APIs. - Added integration tests for new features and updated existing tests for model access control.
65 lines
1.6 KiB
Markdown
65 lines
1.6 KiB
Markdown
# ulti-backend (ultid)
|
|
|
|
API monolithique Go — mail, drive, contacts, admin, UltiAI gateway, etc.
|
|
|
|
---
|
|
|
|
## Environnement local
|
|
|
|
- Config : `.env` (test local, gitignored) → `./deploy/compose-up.sh` génère `.env.resolved` pour Compose
|
|
- Entrée HTTP dev : nginx `:80` → `/api/v1/*` → `ultid`
|
|
- Frontend dev : repo `gmail-interface-clone`, proxy `ULTI_PROXY_ORIGIN=http://127.0.0.1:80`
|
|
|
|
---
|
|
|
|
## Agents — redémarrage obligatoire
|
|
|
|
**Ne jamais demander au développeur de redémarrer.** L'agent relance le service quand c'est nécessaire.
|
|
|
|
### Quand redémarrer `ultid`
|
|
|
|
- Modification code Go (`internal/`, `cmd/`, routes, handlers, services)
|
|
- Nouvelle route ou changement de comportement API
|
|
- Changement `.env` / `.env.resolved` consommé au boot
|
|
- Après implémentation feature backend à tester côté frontend
|
|
|
|
### Commandes (depuis la racine de ce repo)
|
|
|
|
```bash
|
|
# Rebuild + restart (après changement code Go)
|
|
./deploy/compose-up.sh up -d --build ultid
|
|
|
|
# Restart sans rebuild (rare)
|
|
./deploy/compose-up.sh restart ultid
|
|
|
|
# Logs
|
|
./deploy/compose-up.sh logs ultid --tail 50
|
|
```
|
|
|
|
### Vérification
|
|
|
|
```bash
|
|
curl -s http://127.0.0.1:80/api/v1/ai/config
|
|
```
|
|
|
|
### Autres services Compose
|
|
|
|
Modules optionnels (OpenWebUI, Nextcloud, …) : `./deploy/compose-up.sh up -d` relit `.env` et active les overlays.
|
|
|
|
---
|
|
|
|
## Dev hors Docker
|
|
|
|
```bash
|
|
go run ./cmd/ultid # nécessite PG, KeyDB, RustFS, Authentik déjà up
|
|
```
|
|
|
|
En pratique l'environnement dev utilise Docker pour `ultid`.
|
|
|
|
---
|
|
|
|
## Docs
|
|
|
|
- `README.md` — architecture, compose, observabilité
|
|
- `.env.example` — variables documentées
|