An open-source, self-hosted alternative to Google Tag Manager, built with modern TypeScript tooling and designed for speed, reliability, and transparency.
Version: v0.1.0 (Functional Core — In Progress)
Goal: Collect → Persist → Inspect
Core event pipeline under construction.
Package / App | Purpose |
---|---|
apps/docs |
Public documentation & landing page |
apps/dashboard |
Admin UI (Next.js + tRPC + Better Auth) |
apps/relay-node |
Ingest API (Bun + Hono + Drizzle + Postgres) |
packages/core |
Shared types, Zod schemas, utilities |
packages/env |
Zod-validated environment loader |
packages/db |
Drizzle ORM schema + Postgres integration |
packages/ui |
Shadcn-based component library |
packages/api |
tRPC routers (shared between dashboard/backend) |
packages/cli |
Developer CLI (otm init , otm dev:relay , etc.) |
packages/web |
Lightweight browser runtime (window.otm.push() ) |
packages/typescript-config |
Shared TypeScript configs |
packages/eslint-config |
Shared ESLint configs |
- Repo hygiene – consistent TS + Bun + Turbo setup
- Env package – validated
.env
handling - DB – Drizzle + Postgres +
events
table - Relay service –
/healthz
,/collect
→ DB insert - Optional Upstash – rate limit & dedupe
- Core types – shared
CollectEvent
schema - Browser snippet –
window.otm.push()
→ sendBeacon - Dashboard stub – event count view
- CLI –
init
,dev:relay
commands - Preview/debug header
- CI smoke build
v0.1 focuses purely on data collection and reliability.
Tag rules and execution come in v0.2.
Layer | Technology |
---|---|
Runtime / API | Bun, Hono |
Database | Postgres, Drizzle ORM |
Cache / Queue | Upstash Redis (optional) |
Frontend / UI | Next.js (App Router), Shadcn/UI, Lucide |
API Contracts | tRPC v11, Zod |
Auth | Better Auth |
CLI | Commander, Esbuild |
Testing | Vitest, Playwright |
CI/CD | GitHub Actions |
Infrastructure | Docker Compose + Caddy (self-host) |
bun install
bun run docker:up
bun run docs
bun run dashboard
cd apps/relay-node
bun run dev
OTM is designed to:
- Provide a self-hosted, transparent alternative to Google Tag Manager
- Enable developer-first analytics & tag management
- Use modern TypeScript + Bun DX for speed and maintainability
- Be modular: Core, Relay, Dashboard, and Web Runtime
Contributions are welcome!
See CONTRIBUTING.md for setup, style, and PR guidelines.
- 🧠 Discussions: Coming soon on GitHub Discussions
- 🐞 Issues: GitHub Issues