How myrosama/daemonclient works
DaemonClient is a personal-cloud product: accounts setup provisions a per-user backend, while Photos and Drive let users manage files on their own isolated infrastructure. The README documents browser-direct encrypted Drive bytes to Telegram, metadata APIs through the user worker, Photos library features, and a self-hosting CLI. Edges reflect only README statements or shown imports/calls; many Photos internals and integrations are unsampled, so their links are omitted or marked unverified.
Main entry points: App.jsx Drive app · server.ts User API worker · useWorkerSetup.ts Setup state hook · daemonclient.mjs Self-host CLI
Components 21
Account and Provisioning
- Accounts portal
apps/accounts-web/src/App.jsx - Worker setup
apps/accounts-web/src/pages/SetupWorker.jsx - Setup state hook
apps/accounts-web/src/hooks/useWorkerSetup.ts - Deployment service
workers/deployment/src/index.ts - Login service
workers/auth/src/index.ts
Web Clients
- Photos app
apps/photos-web/web/src/lib - Drive app
apps/drive-web/src/App.jsx - Drive encryption
apps/drive-web/src/crypto.js - Drive API client
apps/drive-web/src/api.js - Upload sessions
apps/drive-web/src/idb-store.js - Drive service worker
apps/drive-web/public/sw.js - Rust client core
core/dc-core/src/worker.rs - Session handling
core/dc-core/src/session.rs
Per-user Cloud
- User API worker
workers/user-worker/src/server.ts - Metadata index
workers/user-worker/src/d1-adapter.ts - Telegram storage
Self-hosting
- Self-host CLI
selfhost/bin/daemonclient.mjs - Install setup
selfhost/src/commands/setup.mjs - Web deployment command
selfhost/src/commands/web.mjs - Firebase hosting
Other components
- Cloud user
Connections 27
- Cloud user → Accounts portal: uses
- Accounts portal → Worker setup: opens setup
apps/accounts-web/src/App.jsx - Worker setup → Setup state hook: uses setup state
apps/accounts-web/src/pages/SetupWorker.jsx - Setup state hook → Deployment service: requests provisioning
apps/accounts-web/src/hooks/useWorkerSetup.ts - Setup state hook → Login service: gets identity token
- Deployment service → User API worker: provisions worker
- Cloud user → Photos app: browses library
- Cloud user → Drive app: manages files
- Drive app → Drive encryption: encrypts and decrypts
apps/drive-web/src/App.jsx - Drive app → Drive API client: calls API
apps/drive-web/src/App.jsx - Drive app → Upload sessions: stores sessions
apps/drive-web/src/App.jsx - Drive app → User API worker: sends metadata
- Drive app → Telegram storage: sends encrypted chunks
- Drive service worker → Telegram storage: reads file bytes
- Drive app → Drive service worker: registers service worker
- Photos app → User API worker: uses metadata API
- User API worker → Metadata index: reads and writes index
workers/user-worker/src/server.ts - User API worker → Telegram storage: uses bot storage
- Cloud user → Self-host CLI: runs setup
- Self-host CLI → Install setup: dispatches setup
selfhost/bin/daemonclient.mjs - Self-host CLI → Web deployment command: dispatches web deploy
selfhost/bin/daemonclient.mjs - Install setup → Telegram storage: configures storage
selfhost/src/commands/setup.mjs - Install setup → Deployment service: configures Cloudflare
- Web deployment command → Firebase hosting: deploys web apps
- Rust client core → User API worker: calls metadata routes
- Session handling → Login service: signs in
core/dc-core/src/session.rs - Rust client core → Session handling: uses session
core/dc-core/src/worker.rs