# growilabs/growi architecture

> Architecture diagram of the GitHub repository growilabs/growi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/growilabs/growi
- Repository: https://github.com/growilabs/growi

## Overview

GROWI is team collaboration and documentation software centered on hierarchical Markdown pages. The main user workflow is to find or open a page, view or edit it, and collaborate on edits; the README also documents search, authentication/SSO, integrations, and pluggability. The tree supports distinct page, search, editor, administration, and vault subsystems, but the excerpts do not establish most of their runtime wiring, so those links are intentionally omitted. Vault links shown are limited to calls visible in the sampled sources.

Main entry points: [`apps/growi-vault-manager/src/controllers/storage-stats-controller.ts`](https://github.com/growilabs/growi/blob/master/apps/growi-vault-manager/src/controllers/storage-stats-controller.ts) (Storage stats endpoint), [`apps/app/src/features/growi-vault/server/services/vault-manager-client.ts`](https://github.com/growilabs/growi/blob/master/apps/app/src/features/growi-vault/server/services/vault-manager-client.ts) (Vault manager client), [`apps/app/src/states/search/keyword-manager.ts`](https://github.com/growilabs/growi/blob/master/apps/app/src/states/search/keyword-manager.ts) (Search keywords), [`apps/app/src/client/components/Navbar/PageEditorModeManager.tsx`](https://github.com/growilabs/growi/blob/master/apps/app/src/client/components/Navbar/PageEditorModeManager.tsx) (Editor mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Pages and collaboration"]
  node_page["Hierarchical pages"]
  node_editor["Editor mode"]
  node_collab["Live collaboration"]
  node_attachments["Attachments"]
end

subgraph group_discovery["Search and navigation"]
  node_searchstate["Search keywords<br/>[keyword-manager.ts]"]
  node_searchservice["Search service"]
  node_ai["AI path suggestions<br/>[agentic-engine.ts]"]
end

subgraph group_identity["Identity and integrations"]
  node_auth["Authentication and SSO"]
  node_slack["Slack integration"]
  node_plugins["Plugin ecosystem"]
end

subgraph group_operations["Administration"]
  node_admin["Administration"]
  node_audit["Audit logs"]
  node_notifications["Notifications"]
end

subgraph group_vault["Vault storage"]
  node_vaultclient["Vault manager client"]
  node_vaultmanager["Vault manager"]
  node_storagecontroller["Storage stats endpoint"]
  node_repostorage["Git repository storage"]
  node_statscontract["Storage stats contract"]
end

node_user(("GROWI user"))
node_mongo[("MongoDB")]
node_gitrepo[("Bare Git repository")]
node_git["Git client"]
node_agentplatform["Mastra agent platform"]
node_slackservice["Slack / Mattermost"]

node_user -->|"opens pages"| node_page
node_user -->|"chooses mode"| node_editor
node_editor -->|"reads collaboration state"| node_collab
node_user -->|"enters query"| node_searchstate
node_searchstate -->|"syncs URL"| node_searchstate
node_user -.->|"requests suggestions"| node_ai
node_ai -.->|"requests generation"| node_agentplatform
node_user -->|"authenticates"| node_auth
node_user -->|"configures instance"| node_admin
node_user -->|"configures integration"| node_slack
node_slack -.->|"integrates"| node_slackservice
node_vaultclient -->|"sends requests"| node_vaultmanager
node_vaultclient -->|"fetches stats"| node_storagecontroller
node_storagecontroller -->|"resolves repo path"| node_repostorage
node_repostorage -->|"reads and writes"| node_gitrepo
node_storagecontroller -->|"counts objects"| node_git
node_storagecontroller -->|"aggregates and counts"| node_mongo
node_vaultclient -->|"returns typed stats"| node_statscontract
node_storagecontroller -->|"returns stats shape"| node_statscontract

click node_page "https://github.com/growilabs/growi/tree/master/apps/app/src/client/components"
click node_editor "https://github.com/growilabs/growi/blob/master/apps/app/src/client/components/Navbar/PageEditorModeManager.tsx"
click node_collab "https://github.com/growilabs/growi/tree/master/apps/app/src/features/collaborative-editor"
click node_attachments "https://github.com/growilabs/growi/blob/master/apps/app/src/server/service/file-uploader/local-storage-path.ts"
click node_searchstate "https://github.com/growilabs/growi/blob/master/apps/app/src/states/search/keyword-manager.ts"
click node_searchservice "https://github.com/growilabs/growi/tree/master/apps/app/src/server/service/search"
click node_ai "https://github.com/growilabs/growi/blob/master/apps/app/src/features/ai-tools/suggest-path/server/services/engines/agentic-engine.ts"
click node_auth "https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin/Security"
click node_slack "https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin/SlackIntegration"
click node_plugins "https://github.com/growilabs/growi/tree/master/apps/app"
click node_admin "https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin"
click node_audit "https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin/AuditLog"
click node_notifications "https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/InAppNotification"
click node_vaultclient "https://github.com/growilabs/growi/blob/master/apps/app/src/features/growi-vault/server/services/vault-manager-client.ts"
click node_vaultmanager "https://github.com/growilabs/growi/tree/master/apps/growi-vault-manager/src/controllers"
click node_storagecontroller "https://github.com/growilabs/growi/blob/master/apps/growi-vault-manager/src/controllers/storage-stats-controller.ts"
click node_repostorage "https://github.com/growilabs/growi/blob/master/apps/growi-vault-manager/src/services/vault-repo-storage.ts"
click node_statscontract "https://github.com/growilabs/growi/blob/master/packages/core/src/interfaces/vault/vault-storage-stats.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_page,node_editor,node_collab,node_attachments,node_user,node_git toneBlue
class node_searchstate,node_searchservice,node_ai,node_mongo,node_gitrepo toneAmber
class node_auth,node_slack,node_plugins toneMint
class node_admin,node_audit,node_notifications toneRose
class node_vaultclient,node_vaultmanager,node_storagecontroller,node_repostorage,node_statscontract,node_agentplatform,node_slackservice toneIndigo
```

## Components

### Pages and collaboration

- [Hierarchical pages](https://github.com/growilabs/growi/tree/master/apps/app/src/client/components): `apps/app/src/client/components`
- [Editor mode](https://github.com/growilabs/growi/blob/master/apps/app/src/client/components/Navbar/PageEditorModeManager.tsx): `apps/app/src/client/components/Navbar/PageEditorModeManager.tsx`
- [Live collaboration](https://github.com/growilabs/growi/tree/master/apps/app/src/features/collaborative-editor): `apps/app/src/features/collaborative-editor`
- [Attachments](https://github.com/growilabs/growi/blob/master/apps/app/src/server/service/file-uploader/local-storage-path.ts): `apps/app/src/server/service/file-uploader/local-storage-path.ts`

### Search and navigation

- [Search keywords](https://github.com/growilabs/growi/blob/master/apps/app/src/states/search/keyword-manager.ts): `apps/app/src/states/search/keyword-manager.ts`
- [Search service](https://github.com/growilabs/growi/tree/master/apps/app/src/server/service/search): `apps/app/src/server/service/search`
- [AI path suggestions](https://github.com/growilabs/growi/blob/master/apps/app/src/features/ai-tools/suggest-path/server/services/engines/agentic-engine.ts): `apps/app/src/features/ai-tools/suggest-path/server/services/engines/agentic-engine.ts`

### Identity and integrations

- [Authentication and SSO](https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin/Security): `apps/app/src/client/components/Admin/Security`
- [Slack integration](https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin/SlackIntegration): `apps/app/src/client/components/Admin/SlackIntegration`
- [Plugin ecosystem](https://github.com/growilabs/growi/tree/master/apps/app): `apps/app`

### Administration

- [Administration](https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin): `apps/app/src/client/components/Admin`
- [Audit logs](https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/Admin/AuditLog): `apps/app/src/client/components/Admin/AuditLog`
- [Notifications](https://github.com/growilabs/growi/tree/master/apps/app/src/client/components/InAppNotification): `apps/app/src/client/components/InAppNotification`

### Vault storage

- [Vault manager client](https://github.com/growilabs/growi/blob/master/apps/app/src/features/growi-vault/server/services/vault-manager-client.ts): `apps/app/src/features/growi-vault/server/services/vault-manager-client.ts`
- [Vault manager](https://github.com/growilabs/growi/tree/master/apps/growi-vault-manager/src/controllers): `apps/growi-vault-manager/src/controllers`
- [Storage stats endpoint](https://github.com/growilabs/growi/blob/master/apps/growi-vault-manager/src/controllers/storage-stats-controller.ts): `apps/growi-vault-manager/src/controllers/storage-stats-controller.ts`
- [Git repository storage](https://github.com/growilabs/growi/blob/master/apps/growi-vault-manager/src/services/vault-repo-storage.ts): `apps/growi-vault-manager/src/services/vault-repo-storage.ts`
- [Storage stats contract](https://github.com/growilabs/growi/blob/master/packages/core/src/interfaces/vault/vault-storage-stats.ts): `packages/core/src/interfaces/vault/vault-storage-stats.ts`

### Other components

- **GROWI user**
- **MongoDB**
- **Bare Git repository**
- **Git client**
- **Mastra agent platform**
- **Slack / Mattermost**

## Connections

- GROWI user → Hierarchical pages: opens pages
- GROWI user → Editor mode: chooses mode
- Editor mode → Live collaboration: reads collaboration state
- GROWI user → Search keywords: enters query
- Search keywords → Search keywords: syncs URL
- GROWI user → AI path suggestions: requests suggestions
- AI path suggestions → Mastra agent platform: requests generation
- GROWI user → Authentication and SSO: authenticates
- GROWI user → Administration: configures instance
- GROWI user → Slack integration: configures integration
- Slack integration → Slack / Mattermost: integrates
- Vault manager client → Vault manager: sends requests
- Vault manager client → Storage stats endpoint: fetches stats
- Storage stats endpoint → Git repository storage: resolves repo path
- Git repository storage → Bare Git repository: reads and writes
- Storage stats endpoint → Git client: counts objects
- Storage stats endpoint → MongoDB: aggregates and counts
- Vault manager client → Storage stats contract: returns typed stats
- Storage stats endpoint → Storage stats contract: returns stats shape
