Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,17 @@
import { getDbClient, getReadDbClient } from "@toolctrl/db/client.server";
const db = getDbClient();
/**
* Read-replica accessor for hot-read paths (CRM/KB listings, dashboards,
* public sites/portals, analytics aggregations). Falls back to the write
* singleton when `DATABASE_READ_URL` is unset, so single-DB dev / self-
* hosted setups keep working unchanged. Do NOT use right after a write
* inside the same request — replication is eventually consistent.
*
* See `docs/architecture/rw-split.md` for the convention table and the
* read-after-write hazard discussion.
*/
const dbRead = getReadDbClient();
export { db, dbRead };