# drs0me1/gezgin architecture

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

- Interactive diagram: https://gitdiagram.com/drs0me1/gezgin
- Repository: https://github.com/drs0me1/gezgin

## Overview

Gezgin is a self-hosted web file manager. A user signs in, navigates or searches their scoped files, then previews or acts on them; the app sends requests to the Go HTTP server, which applies user permissions and file rules and uses storage or filesystem services. The README also documents separate trash, favourites, sharing/WebDAV, archive, settings, and user-management capabilities. Several backend links are evidenced by the source index; frontend-to-API wiring and unsampled feature handlers are shown only as documented, so those links are dashed.

Main entry points: [`http`](https://github.com/drs0me1/gezgin/tree/main/http) (HTTP handlers), [`cmd/root.go`](https://github.com/drs0me1/gezgin/blob/main/cmd/root.go) (Server startup), [`storage/bolt`](https://github.com/drs0me1/gezgin/tree/main/storage/bolt) (Bolt database), [`frontend/src/views`](https://github.com/drs0me1/gezgin/tree/main/frontend/src/views) (Views and navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Vue application<br/>[App.vue]"]
  node_navigation["Views and navigation"]
  node_api["API clients"]
  node_frontend_start["Frontend bootstrap<br/>[main.ts]"]
end

subgraph group_server["Server and API"]
  node_cli["Server startup<br/>[root.go]"]
  node_http["HTTP handlers"]
end

subgraph group_files["File capabilities"]
  node_filecore["Scoped file access<br/>[file.go]"]
  node_uploads["Resumable uploads<br/>[tus_handlers.go]"]
  node_archives["Archive operations"]
  node_search["File search<br/>[search.go]"]
  node_trash["Trash lifecycle<br/>[trash.go]"]
  node_images["Image previews<br/>[service.go]"]
  node_favorites["Favourites<br/>[favorites.go]"]
end

subgraph group_state["Identity and state"]
  node_users["User permissions<br/>[storage.go]"]
  node_auth["Authentication<br/>[auth.go]"]
  node_settings["Instance settings<br/>[storage.go]"]
  node_sharing["Links and WebDAV<br/>[storage.go]"]
  node_database[("Bolt database")]
end

node_user(("File manager user"))

node_user -.->|"uses"| node_app
node_frontend_start -->|"mounts"| node_app
node_user -.->|"browses"| node_navigation
node_navigation -.->|"requests"| node_api
node_api -.->|"calls"| node_http
node_cli -->|"serves"| node_http
node_cli -->|"reads"| node_settings
node_http -->|"checks files"| node_filecore
node_http -.->|"dispatches"| node_uploads
node_http -.->|"authorizes"| node_users
node_http -.->|"searches"| node_search
node_http -.->|"manages trash"| node_trash
node_http -.->|"handles archives"| node_archives
node_http -->|"serves previews"| node_images
node_http -.->|"manages shares"| node_sharing
node_http -.->|"manages favourites"| node_favorites
node_http -.->|"authenticates"| node_auth
node_http -.->|"serves settings"| node_settings
node_cli -->|"configures"| node_database
node_sharing -.->|"persists"| node_database
node_users -.->|"persists"| node_database

click node_app "https://github.com/drs0me1/gezgin/blob/main/frontend/src/App.vue"
click node_navigation "https://github.com/drs0me1/gezgin/tree/main/frontend/src/views"
click node_api "https://github.com/drs0me1/gezgin/tree/main/frontend/src/api"
click node_cli "https://github.com/drs0me1/gezgin/blob/main/cmd/root.go"
click node_http "https://github.com/drs0me1/gezgin/tree/main/http"
click node_filecore "https://github.com/drs0me1/gezgin/blob/main/files/file.go"
click node_uploads "https://github.com/drs0me1/gezgin/blob/main/http/tus_handlers.go"
click node_archives "https://github.com/drs0me1/gezgin/tree/main/pack"
click node_search "https://github.com/drs0me1/gezgin/blob/main/search/search.go"
click node_trash "https://github.com/drs0me1/gezgin/blob/main/trash/trash.go"
click node_images "https://github.com/drs0me1/gezgin/blob/main/img/service.go"
click node_users "https://github.com/drs0me1/gezgin/blob/main/users/storage.go"
click node_auth "https://github.com/drs0me1/gezgin/blob/main/auth/auth.go"
click node_settings "https://github.com/drs0me1/gezgin/blob/main/settings/storage.go"
click node_sharing "https://github.com/drs0me1/gezgin/blob/main/share/storage.go"
click node_database "https://github.com/drs0me1/gezgin/tree/main/storage/bolt"
click node_favorites "https://github.com/drs0me1/gezgin/blob/main/http/favorites.go"
click node_frontend_start "https://github.com/drs0me1/gezgin/blob/main/frontend/src/main.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_app,node_navigation,node_api,node_frontend_start,node_user toneBlue
class node_cli,node_http toneAmber
class node_filecore,node_uploads,node_archives,node_search,node_trash,node_images,node_favorites toneMint
class node_users,node_auth,node_settings,node_sharing,node_database toneRose
```

## Components

### Web client

- [Vue application](https://github.com/drs0me1/gezgin/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Views and navigation](https://github.com/drs0me1/gezgin/tree/main/frontend/src/views): `frontend/src/views`
- [API clients](https://github.com/drs0me1/gezgin/tree/main/frontend/src/api): `frontend/src/api`
- [Frontend bootstrap](https://github.com/drs0me1/gezgin/blob/main/frontend/src/main.ts): `frontend/src/main.ts`

### Server and API

- [Server startup](https://github.com/drs0me1/gezgin/blob/main/cmd/root.go): `cmd/root.go`
- [HTTP handlers](https://github.com/drs0me1/gezgin/tree/main/http): `http`

### File capabilities

- [Scoped file access](https://github.com/drs0me1/gezgin/blob/main/files/file.go): `files/file.go`
- [Resumable uploads](https://github.com/drs0me1/gezgin/blob/main/http/tus_handlers.go): `http/tus_handlers.go`
- [Archive operations](https://github.com/drs0me1/gezgin/tree/main/pack): `pack`
- [File search](https://github.com/drs0me1/gezgin/blob/main/search/search.go): `search/search.go`
- [Trash lifecycle](https://github.com/drs0me1/gezgin/blob/main/trash/trash.go): `trash/trash.go`
- [Image previews](https://github.com/drs0me1/gezgin/blob/main/img/service.go): `img/service.go`
- [Favourites](https://github.com/drs0me1/gezgin/blob/main/http/favorites.go): `http/favorites.go`

### Identity and state

- [User permissions](https://github.com/drs0me1/gezgin/blob/main/users/storage.go): `users/storage.go`
- [Authentication](https://github.com/drs0me1/gezgin/blob/main/auth/auth.go): `auth/auth.go`
- [Instance settings](https://github.com/drs0me1/gezgin/blob/main/settings/storage.go): `settings/storage.go`
- [Links and WebDAV](https://github.com/drs0me1/gezgin/blob/main/share/storage.go): `share/storage.go`
- [Bolt database](https://github.com/drs0me1/gezgin/tree/main/storage/bolt): `storage/bolt`

### Other components

- **File manager user**

## Connections

- File manager user → Vue application: uses (evidence: `README.md`)
- Frontend bootstrap → Vue application: mounts (evidence: `frontend/src/main.ts`)
- File manager user → Views and navigation: browses (evidence: `README.md`)
- Views and navigation → API clients: requests
- API clients → HTTP handlers: calls (evidence: `README.md`)
- Server startup → HTTP handlers: serves (evidence: `cmd/root.go`)
- Server startup → Instance settings: reads (evidence: `cmd/root.go`)
- HTTP handlers → Scoped file access: checks files (evidence: `http/tus_handlers.go`)
- HTTP handlers → Resumable uploads: dispatches
- HTTP handlers → User permissions: authorizes (evidence: `README.md`)
- HTTP handlers → File search: searches (evidence: `README.md`)
- HTTP handlers → Trash lifecycle: manages trash (evidence: `README.md`)
- HTTP handlers → Archive operations: handles archives (evidence: `README.md`)
- HTTP handlers → Image previews: serves previews (evidence: `http/preview.go`)
- HTTP handlers → Links and WebDAV: manages shares (evidence: `README.md`)
- HTTP handlers → Favourites: manages favourites (evidence: `README.md`)
- HTTP handlers → Authentication: authenticates (evidence: `README.md`)
- HTTP handlers → Instance settings: serves settings (evidence: `README.md`)
- Server startup → Bolt database: configures (evidence: `cmd/root.go`)
- Links and WebDAV → Bolt database: persists
- User permissions → Bolt database: persists
