Self-hosted error and performance monitoring. Events are accepted over a fast ingest API, queued in Redis, batched into PostgreSQL, and browsed in a Next.js dashboard with organization-scoped projects.
| Layer | Role |
|---|---|
SDK (@zapdev-labs/sentry-clone) |
Capture errors, messages, breadcrumbs, and transactions from Node or the browser |
Ingest (apps/ingest) |
Hono on Bun — validates payloads, resolves DSN keys, returns 202 and enqueues work |
Worker (apps/worker) |
BullMQ consumer — micro-batches jobs and writes issues, events, transactions, spans |
Web (apps/web) |
Next.js 15 dashboard — Better Auth, organizations, projects, issues, performance |
DB (packages/db) |
Drizzle schema, Zod ingest types, fingerprinting, migrations |
# Dependencies
bun install
# Postgres + Redis
docker compose up -d
# Schema
bun run db:migrate
# Build all packages
bun run build
# Run ingest, worker, and web (three terminals or turbo dev)
bun run devCopy .env.example to .env and adjust URLs. After sign-up, create a project in the dashboard and copy its DSN into your app.
| Page | Audience | Contents |
|---|---|---|
| Architecture | Implementers | Data flow, queues, grouping, caching |
| API reference | Integrators | Ingest and dashboard HTTP APIs |
| SDK guide | App developers | Init, capture, transactions, DSN format |
| Development | Contributors | Monorepo layout, scripts, testing |
| Deployment | Operators | Railway services, env wiring |
| Environment | Everyone | Variable reference |
https://{publicKey}@{ingest-host}/v1/ingest
The public key is the project’s public_key column. The SDK sends it as X-Open-Sentry-Key or ?key= (for sendBeacon).
curl -X POST "$INGEST_URL/v1/ingest" \
-H "Content-Type: application/json" \
-H "X-Open-Sentry-Key: YOUR_PUBLIC_KEY" \
-d '{
"type": "error",
"exception": {
"type": "Error",
"value": "Hello from curl",
"stacktrace": { "frames": [] }
},
"environment": "staging",
"release": "api-test@1"
}'Expected response: 202 with { "id": "<batch-uuid>" }.
apps/
ingest/ # Hono ingest API (Bun)
worker/ # BullMQ batch writer
web/ # Next.js dashboard + /docs
packages/
db/ # Schema, migrations, ingest Zod schemas
sdk/ # Client SDK (npm: @zapdev-labs/sentry-clone)
examples/
demo-app/ # Scripted SDK demo
docs/ # Source markdown (this folder)
MIT — SDK package published as @zapdev-labs/sentry-clone.