smart_ide/docs/repo/service-local-office.md
Nicolas Cantu ac96434351 docs: centralize README content under docs/repo/
**Motivations:**
- Single canonical documentation tree under docs/; reduce drift between README copies.

**Evolutions:**
- Add docs/repo/ with operational guides (cron, systemd, projects, logs, docv, ia_dev, services, scripts, extension).
- Replace scattered README.md files with pointers to docs/repo/*.md.
- Refresh docs/README.md index and cross-links across docs/, .cursor rules/agents.
- Bump ia_dev submodule to matching doc pointer commits.
2026-04-03 18:20:31 +02:00

32 lines
1.4 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.

# Local Office (`services/local-office/`)
Service HTTP pour charger et modifier des documents Office (docx, xlsx, pptx) sur la machine locale. Intégration monorepo : code sous **`services/local-office/`** (historique fusionné depuis le dépôt **local_office**).
## Documentation métier et architecture
- Fonctionnalités smart_ide : [features/local-office.md](../features/local-office.md)
- Pile services : [services.md](../services.md)
- Proposition darchitecture (fichier dans le service) : [`services/local-office/docs/architecture-proposal.md`](../../services/local-office/docs/architecture-proposal.md)
## Exécution locale
1. Environnement Python : `python3 -m venv .venv` ; `pip install -r requirements.txt`
2. Variables : copier `.env.example``.env`, définir au minimum **`API_KEYS`**
3. Lancer : `uvicorn app.main:app --reload --host 0.0.0.0 --port 8000`
4. Swagger : `http://localhost:8000/docs`
## API (résumé)
- **POST /documents** — upload multipart, en-tête **`X-API-Key`**
- **GET /documents** — liste
- **GET /documents/{id}** — métadonnées
- **GET /documents/{id}/file** — téléchargement
- **POST /documents/{id}/commands** — commandes docx (`replaceText`, `insertParagraph`, …)
- **DELETE /documents/{id}**
Toutes les routes exigent **`X-API-Key`** ; limitation de débit par clé.
## Référence OpenAPI
Répertoire du service : `services/local-office/` (fichiers OpenAPI sil y en a).