# jusuoli/vaultkit architecture

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

- Interactive diagram: https://gitdiagram.com/jusuoli/vaultkit
- Repository: https://github.com/jusuoli/vaultkit

## Overview

Ente is an end-to-end encrypted cloud platform with Photos, Auth, and Locker clients. A typical user stores and accesses protected data through a client; Photos also supports uploads, search, sharing, and collaborative albums. The tree and README describe a broad multi-product system, while the excerpts chiefly expose desktop startup, CLI synchronization, and a staff storage-bonus view. High-level product links are documented; unsampled client and server internals are represented only at supported directory granularity.

Main entry points: [`desktop/src/main.ts`](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main.ts) (Desktop entry), [`cli/main.go`](https://github.com/jusuoli/vaultkit/blob/main/cli/main.go) (CLI startup), [`infra/staff/src/components/StorageBonusTableComponent.tsx`](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/components/StorageBonusTableComponent.tsx) (Storage bonus view), [`infra/staff/src/services/admin-user.ts`](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/admin-user.ts) (Admin user service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_products["Ente products"]
  node_photos["Ente Photos"]
  node_auth["Ente Auth"]
  node_locker["Ente Locker"]
  node_cloud["Ente cloud platform"]
end

subgraph group_desktop["Desktop runtime"]
  node_desktop_main["Desktop entry<br/>[main.ts]"]
  node_desktop_ipc["IPC handlers<br/>[ipc.ts]"]
  node_desktop_log["Logging<br/>[log.ts]"]
end

subgraph group_desktop_services["Desktop services"]
  node_desktop_update["App updater<br/>[app-update.ts]"]
  node_desktop_watch["Filesystem watcher<br/>[watch.ts]"]
  node_desktop_store["Secure app store<br/>[store.ts]"]
  node_safe_store[("Safe storage<br/>[safe-storage.ts]")]
  node_preferences[("User preferences")]
end

subgraph group_cli["CLI synchronization"]
  node_cli_main["CLI startup<br/>[main.go]"]
  node_cli_commands["CLI commands"]
  node_cli_controller["CLI controller"]
  node_cli_api["CLI API client<br/>[client.go]"]
  node_sync_engine["Sync engine<br/>[engine.rs]"]
  node_sync_api["Sync API methods<br/>[methods.rs]"]
  node_sync_storage[("Sync storage")]
end

subgraph group_staff["Staff administration"]
  node_staff_ui["Staff console<br/>[App.tsx]"]
  node_bonus_table["Storage bonus view"]
  node_admin_service["Admin user service<br/>[admin-user.ts]"]
  node_staff_session["Staff session<br/>[session.ts]"]
  node_admin_api["Admin API<br/>[api.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_photos
node_user -->|"uses"| node_auth
node_user -->|"uses"| node_locker
node_photos -->|"stores encrypted data"| node_cloud
node_auth -->|"uses platform"| node_cloud
node_locker -->|"stores encrypted data"| node_cloud
node_user -->|"launches"| node_desktop_main
node_desktop_main -->|"registers handlers"| node_desktop_ipc
node_desktop_main -->|"creates watcher"| node_desktop_watch
node_desktop_main -->|"sets up updater"| node_desktop_update
node_desktop_main -.->|"logs through"| node_desktop_log
node_desktop_update -->|"reads and writes"| node_preferences
node_desktop_store -->|"persists keys"| node_safe_store
node_desktop_store -->|"reads and writes"| node_preferences
node_desktop_watch -->|"logs through"| node_desktop_log
node_cli_main -->|"initializes"| node_cli_controller
node_cli_main -->|"creates client"| node_cli_api
node_cli_main -->|"executes"| node_cli_commands
node_sync_engine -->|"fetches remote data"| node_sync_api
node_sync_engine -->|"reads and writes"| node_sync_storage
node_staff_ui -.->|"shows view"| node_bonus_table
node_bonus_table -->|"fetches bonuses"| node_admin_service
node_bonus_table -->|"gets session"| node_staff_session
node_admin_service -->|"uses session"| node_staff_session
node_admin_service -->|"calls API"| node_admin_api

click node_photos "https://github.com/jusuoli/vaultkit/tree/main/mobile/apps/photos"
click node_auth "https://github.com/jusuoli/vaultkit/tree/main/mobile/apps/auth"
click node_locker "https://github.com/jusuoli/vaultkit/tree/main/mobile/apps/locker"
click node_cloud "https://github.com/jusuoli/vaultkit/tree/main/server"
click node_desktop_main "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main.ts"
click node_desktop_ipc "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/ipc.ts"
click node_desktop_log "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/log.ts"
click node_desktop_update "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/services/app-update.ts"
click node_desktop_watch "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/services/watch.ts"
click node_desktop_store "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/services/store.ts"
click node_safe_store "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/stores/safe-storage.ts"
click node_preferences "https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/stores/user-preferences.ts"
click node_cli_main "https://github.com/jusuoli/vaultkit/blob/main/cli/main.go"
click node_cli_commands "https://github.com/jusuoli/vaultkit/tree/main/cli/cmd"
click node_cli_controller "https://github.com/jusuoli/vaultkit/tree/main/cli/pkg"
click node_cli_api "https://github.com/jusuoli/vaultkit/blob/main/cli/internal/api/client.go"
click node_sync_engine "https://github.com/jusuoli/vaultkit/blob/main/rust/apps/cli/src/sync/engine.rs"
click node_sync_api "https://github.com/jusuoli/vaultkit/blob/main/rust/apps/cli/src/api/methods.rs"
click node_sync_storage "https://github.com/jusuoli/vaultkit/tree/main/rust/apps/cli/src/storage"
click node_staff_ui "https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/App.tsx"
click node_bonus_table "https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/components/StorageBonusTableComponent.tsx"
click node_admin_service "https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/admin-user.ts"
click node_staff_session "https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/session.ts"
click node_admin_api "https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/api.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_photos,node_auth,node_locker,node_cloud,node_user toneBlue
class node_desktop_main,node_desktop_ipc,node_desktop_log toneAmber
class node_desktop_update,node_desktop_watch,node_desktop_store,node_safe_store,node_preferences toneMint
class node_cli_main,node_cli_commands,node_cli_controller,node_cli_api,node_sync_engine,node_sync_api,node_sync_storage toneRose
class node_staff_ui,node_bonus_table,node_admin_service,node_staff_session,node_admin_api toneIndigo
```

## Components

### Ente products

- [Ente Photos](https://github.com/jusuoli/vaultkit/tree/main/mobile/apps/photos): `mobile/apps/photos`
- [Ente Auth](https://github.com/jusuoli/vaultkit/tree/main/mobile/apps/auth): `mobile/apps/auth`
- [Ente Locker](https://github.com/jusuoli/vaultkit/tree/main/mobile/apps/locker): `mobile/apps/locker`
- [Ente cloud platform](https://github.com/jusuoli/vaultkit/tree/main/server): `server`

### Desktop runtime

- [Desktop entry](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main.ts): `desktop/src/main.ts`
- [IPC handlers](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/ipc.ts): `desktop/src/main/ipc.ts`
- [Logging](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/log.ts): `desktop/src/main/log.ts`

### Desktop services

- [App updater](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/services/app-update.ts): `desktop/src/main/services/app-update.ts`
- [Filesystem watcher](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/services/watch.ts): `desktop/src/main/services/watch.ts`
- [Secure app store](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/services/store.ts): `desktop/src/main/services/store.ts`
- [Safe storage](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/stores/safe-storage.ts): `desktop/src/main/stores/safe-storage.ts`
- [User preferences](https://github.com/jusuoli/vaultkit/blob/main/desktop/src/main/stores/user-preferences.ts): `desktop/src/main/stores/user-preferences.ts`

### CLI synchronization

- [CLI startup](https://github.com/jusuoli/vaultkit/blob/main/cli/main.go): `cli/main.go`
- [CLI commands](https://github.com/jusuoli/vaultkit/tree/main/cli/cmd): `cli/cmd`
- [CLI controller](https://github.com/jusuoli/vaultkit/tree/main/cli/pkg): `cli/pkg`
- [CLI API client](https://github.com/jusuoli/vaultkit/blob/main/cli/internal/api/client.go): `cli/internal/api/client.go`
- [Sync engine](https://github.com/jusuoli/vaultkit/blob/main/rust/apps/cli/src/sync/engine.rs): `rust/apps/cli/src/sync/engine.rs`
- [Sync API methods](https://github.com/jusuoli/vaultkit/blob/main/rust/apps/cli/src/api/methods.rs): `rust/apps/cli/src/api/methods.rs`
- [Sync storage](https://github.com/jusuoli/vaultkit/tree/main/rust/apps/cli/src/storage): `rust/apps/cli/src/storage`

### Staff administration

- [Staff console](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/App.tsx): `infra/staff/src/App.tsx`
- [Storage bonus view](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/components/StorageBonusTableComponent.tsx): `infra/staff/src/components/StorageBonusTableComponent.tsx`
- [Admin user service](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/admin-user.ts): `infra/staff/src/services/admin-user.ts`
- [Staff session](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/session.ts): `infra/staff/src/services/session.ts`
- [Admin API](https://github.com/jusuoli/vaultkit/blob/main/infra/staff/src/services/api.ts): `infra/staff/src/services/api.ts`

### Other components

- **User**

## Connections

- User → Ente Photos: uses
- User → Ente Auth: uses
- User → Ente Locker: uses
- Ente Photos → Ente cloud platform: stores encrypted data
- Ente Auth → Ente cloud platform: uses platform
- Ente Locker → Ente cloud platform: stores encrypted data
- User → Desktop entry: launches (evidence: `desktop/src/main.ts`)
- Desktop entry → IPC handlers: registers handlers (evidence: `desktop/src/main.ts`)
- Desktop entry → Filesystem watcher: creates watcher (evidence: `desktop/src/main.ts`)
- Desktop entry → App updater: sets up updater (evidence: `desktop/src/main.ts`)
- Desktop entry → Logging: logs through (evidence: `desktop/src/main.ts`)
- App updater → User preferences: reads and writes (evidence: `desktop/src/main/services/app-update.ts`)
- Secure app store → Safe storage: persists keys (evidence: `desktop/src/main/services/store.ts`)
- Secure app store → User preferences: reads and writes (evidence: `desktop/src/main/services/store.ts`)
- Filesystem watcher → Logging: logs through (evidence: `desktop/src/main/services/watch.ts`)
- CLI startup → CLI controller: initializes (evidence: `cli/main.go`)
- CLI startup → CLI API client: creates client (evidence: `cli/main.go`)
- CLI startup → CLI commands: executes (evidence: `cli/main.go`)
- Sync engine → Sync API methods: fetches remote data (evidence: `rust/apps/cli/src/sync/engine.rs`)
- Sync engine → Sync storage: reads and writes (evidence: `rust/apps/cli/src/sync/engine.rs`)
- Staff console → Storage bonus view: shows view
- Storage bonus view → Admin user service: fetches bonuses (evidence: `infra/staff/src/components/StorageBonusTableComponent.tsx`)
- Storage bonus view → Staff session: gets session (evidence: `infra/staff/src/components/StorageBonusTableComponent.tsx`)
- Admin user service → Staff session: uses session (evidence: `infra/staff/src/services/admin-user.ts`)
- Admin user service → Admin API: calls API (evidence: `infra/staff/src/services/admin-user.ts`)
