Some checks are pending
CI / Lint bridge (Biome) (push) Waiting to run
CI / Type-check bridge (push) Blocked by required conditions
CI / Tests unit bridge (push) Blocked by required conditions
CI / Tests integration bridge (push) Blocked by required conditions
CI / Security scan (push) Waiting to run
CI / Docker build + healthcheck (push) Blocked by required conditions
- docmost/setup/seed.py : Python script reverse-engineered depuis docmost/docmost github source. Endpoints utilises : * POST /api/auth/setup (bootstrap workspace+admin) * POST /api/auth/login (session cookie) * POST /api/spaces/create * POST /api/pages/create * POST /api/shares/create - docmost/setup/requirements.txt : requests + PyYAML - Makefile : target seed-docmost - README updated : explique option A (manuel) vs option B (seed automatise) Endpoints non-officiels mais utilisables sur Community Edition AGPL. Risque : maintenance possible si Docmost upgrade modifie les internals. Aligne avec strategie bridge Phase 2 (doc 19).
153 lines
5.2 KiB
Markdown
153 lines
5.2 KiB
Markdown
# Docmost setup — Iteration 3 BUILD
|
|
|
|
Configuration manuelle de Docmost (10 min). Couvre stories S-01 (workspace + spaces), S-07 (share link), S-08 (space etudiant pattern).
|
|
|
|
> **API publique vs internals** : l'API REST **officielle** Docmost (documentee, stable, supportee) est Enterprise payante ([docs](https://docmost.com/docs/user-guide/api)). Mais les **endpoints internes** que la SPA React utilise sont accessibles dans la Community Edition AGPL.
|
|
>
|
|
> **Deux options** :
|
|
> - **A. Setup manuel UI** (cf sections 1-5 de ce README) — recommande pour first-time / one-shot
|
|
> - **B. Seed automatise** via endpoints internes — `make seed-docmost` (cf `seed.py`)
|
|
>
|
|
> L'option B est utile pour l'idempotence (re-run apres bump Docmost) et pour l'integration future avec le bridge Phase 2 (cf doc 19).
|
|
|
|
## 1. Creer le compte admin (premier boot — 1 min)
|
|
|
|
1. Ouvrir **http://localhost:3000**
|
|
2. Page d'accueil → "Create your account"
|
|
3. Renseigner :
|
|
- **Workspace name** : `Acadenice`
|
|
- **Your name** : `Corentin JOGUET`
|
|
- **Email** : `corentin@acadenice.fr`
|
|
- **Password** : robuste (sauve dans pass/vault)
|
|
4. Submit → tu arrives dans Docmost avec workspace `Acadenice`
|
|
|
|
## 2. Creer les 3 spaces (3 min)
|
|
|
|
> Mapping miroir des collections Outline (cf doc 02 scope etendu).
|
|
|
|
Pour chaque space :
|
|
1. Sidebar gauche → "Create space" (icon +)
|
|
2. Renseigner les champs ci-dessous
|
|
|
|
### Space 1 — CFA
|
|
|
|
| Champ | Valeur |
|
|
|-------|--------|
|
|
| Name | `CFA` |
|
|
| Description | `Centre de Formation des Apprentis — formations, blocs, modules, supports pedagogiques` |
|
|
| Icon | (au choix, ex: `school`) |
|
|
| Visibility | `Open to workspace members` (default) |
|
|
|
|
### Space 2 — Agence
|
|
|
|
| Champ | Valeur |
|
|
|-------|--------|
|
|
| Name | `Agence` |
|
|
| Description | `Agence de developpement — projets clients, livraisons, doc technique` |
|
|
| Icon | (au choix, ex: `code`) |
|
|
| Visibility | `Open to workspace members` |
|
|
|
|
### Space 3 — Interne
|
|
|
|
| Champ | Valeur |
|
|
|-------|--------|
|
|
| Name | `Interne` |
|
|
| Description | `Operations internes — vision, RH, communication, batiment, evenements` |
|
|
| Icon | (au choix, ex: `building`) |
|
|
| Visibility | `Open to workspace members` |
|
|
|
|
## 3. Creer une page test "Welcome" + Share link (3 min)
|
|
|
|
Pour valider stories **S-07** (share link client guest).
|
|
|
|
1. Aller dans space `CFA`
|
|
2. "New page" → titre `Welcome formation-hub`
|
|
3. Coller dans le contenu :
|
|
|
|
```markdown
|
|
# Welcome to formation-hub
|
|
|
|
## Stack
|
|
|
|
- **Docmost** : ce wiki (AGPL self-host)
|
|
- **Baserow** : DBs structurees (MIT self-host)
|
|
- **Bridge service** : a venir (Phase 2)
|
|
|
|
## Diagrammes natifs
|
|
|
|
### Mermaid
|
|
|
|
\`\`\`mermaid
|
|
flowchart LR
|
|
User -->|push| Forgejo
|
|
Forgejo -->|CI| Tests
|
|
Tests -->|deploy| Staging
|
|
\`\`\`
|
|
|
|
### Drawio
|
|
|
|
(Insere un block drawio via slash menu `/drawio`)
|
|
|
|
### Excalidraw
|
|
|
|
(Insere un block excalidraw via slash menu `/excalidraw`)
|
|
```
|
|
|
|
4. Sauver
|
|
5. Boutton "Share" en haut a droite
|
|
6. Activer "Share to web" + configurer :
|
|
- **Password** : optionnel (ex `acadenice2026`)
|
|
- **Expiration** : 7 days
|
|
7. Copier le share link
|
|
8. Test : ouvrir le link en navigation privee → page lisible sans login
|
|
|
|
## 4. Pattern "space etudiant" (2 min — story S-08)
|
|
|
|
Pour onboarder un etudiant :
|
|
|
|
1. "Create space" → `Etudiant - <Nom Prenom>` (ex: `Etudiant - Marie Dupont`)
|
|
2. Description : `Space personnel - libre usage`
|
|
3. Visibility : **Private**
|
|
4. Apres creation : Settings space → Permissions → Invite member
|
|
5. Renseigner l'email de l'etudiant + role `Editor`
|
|
6. L'etudiant recoit invite mail + acces uniquement a son space
|
|
|
|
**Automation possible Phase 2** : le bridge service pourra creer ce pattern via des appels qui mimick l'UI (en reverse-engineer des appels prives, ou en attendant que l'API publique passe en open dans une version future Community).
|
|
|
|
## 5. Tester les diagrammes natifs (1 min)
|
|
|
|
Sur la page Welcome :
|
|
- Ajoute un block **Mermaid** via `/mermaid`
|
|
- Ajoute un block **Drawio** via `/drawio` → editor s'ouvre
|
|
- Ajoute un block **Excalidraw** via `/excalidraw` → canvas s'ouvre
|
|
|
|
Si les 3 fonctionnent : Phase 1 Docmost est valide.
|
|
|
|
## Configuration recommandee additionnelle
|
|
|
|
### Workspace settings
|
|
|
|
- Settings → Workspace → **Allow member workspace creation** : OFF (admin only)
|
|
- Settings → Security → **Two-factor auth** : encourager (pas obligatoire Phase 1)
|
|
|
|
### User settings (Corentin perso)
|
|
|
|
- Settings → Profile → photo + bio
|
|
- Settings → Preferences → langue francais si dispo
|
|
- Settings → API keys : skip (Enterprise)
|
|
|
|
## Checklist iteration 3 BUILD
|
|
|
|
- [ ] Compte admin Docmost cree
|
|
- [ ] Workspace `Acadenice` operationnel
|
|
- [ ] 3 spaces crees (CFA, Agence, Interne) avec descriptions + icons
|
|
- [ ] 1 page test `Welcome formation-hub` dans CFA avec Mermaid block
|
|
- [ ] Share link genere + teste en navigation privee
|
|
- [ ] Pattern space etudiant teste (1 space test fictif puis supprime)
|
|
- [ ] Diagrammes natifs Mermaid + Drawio + Excalidraw verifies fonctionnels
|
|
|
|
Une fois tous coches : **iteration 3 done**, on passe a iteration 4 (forms publics Baserow).
|
|
|
|
## Schema declaratif (pour reference future)
|
|
|
|
`docmost/setup/spaces.yaml` decrit la structure cible. Si l'API Community Docmost s'ouvre dans une version future (issue [#346](https://github.com/docmost/docmost/issues/346) suit ce sujet), ce YAML pourra etre consomme par un script seed.
|