How thing-or-think/bt4-web works
Croc is a cross-platform file and folder transfer product, with CLI and browser clients plus temporary encrypted-link storage and SSH sharing. The primary workflow is sender preparation, code/PAKE-based peer setup, relay-capable transfer, then recipient verification and file publication; the browser also exposes stored transfers and SSH. The graph combines README-documented CLI capabilities with sampled browser and storage modules. Several Go runtime connections and browser subsystems are unsampled, so their uncertain links are omitted or marked dashed rather than inferred as calls.
Main entry points: client.ts Transfer client · App.tsx Browser interface · cli.go CLI commands · croc.go Peer transfer
Components 29
CLI transfers
- CLI commands
src/cli/cli.go - Peer transfer
src/croc/croc.go - Transfer code
src/codephrase/codephrase.go - Relay and networking
src/tcp/tcp.go - Receive publication
src/receivefs - Release updater
internal/update/update.go
Browser app
- Browser interface
web/src/App.tsx - App mounting
web/src/main.tsx - Blog pages
web/src/Blog.tsx - Analytics
web/src/analytics.ts - Blog content
web/src/blog-posts.ts
Transfer protocol
- Transfer client
web/src/protocol/client.ts - Bundle handling
web/src/protocol/bundle.ts - Byte utilities
web/src/protocol/bytes.ts - Compression
web/src/protocol/compression.ts - PAKE engine
web/src/protocol/engine.ts - Hashing
web/src/protocol/hash.ts - Transfer metadata
web/src/protocol/metadata.ts - SHA-256
web/src/protocol/sha256.ts - Wire transport
web/src/protocol/transport.ts - Receive destinations
web/src/protocol/storage.ts
Stored transfers
- Stored transfer UI
web/src/stored-ui.tsx - Stored transfer client
web/src/protocol/stored.ts - CLI storage client
src/storeclient/client.go - Encrypted storage service
src/store/service.go
SSH sharing
- Browser SSH panel
web/src/SSHPanel.tsx - Browser SSH protocol
web/src/protocol/ssh.ts - SSH sharing
src/sshshare/client.go
Other components
- Sender or recipient
Connections 29
- Sender or recipient → CLI commands: runs send/receive
- CLI commands → Peer transfer: starts transfer
src/cli/cli.go - CLI commands → Transfer code: parses transfer code
src/cli/cli.go - Peer transfer → Relay and networking: uses relay transport
- Peer transfer → Receive publication: publishes received files
- Sender or recipient → Browser interface: uses browser transfer
- App mounting → Browser interface: mounts interface
web/src/main.tsx - App mounting → Blog pages: mounts pages
web/src/main.tsx - Browser interface → Transfer client: starts transfers
web/src/App.tsx - Browser interface → Stored transfer client: prepares stored transfers
web/src/App.tsx - Browser interface → Stored transfer UI: formats expiry
web/src/App.tsx - Browser interface → Analytics: records events
web/src/App.tsx - Browser interface → Blog content: loads blog content
web/src/App.tsx - Blog pages → Blog content: renders content
web/src/Blog.tsx - Transfer client → Bundle handling: handles bundles
web/src/protocol/client.ts - Transfer client → Compression: compresses payloads
web/src/protocol/client.ts - Transfer client → PAKE engine: requests protocol operations
web/src/protocol/client.ts - Transfer client → Hashing: hashes transfer data
web/src/protocol/client.ts - Transfer client → Transfer metadata: uses transfer metadata
web/src/protocol/client.ts - Transfer client → Wire transport: exchanges messages
web/src/protocol/client.ts - Transfer client → Receive destinations: writes received data
web/src/protocol/client.ts - Hashing → SHA-256: uses digest
web/src/protocol/hash.ts - Stored transfer client → Receive destinations: stores received files
web/src/protocol/stored.ts - CLI storage client → Encrypted storage service: sends storage requests
- Browser SSH panel → Browser SSH protocol: starts SSH session
web/src/SSHPanel.tsx - Sender or recipient → SSH sharing: joins SSH share
- CLI commands → CLI storage client: runs stored commands
- CLI commands → SSH sharing: runs SSH sharing
- Sender or recipient → Release updater: requests update