How tritonnet/tritondrive works
TritonDrive turns provider accounts into a protected storage pool, then exposes volume files through shares and a web control plane. The main workflow is account and pool management, redundant encrypted block storage, filesystem access, and administration through WebDAV, SFTP, or the web app. The graph preserves the documented storage, encryption, filesystem, control-plane, and UI capabilities. Some subsystem links rely on README descriptions because their implementation files were not excerpted; those limits are reflected in the evidence citations.
Main entry points: App.tsx Web application · vfs.go Virtual filesystem · main.go Triton daemon · stack.go Pool stack
Components 23
Access and UI
- Triton daemon
src/cmd/tritond/main.go - Web application
web/src/App.tsx - Web API client
web/src/api.ts - Account management
web/src/pages/Accounts.tsx - Pool management
web/src/pages/Pool.tsx - Volume management
web/src/pages/Volumes.tsx - File browser
web/src/pages/Files.tsx - Share management
web/src/pages/Shares.tsx - Settings
web/src/pages/Settings.tsx
Control plane
- HTTP API
src/internal/adapter/httpapi/api.go - Control plane
src/internal/server/server.go - System database
src/internal/sqlitedb/sqlitedb.go
Files and shares
- Virtual filesystem
src/internal/vfs/vfs.go - Filesystem metadata
src/internal/vfs/meta/store.go - WebDAV shares
src/internal/adapter/webdav/webdav.go - SFTP shares
src/internal/adapter/sftp/handler.go
Encryption and redundancy
- File encryption
src/internal/crypto/engine.go - Redundancy and repair
src/internal/blockstore/redundancy/repair.go
Pool storage
- Pool stack
src/internal/blockstore/stack/stack.go - Block cache
src/internal/blockstore/cache/cache.go - Storage backends
src/internal/blockstore/backend/backend.go
Other components
- Administrator
- Storage providers
Connections 28
- Administrator → Web application: manages
- Administrator → WebDAV shares: connects files
- Administrator → SFTP shares: connects files
- Triton daemon → Control plane: starts
src/cmd/tritond/main.go - Triton daemon → HTTP API: serves
src/cmd/tritond/main.go - Triton daemon → WebDAV shares: serves
src/cmd/tritond/main.go - Triton daemon → SFTP shares: serves
src/cmd/tritond/main.go - Web application → Web API client: requests data
web/src/App.tsx - Web application → Account management: routes to
web/src/App.tsx - Web application → Pool management: routes to
web/src/App.tsx - Web application → Volume management: routes to
web/src/App.tsx - Web application → File browser: routes to
web/src/App.tsx - Web application → Share management: routes to
web/src/App.tsx - Web application → Settings: routes to
web/src/App.tsx - Web API client → HTTP API: calls endpoints
web/src/api.ts - HTTP API → Control plane: handles requests
src/internal/adapter/httpapi/api.go - Control plane → System database: stores control data
src/internal/server/server.go - Control plane → Virtual filesystem: opens filesystem
src/internal/server/server.go - WebDAV shares → Virtual filesystem: serves files
src/internal/adapter/webdav/webdav.go - SFTP shares → Virtual filesystem: serves files
src/internal/adapter/sftp/handler.go - Virtual filesystem → Filesystem metadata: tracks namespace
- Virtual filesystem → File encryption: encrypts file data
- File encryption → Pool stack: stores encrypted blocks
src/internal/crypto/engine.go - Pool stack → Block cache: uses cache
src/internal/blockstore/stack/stack.go - Pool stack → Redundancy and repair: uses placement
src/internal/blockstore/stack/stack.go - Pool stack → Storage backends: uses drivers
src/internal/blockstore/stack/stack.go - Storage backends → Storage providers: reads and writes
- Redundancy and repair → Storage backends: repairs blocks
src/internal/blockstore/redundancy/repair.go