smart_ide/docs/services.md
Nicolas Cantu 68cb5737c5 feat(sso-gateway): add OIDC JWT gateway and proxy to micro-services
- New service smart-ide-sso-gateway (port 37148): JWKS verify, /health,
  /v1/token/verify, /v1/upstreams, /proxy/<key>/...
- CORS on JSON responses when SSO_CORS_ORIGIN is set; optional empty
  bearer for langextract upstream
- Docs: feature, API, repo index; wire sso-docv-enso and services scope
- Extend config/services.local.env.example with OIDC and gateway vars
2026-04-03 22:42:44 +02:00

59 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Services sur lhôte (socle technique)
**Vue fonctionnelle détaillée** (périmètre de chaque service, usage **IDE** vs **backends applicatifs** des projets) : **[services-functional-scope.md](./services-functional-scope.md)**.
Ce document décrit les **services logiciels** typiques sur l**hôte** (serveur distant **ou** machine IA unique — voir [deployment-target.md](./deployment-target.md) et [platform-target.md](./platform-target.md)), en complément de [system-architecture.md](./system-architecture.md). **Ollama** et **AnythingLLM** peuvent cohabiter sur le même hôte que les micro-services ; l**orchestrateur** HTTP ([features/orchestrator-api.md](./features/orchestrator-api.md)) et **`ia-dev-gateway`** ([features/ia-dev-service.md](./features/ia-dev-service.md)) sont spécifiés pour unifier les appels depuis Lapce ou le front.
## Ollama
- **Rôle** : inférence LLM locale.
- **Accès** : URL/port configurés sur lhôte (souvent `127.0.0.1:11434` côté serveur) ; depuis le client, tunnel SSH si besoin.
## AnythingLLM
- **Rôle** : RAG, mémoire documentaire, **un workspace par projet**.
- **Déploiement** : souvent Docker sur le même hôte que les dépôts ; chemins de persistance sur lhôte.
- Détail : [anythingllm-workspaces.md](./anythingllm-workspaces.md).
## ONLYOFFICE
- **Rôle** : bureautique métier (documents, feuilles, présentations), édition riche.
- Utilisé dans la couche **doc-services** de larchitecture ; ne pas confondre avec Local Office.
## Local Office (`services/local-office/`)
- **Rôle** : **API REST** pour applications tierces ou agents : upload de fichiers Office, métadonnées, téléchargement, **commandes programmatiques** sur les **docx** (`replaceText`, `insertParagraph`). Stockage fichiers + SQLite ; isolation par clé `X-API-Key` ; rate limiting.
- **Emplacement dans le monorepo** : [`../services/local-office/`](../services/local-office/).
- **Documentation** : [features/local-office.md](./features/local-office.md) et [repo/service-local-office.md](./repo/service-local-office.md).
- **Sécurité** : définir `API_KEYS` via variables denvironnement ou fichiers hors dépôt (voir `.env.example` dans `services/local-office/`). En production, préférer **bind `127.0.0.1`** derrière un reverse proxy TLS plutôt que `0.0.0.0` exposé.
- **Périmètre fonctionnel** : édition par commandes **docx** ; xlsx/pptx peuvent être stockés mais les commandes dédition peuvent renvoyer **400** selon limplémentation actuelle.
## docv (hors monorepo, contrat sous `services/docv/`)
- **Rôle** : gestion documentaire métier pour les projets Enso ; processus HTTP dans le **dépôt docv**, pas dans smart_ide.
- **Données** : convention **`${PROJECTS_CLONE_ROOT}/<projet>/data/`** (souvent **`../projects/<projet>/data`** relatif à smart_ide) ; variable **`DOCV_PROJECTS_ROOT`** côté docv.
- **Documentation** : [features/docv-service-integration.md](./features/docv-service-integration.md), [repo/docv-services-directory.md](./repo/docv-services-directory.md), [API/docv.md](./API/docv.md).
## Micro-services HTTP sous `services/`
Services dappoint sur **`127.0.0.1`** (souvent auth **Bearer**) : Git devtools, **anythingllm-devtools** (AnythingLLM + RAG initial), LangExtract, recherche regex, proxy claw, **`ia-dev-gateway`** (agents / runs stub), **`smart-ide-orchestrator`** (routage intentions) — voir tableau dans [system-architecture.md](./system-architecture.md), la **référence API** dans [`API/README.md`](./API/README.md), et lindex dexploitation [repo/README.md](./repo/README.md) (fichiers `repo/service-*.md`). **Carbonyl** (`services/carbonyl/`) nest pas un listener HTTP : navigateur terminal pour prévisualiser des URLs (ex. déploiement test) — [repo/service-carbonyl.md](./repo/service-carbonyl.md).
**PageIndex** (`services/pageindex/`) nest pas un listener HTTP : outil Python (sous-module [VectifyAI/PageIndex](https://github.com/VectifyAI/PageIndex)) pour produire un **index arborescent** sémantique sur PDF / Markdown, en complément du RAG **AnythingLLM** — [repo/service-pageindex.md](./repo/service-pageindex.md).
**Chandra OCR** (`services/chandra/`) nest pas un listener HTTP : CLI (sous-module [datalab-to/chandra](https://github.com/datalab-to/chandra)) pour **OCR** PDF / images vers Markdown, HTML, JSON avec layout — [repo/service-chandra.md](./repo/service-chandra.md). L**IDE** peut piloter Chandra via **`services/smart-ide-tools-bridge/`** — [repo/service-smart-ide-tools-bridge.md](./repo/service-smart-ide-tools-bridge.md).
**smart-ide-tools-bridge** (`services/smart-ide-tools-bridge/`) : **API** locale (registre + Carbonyl / PageIndex / Chandra) — [API/smart-ide-tools-bridge-api.md](../API/smart-ide-tools-bridge-api.md).
**smart-ide-sso-gateway** (`services/smart-ide-sso-gateway/`) : validation **JWT** docv / Enso et **proxy** vers les autres micro-services avec jetons techniques — [features/sso-gateway-service.md](./features/sso-gateway-service.md), [API/sso-gateway-api.md](./API/sso-gateway-api.md).
**Configuration locale** : [config/services.local.env.example](../config/services.local.env.example).
## Documentation liée
- [platform-target.md](./platform-target.md)
- [features/local-office.md](./features/local-office.md)
- [system-architecture.md](./system-architecture.md)
- [anythingllm-workspaces.md](./anythingllm-workspaces.md)
- [API/README.md](./API/README.md)
- [features/docv-service-integration.md](./features/docv-service-integration.md)