How zkishere/telecrate works
TeleCrate is a self-hosted S3-compatible object-storage gateway that durably accepts object data into a local spool and SQLite/Postgres index, then uploads chunks asynchronously to Telegram. The principal path is S3 client → HTTP/S3 handling and SigV4 authorization → local durable storage and job record → background worker → Telegram. Separate capabilities include multipart/versioned objects, encryption and access controls, plus an authenticated administration dashboard for monitoring and maintenance. Unsampled handlers are represented only where README capabilities and the tree support them; uncertain internal call links are omitted.
Main entry points: app.rs HTTP router · mod.rs Metadata and jobs · main.rs Daemon entry · worker.rs Upload workers
Components 21
Daemon runtime
- Daemon entry
src/main.rs - Configuration
src/config.rs
S3 gateway
- HTTP router
src/app.rs - SigV4 auth
src/sigv4.rs - S3 operations
src/s3.rs - Bucket policies
src/policy.rs - CORS rules
src/cors.rs - Object encryption
src/crypto.rs - Multipart and versions
src/app.rs
Durable storage
- Local spool
src/spool.rs - Metadata and jobs
src/db/mod.rs - Upload workers
src/worker.rs - Telegram transport
src/telegram.rs
Administration
- Admin API
src/admin.rs - Web dashboard
src/dashboard/app.js - Garbage collection
src/gc.rs - Health and repair
src/doctor.rs - Recovery tools
src/recovery.rs
Other components
- S3 clients
- Admin operator
- Telegram Bot API
Connections 25
- Daemon entry → Configuration: loads settings
- Daemon entry → Metadata and jobs: opens index
- Daemon entry → HTTP router: serves routes
- Daemon entry → Upload workers: starts workers
- S3 clients → HTTP router: sends S3 requests
- HTTP router → SigV4 auth: authenticates requests
- HTTP router → S3 operations: dispatches S3 actions
- HTTP router → Metadata and jobs: reads and writes
- HTTP router → Local spool: stores chunks
- HTTP router → Object encryption: encrypts content
- HTTP router → Bucket policies: checks access policy
- HTTP router → CORS rules: checks CORS
- HTTP router → Multipart and versions: handles multipart/versioning
- Upload workers → Metadata and jobs: claims and commits jobs
- Upload workers → Local spool: reads chunks
- Upload workers → Telegram transport: uploads chunks
- Telegram transport → Telegram Bot API: calls Bot API
- HTTP router → Telegram transport: deletes remote chunks
- Admin operator → Web dashboard: uses dashboard
- Web dashboard → HTTP router: calls admin routes
- HTTP router → Admin API: dispatches admin routes
- Admin API → Metadata and jobs: queries and updates
- Admin API → Garbage collection: runs cleanup
- Admin API → Health and repair: checks health
- Metadata and jobs → Recovery tools: supports recovery