# getarcaneapp/arcane architecture

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

- Interactive diagram: https://gitdiagram.com/getarcaneapp/arcane
- Repository: https://github.com/getarcaneapp/arcane

## Overview

Arcane is a Docker-management application with a web interface and CLI backed by a Go API. Its main user journey is to select an environment, inspect or manage Docker resources, and receive updated state or operation status. The tree also identifies distinct project deployment, image and vulnerability management, backup, and remote-environment capabilities. The README excerpt gives the product positioning but few implementation details; relationships below rely on component names and the sampled excerpts, so uncertain wiring is omitted.

Main entry points: [`backend/api/api.go`](https://github.com/getarcaneapp/arcane/blob/main/backend/api/api.go) (HTTP API), [`backend/internal/database/database.go`](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/database/database.go) (Application database), [`backend/internal/environment/handler.go`](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/environment/handler.go) (Environment management), [`backend/internal/project/project.go`](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/project/project.go) (Project lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User interfaces"]
  node_web["Web application<br/>[auth-service.ts]"]
  node_cli["Arcane CLI<br/>[root.go]"]
end

subgraph group_core["API and identity"]
  node_api["HTTP API<br/>[api.go]"]
  node_auth["Authentication<br/>[handler.go]"]
  node_database[("Application database<br/>[database.go]")]
  node_environments["Environment management<br/>[handler.go]"]
end

subgraph group_docker["Docker operations"]
  node_projects["Project lifecycle<br/>[project.go]"]
  node_containers["Container management<br/>[handler.go]"]
  node_swarm["Swarm management<br/>[swarm.go]"]
  node_images["Images and updates<br/>[image.go]"]
  node_registry["Registry access<br/>[service.go]"]
end

subgraph group_operations["Operations and insights"]
  node_vulnerability["Vulnerability scans<br/>[vulnerability.go]"]
  node_backups["Backup operations<br/>[engine.go]"]
  node_jobs["Scheduled jobs<br/>[service.go]"]
  node_events["Docker events<br/>[service.go]"]
  node_notifications["Notifications<br/>[notification.go]"]
end

subgraph group_remote["Remote environments"]
  node_edge["Tunnel server<br/>[server.go]"]
end

node_user(("Operator"))
node_dockerengine{{"Docker engine"}}
node_agent(("Remote environment agent"))

node_user -->|"uses"| node_web
node_user -->|"uses"| node_cli
node_web -->|"requests"| node_api
node_cli -->|"requests"| node_api
node_api -->|"authenticates"| node_auth
node_api -->|"routes requests"| node_environments
node_api -->|"routes requests"| node_projects
node_api -->|"routes requests"| node_containers
node_api -->|"routes requests"| node_swarm
node_api -->|"routes requests"| node_images
node_api -->|"routes requests"| node_vulnerability
node_api -->|"routes requests"| node_backups
node_api -->|"routes requests"| node_jobs
node_environments -->|"reads and writes"| node_database
node_projects -->|"reads and writes"| node_database
node_projects -->|"manages projects"| node_dockerengine
node_containers -->|"manages containers"| node_dockerengine
node_swarm -->|"manages swarm"| node_dockerengine
node_images -->|"manages images"| node_dockerengine
node_registry -->|"uses engine"| node_dockerengine
node_vulnerability -->|"stores scan data"| node_database
node_backups -->|"runs backup tasks"| node_dockerengine
node_jobs -->|"stores job state"| node_database
node_events -->|"observes events"| node_dockerengine
node_events -->|"stores events"| node_database
node_notifications -.->|"delivers alerts"| node_user
node_environments -.->|"routes remotely"| node_edge
node_agent -.->|"connects tunnel"| node_edge

click node_web "https://github.com/getarcaneapp/arcane/blob/main/frontend/src/lib/services/auth-service.ts"
click node_cli "https://github.com/getarcaneapp/arcane/blob/main/cli/pkg/root.go"
click node_api "https://github.com/getarcaneapp/arcane/blob/main/backend/api/api.go"
click node_auth "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/auth/handler.go"
click node_database "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/database/database.go"
click node_environments "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/environment/handler.go"
click node_projects "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/project/project.go"
click node_containers "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/container/handler.go"
click node_swarm "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/swarm/swarm.go"
click node_images "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/image/image.go"
click node_registry "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/registry/service.go"
click node_vulnerability "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/vulnerability/vulnerability.go"
click node_backups "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/backup/engine.go"
click node_jobs "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/job/service.go"
click node_events "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/event/service.go"
click node_notifications "https://github.com/getarcaneapp/arcane/blob/main/backend/internal/notification/notification.go"
click node_edge "https://github.com/getarcaneapp/arcane/blob/main/backend/pkg/libarcane/edge/server.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_cli toneBlue
class node_api,node_auth,node_database,node_environments toneAmber
class node_projects,node_containers,node_swarm,node_images,node_registry toneMint
class node_vulnerability,node_backups,node_jobs,node_events,node_notifications toneRose
class node_edge,node_user,node_dockerengine,node_agent toneIndigo
```

## Components

### User interfaces

- [Web application](https://github.com/getarcaneapp/arcane/blob/main/frontend/src/lib/services/auth-service.ts): `frontend/src/lib/services/auth-service.ts`
- [Arcane CLI](https://github.com/getarcaneapp/arcane/blob/main/cli/pkg/root.go): `cli/pkg/root.go`

### API and identity

- [HTTP API](https://github.com/getarcaneapp/arcane/blob/main/backend/api/api.go): `backend/api/api.go`
- [Authentication](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/auth/handler.go): `backend/internal/auth/handler.go`
- [Application database](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/database/database.go): `backend/internal/database/database.go`
- [Environment management](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/environment/handler.go): `backend/internal/environment/handler.go`

### Docker operations

- [Project lifecycle](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/project/project.go): `backend/internal/project/project.go`
- [Container management](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/container/handler.go): `backend/internal/container/handler.go`
- [Swarm management](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/swarm/swarm.go): `backend/internal/swarm/swarm.go`
- [Images and updates](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/image/image.go): `backend/internal/image/image.go`
- [Registry access](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/registry/service.go): `backend/internal/registry/service.go`

### Operations and insights

- [Vulnerability scans](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/vulnerability/vulnerability.go): `backend/internal/vulnerability/vulnerability.go`
- [Backup operations](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/backup/engine.go): `backend/internal/backup/engine.go`
- [Scheduled jobs](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/job/service.go): `backend/internal/job/service.go`
- [Docker events](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/event/service.go): `backend/internal/event/service.go`
- [Notifications](https://github.com/getarcaneapp/arcane/blob/main/backend/internal/notification/notification.go): `backend/internal/notification/notification.go`

### Remote environments

- [Tunnel server](https://github.com/getarcaneapp/arcane/blob/main/backend/pkg/libarcane/edge/server.go): `backend/pkg/libarcane/edge/server.go`

### Other components

- **Operator**
- **Docker engine**
- **Remote environment agent**

## Connections

- Operator → Web application: uses
- Operator → Arcane CLI: uses
- Web application → HTTP API: requests
- Arcane CLI → HTTP API: requests
- HTTP API → Authentication: authenticates
- HTTP API → Environment management: routes requests
- HTTP API → Project lifecycle: routes requests
- HTTP API → Container management: routes requests
- HTTP API → Swarm management: routes requests
- HTTP API → Images and updates: routes requests
- HTTP API → Vulnerability scans: routes requests
- HTTP API → Backup operations: routes requests
- HTTP API → Scheduled jobs: routes requests
- Environment management → Application database: reads and writes
- Project lifecycle → Application database: reads and writes
- Project lifecycle → Docker engine: manages projects
- Container management → Docker engine: manages containers
- Swarm management → Docker engine: manages swarm
- Images and updates → Docker engine: manages images
- Registry access → Docker engine: uses engine
- Vulnerability scans → Application database: stores scan data
- Backup operations → Docker engine: runs backup tasks
- Scheduled jobs → Application database: stores job state
- Docker events → Docker engine: observes events
- Docker events → Application database: stores events
- Notifications → Operator: delivers alerts
- Environment management → Tunnel server: routes remotely
- Remote environment agent → Tunnel server: connects tunnel
