Architecture guidelines for high-volume event ingestion and analytical queries using ClickHouse alongside a PostgreSQL/Prisma control plane.
Standardized production guidelines for Next.js, ClickHouse, and Prisma/PostgreSQL — the two-database split used by analytics and observability platforms that need both transactional entity storage and high-volume event aggregation.
Umami (privacy-focused web analytics) and Langfuse (LLM observability) both run this exact split: Next.js + Prisma over PostgreSQL for the control plane, ClickHouse for the raw event/trace volume. The same architectural pattern, with different primary languages, powers PostHog, Sentry, and Plausible Analytics.
Yes — AGENTS.md is the open, cross-tool standard read by Cursor, Claude Code, Windsurf, and 30+ other agents. A dedicated .mdc file is also included for Cursor's native .cursor/rules format.
PostgreSQL is a row-oriented database optimized for transactional reads/writes of individual records. ClickHouse is column-oriented and optimized for scanning and aggregating billions of append-only rows in milliseconds. Once event volume gets large enough that dashboard queries on Postgres start timing out, splitting the write-heavy analytical workload into ClickHouse -- while keeping Postgres for everything transactional -- is the standard fix rather than trying to tune Postgres past its design center.
When event volume is in the millions-of-rows-per-day range and dashboard queries need to aggregate over that volume in near-real-time. Below that scale, PostgreSQL with a well-indexed events table (or a service like Tinybird) is simpler to operate and sufficient.
High-concurrency systems architecture for Rust 2024, Axum 0.8, Tokio async runtime, compile-time SQL verification with sqlx, and Tower middleware.
Architecture rules for Astro server-side rendering, React client islands, Tailwind CSS, and Cloudflare Pages/Workers edge deployment.
Ultra-fast edge API architecture using Bun.serve(), Hono v4, Drizzle ORM with embedded SQLite / Turso libSQL, and Zod OpenAPI validation.
Modern cross-platform mobile architecture for Expo SDK 52, Expo Router v4 file-based routing, React Native, NativeWind v4, and TanStack Query.