How an event gets from the SDK to a chart
SDKs send batches to a Connect RPC endpoint, NATS queues them, Go workers write the events and resolve identity, and ClickHouse stores them for Live, Insights, and Profiles.
How data flows
Ingest
SDKs send events in batches to a Connect RPC endpoint, which adds location, device, and UTM properties and tags bots as $bot on arrival.
Process
NATS hands each event to Go workers, which store it and apply identify() calls to profiles, so a traffic spike queues instead of dropping.
Serve
Events land in ClickHouse, which Live, Insights, and Profiles query directly.
Typed, programmatic access
Read profiles, query insights, and send events over Connect RPC, in Protobuf or JSON. The MCP server answers AI agents from the same API, so their numbers match the dashboard’s.
Connect RPC
Typed services over HTTP, callable from any Connect or gRPC client, or with plain JSON.
Protobuf
Schema-first payloads, binary on the wire, defined once in .proto files.
Project keys
A public key for client SDKs and a private key for servers and reads, each scoped to one project.
Run the whole stack yourself
Pug is AGPL-3.0. Run the binary and its four stores on your own infrastructure, and events never leave it. On a small node, pug start runs the server and every worker in one process.
- pug One Go binary: the API server and every worker
- Dragonfly or Redis 7+ The daily salt, kept off disk
- NATS JetStream Queues every event
- ClickHouse Every event
- PostgreSQL 15+ Accounts, boards, and profiles
Send your first event.
Create a project, add the snippet, and watch the Live view fill up. Or open the demo first: the real dashboard on a sample pet shop, with no sign-up.
Questions? Email hello@pug.sh