How schollz/croc works
Croc is a cross-platform file and folder transfer product with a browser client, relay-assisted peer transfer, PAKE-based encryption, resumable transfer support, temporary stored shares, and SSH sharing. The main path is CLI or browser initiation, transfer negotiation and transport, then verified writing to a receive destination. The graph also preserves the browser’s blog/launch surface and SSH capability. Several implementation paths are unsampled; those relationships are omitted or marked unverified rather than inferred from names alone.
Main entry points: client.ts Transfer client · App.tsx Browser app · cli.go CLI commands · SSHPanel.tsx Browser SSH panel
Components 20
User entry points
- CLI commands
src/cli/cli.go - CLI entry
main.go
Transfer runtime
- Transfer client
web/src/protocol/client.ts - Protocol engine
web/src/protocol/engine.ts - Bundle handling
web/src/protocol/bundle.ts - Compression
web/src/protocol/compression.ts - Transport and relay
web/src/protocol/transport.ts - Transfer metadata
web/src/protocol/metadata.ts - Receive destinations
web/src/protocol/storage.ts
Stored transfers
- Stored-share client
src/storeclient/client.go - Temporary store service
src/store/service.go - Browser stored shares
web/src/protocol/stored.ts - Stored-share UI
web/src/stored-ui.tsx
SSH sharing
- Browser SSH panel
web/src/SSHPanel.tsx - SSH client
src/sshshare/client.go - Browser SSH bridge
web/sshwasm/main.go
Browser product
- Browser app
web/src/App.tsx - Task launcher
web/src/TaskLauncher.tsx - Blog pages
web/src/Blog.tsx
Other components
- User
Connections 22
- User → CLI entry: runs
- CLI entry → CLI commands: starts
main.go - User → Browser app: opens
- Browser app → Task launcher: renders
web/src/App.tsx - Browser app → Transfer client: starts transfer
web/src/App.tsx - Browser app → Browser stored shares: prepares shares
web/src/App.tsx - Browser app → Stored-share UI: renders
web/src/App.tsx - Browser app → Blog pages: links pages
- Browser app → Browser SSH panel: renders
web/src/App.tsx - Transfer client → Bundle handling: uses
web/src/protocol/client.ts - Transfer client → Compression: uses
web/src/protocol/client.ts - Transfer client → Transport and relay: uses
web/src/protocol/client.ts - Transfer client → Transfer metadata: uses
web/src/protocol/client.ts - Transfer client → Receive destinations: writes payloads
web/src/protocol/client.ts - Transfer client → Protocol engine: uses
web/src/protocol/client.ts - Protocol engine → User: authenticates peers
- CLI commands → Stored-share client: uses
src/cli/cli.go - Stored-share client → Temporary store service: HTTP requests
- Browser stored shares → Temporary store service: HTTP requests
- Browser SSH panel → Browser SSH bridge: uses bridge
- Browser SSH panel → SSH client: SSH protocol
- CLI commands → SSH client: starts SSH