Because goal-integration-docs uses a standardized 3-segment URL hierarchy (/backend/*, /processes/*, /manuals/*), Wiki.js Page Rules can enforce granular, role-based access control (RBAC) directly by URL path and integrate seamlessly with GOAL's existing Keycloak SSO.
Configure these Wiki.js Groups (Administration → Groups → Page Rules):
| Group | Target Paths (Starts with / Exact) |
Permissions | Intended Users |
|---|---|---|---|
| Guests | (Optional) /manuals/*, /home — or Deny All |
Read-only (or None if private) | Unauthenticated visitors |
GOAL End Users (goal-docs-users) |
/home, /getting-started*, /manuals* |
read:pages, read:assets |
Sales reps, warehouse, supervisors, back-office |
GOAL Operations (goal-docs-operations) |
/home, /getting-started*, /manuals*, /processes* |
read:pages, read:assets |
Analysts, operations leads, QA |
GOAL Developers & Integrators (goal-docs-developers) |
/home, /getting-started*, /manuals*, /processes*, /backend/api*, /backend/cli*, /backend/integrations*, /backend/developers |
read:pages, read:assets |
Frontend/Mobile devs, ERP/BEES integrators |
GOAL Sysadmins (goal-docs-sysadmins) |
/backend/sysadmin* (+ all paths above) |
read:pages, read:assets, manage:system (optional) |
DevOps, SRE, infrastructure admins |
Documentation Maintainers (goal-docs-editors) |
/* |
read:pages, write:pages, manage:assets |
Authorized technical writers & admins |
| Administrators | /* |
Full Admin | Platform administrators |
[!TIP]
Keepwrite:pagesrestricted on Git-managed paths (/backend/*,/processes/*,/manuals/*) unless bi-directional Git storage sync is enabled (see Section 3 below).
Wiki.js will authenticate users against the same Keycloak realm used by GOAL (goal-front / goal-backend) so users sign in with their existing corporate credentials.
goal-docsopenid-connectconfidentialONhttps://<docs-domain>/login/<strategy-id>/callbackhttps://<docs-domain>groups or realm_access.roles) so Keycloak includes the user's GOAL groups in the ID/UserInfo token.https://<keycloak-host>/realms/<goal-realm>goal-docs<generated-secret>OFF (provisioned via Keycloak only)goal-docs-users, goal-docs-operations, goal-docs-developers, goal-docs-sysadmins, Administrators) to the corresponding Wiki.js groups above.On every push to main, .github/workflows/deploy-main.yml runs scripts/deploy.sh prod, which executes:
docker compose ... exec -T wiki-app node - < scripts/import-docs.js
scripts/import-docs.js reads every .md file in docs/ (mounted read-only at /wiki/docs) and calls commonDisk.processPage(...) to synchronize them into PostgreSQL (wiki-db).
| Scenario | Persists After Auto-Deploy? | Why? |
|---|---|---|
Editing a Git-managed page in the Wiki.js UI (e.g., /backend/api/sales or /manuals/kanban/tableros-trabajo) |
No — Overwritten | import-docs.js re-imports all .md files from docs/ on main during every deploy, overwriting UI-only edits in PostgreSQL. |
Creating a brand-new page ONLY in the Wiki.js UI (no matching .md in docs/) |
Yes | import-docs.js only upserts files found in /wiki/docs; it does not delete UI-only pages. |
Committing changes to docs/ in Git (PR → main) |
Yes (Source of Truth) | Git main is automatically deployed and rendered into Wiki.js on every merge. |
docs/ in Git as the single source of truth.write:pages disabled for regular users in Wiki.js Page Rules so no one loses work on deploy../scripts/check-docs.sh) → auto-deploy to main.wiki-content branch, and either remove import-docs.js from deploy.sh or merge wiki-content into main before deploying.