# owncloud/ocis architecture

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

- Interactive diagram: https://gitdiagram.com/owncloud/ocis
- Repository: https://github.com/owncloud/ocis

## Overview

oCIS is a file-sync-and-sharing platform with a bundled web client and a scalable, multi-service backend. The main user workflow is a client accessing file spaces through documented APIs, with authentication, storage, and sharing capabilities behind the service layer. The README also documents OpenID Connect, web-office integration, and extensibility through configurable services. The graph preserves those product branches; several service internals are represented at directory level because their implementation was not sampled.

Main entry points: [`services/proxy`](https://github.com/owncloud/ocis/tree/master/services/proxy) (Proxy and gateway), [`ocis/pkg/runtime/runtime.go`](https://github.com/owncloud/ocis/blob/master/ocis/pkg/runtime/runtime.go) (oCIS runtime), [`services/ocdav/pkg/command/server.go`](https://github.com/owncloud/ocis/blob/master/services/ocdav/pkg/command/server.go) (WebDAV API), [`services/storage-system`](https://github.com/owncloud/ocis/tree/master/services/storage-system) (File storage services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client experience"]
  node_web["Web client"]
  node_external_clients["Mobile and desktop clients"]
end

subgraph group_access["Access and identity"]
  node_proxy["Proxy and gateway"]
  node_auth["Authentication services"]
  node_idp["Identity provider"]
  node_idm[("Identity management")]
  node_graph["LibreGraph API"]
end

subgraph group_files["File platform"]
  node_webdav["WebDAV API<br/>[server.go]"]
  node_storage[("File storage services")]
  node_sharing["Sharing services"]
  node_search[("Search engine<br/>[engine.go]")]
  node_collaboration["WOPI collaboration gateway"]
end

subgraph group_support["Platform services"]
  node_ocis["oCIS runtime<br/>[runtime.go]"]
  node_events["Event services"]
  node_notifications["Notifications<br/>[server.go]"]
  node_policies["Policy engine<br/>[engine.go]"]
end

node_user(("Client user"))
node_office["Office applications"]

node_user -->|"uses"| node_web
node_user -->|"uses"| node_external_clients
node_web -.->|"accesses platform"| node_proxy
node_external_clients -->|"accesses platform"| node_proxy
node_proxy -.->|"routes API requests"| node_webdav
node_proxy -.->|"routes API requests"| node_graph
node_user -->|"authenticates with"| node_auth
node_auth -->|"uses OIDC provider"| node_idp
node_idp -.->|"uses identity data"| node_idm
node_webdav -->|"manages file spaces"| node_storage
node_graph -.->|"accesses file spaces"| node_storage
node_webdav -->|"supports sharing"| node_sharing
node_web -.->|"searches files"| node_search
node_office -->|"connects for editing"| node_collaboration
node_collaboration -.->|"accesses file content"| node_storage
node_events -.->|"provides event history"| node_notifications
node_ocis -.->|"runs service"| node_proxy
node_ocis -.->|"runs service"| node_webdav
node_ocis -.->|"runs service"| node_storage
node_ocis -.->|"runs service"| node_auth
node_policies -.->|"evaluates access rules"| node_graph

click node_web "https://github.com/owncloud/ocis/tree/master/web"
click node_ocis "https://github.com/owncloud/ocis/blob/master/ocis/pkg/runtime/runtime.go"
click node_proxy "https://github.com/owncloud/ocis/tree/master/services/proxy"
click node_auth "https://github.com/owncloud/ocis/tree/master/services/auth-service"
click node_idp "https://github.com/owncloud/ocis/tree/master/services/idp"
click node_idm "https://github.com/owncloud/ocis/tree/master/services/idm"
click node_graph "https://github.com/owncloud/ocis/tree/master/services/graph/pkg/service/v0"
click node_webdav "https://github.com/owncloud/ocis/blob/master/services/ocdav/pkg/command/server.go"
click node_storage "https://github.com/owncloud/ocis/tree/master/services/storage-system"
click node_sharing "https://github.com/owncloud/ocis/tree/master/services/sharing"
click node_search "https://github.com/owncloud/ocis/blob/master/services/search/pkg/engine/engine.go"
click node_collaboration "https://github.com/owncloud/ocis/tree/master/services/collaboration/pkg/connector"
click node_events "https://github.com/owncloud/ocis/tree/master/services/eventhistory"
click node_notifications "https://github.com/owncloud/ocis/blob/master/services/notifications/pkg/command/server.go"
click node_policies "https://github.com/owncloud/ocis/blob/master/services/policies/pkg/engine/opa/engine.go"

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_web,node_external_clients,node_user toneBlue
class node_proxy,node_auth,node_idp,node_idm,node_graph toneAmber
class node_webdav,node_storage,node_sharing,node_search,node_collaboration toneMint
class node_ocis,node_events,node_notifications,node_policies toneRose
class node_office toneIndigo
```

## Components

### Client experience

- [Web client](https://github.com/owncloud/ocis/tree/master/web): `web`
- **Mobile and desktop clients**

### Access and identity

- [Proxy and gateway](https://github.com/owncloud/ocis/tree/master/services/proxy): `services/proxy`
- [Authentication services](https://github.com/owncloud/ocis/tree/master/services/auth-service): `services/auth-service`
- [Identity provider](https://github.com/owncloud/ocis/tree/master/services/idp): `services/idp`
- [Identity management](https://github.com/owncloud/ocis/tree/master/services/idm): `services/idm`
- [LibreGraph API](https://github.com/owncloud/ocis/tree/master/services/graph/pkg/service/v0): `services/graph/pkg/service/v0`

### File platform

- [WebDAV API](https://github.com/owncloud/ocis/blob/master/services/ocdav/pkg/command/server.go): `services/ocdav/pkg/command/server.go`
- [File storage services](https://github.com/owncloud/ocis/tree/master/services/storage-system): `services/storage-system`
- [Sharing services](https://github.com/owncloud/ocis/tree/master/services/sharing): `services/sharing`
- [Search engine](https://github.com/owncloud/ocis/blob/master/services/search/pkg/engine/engine.go): `services/search/pkg/engine/engine.go`
- [WOPI collaboration gateway](https://github.com/owncloud/ocis/tree/master/services/collaboration/pkg/connector): `services/collaboration/pkg/connector`

### Platform services

- [oCIS runtime](https://github.com/owncloud/ocis/blob/master/ocis/pkg/runtime/runtime.go): `ocis/pkg/runtime/runtime.go`
- [Event services](https://github.com/owncloud/ocis/tree/master/services/eventhistory): `services/eventhistory`
- [Notifications](https://github.com/owncloud/ocis/blob/master/services/notifications/pkg/command/server.go): `services/notifications/pkg/command/server.go`
- [Policy engine](https://github.com/owncloud/ocis/blob/master/services/policies/pkg/engine/opa/engine.go): `services/policies/pkg/engine/opa/engine.go`

### Other components

- **Client user**
- **Office applications**

## Connections

- Client user → Web client: uses (evidence: `README.md`)
- Client user → Mobile and desktop clients: uses (evidence: `README.md`)
- Web client → Proxy and gateway: accesses platform
- Mobile and desktop clients → Proxy and gateway: accesses platform (evidence: `README.md`)
- Proxy and gateway → WebDAV API: routes API requests
- Proxy and gateway → LibreGraph API: routes API requests
- Client user → Authentication services: authenticates with (evidence: `README.md`)
- Authentication services → Identity provider: uses OIDC provider (evidence: `README.md`)
- Identity provider → Identity management: uses identity data
- WebDAV API → File storage services: manages file spaces (evidence: `README.md`)
- LibreGraph API → File storage services: accesses file spaces
- WebDAV API → Sharing services: supports sharing (evidence: `README.md`)
- Web client → Search engine: searches files
- Office applications → WOPI collaboration gateway: connects for editing (evidence: `README.md`)
- WOPI collaboration gateway → File storage services: accesses file content
- Event services → Notifications: provides event history
- oCIS runtime → Proxy and gateway: runs service
- oCIS runtime → WebDAV API: runs service
- oCIS runtime → File storage services: runs service
- oCIS runtime → Authentication services: runs service
- Policy engine → LibreGraph API: evaluates access rules
