Reorganize repo structure and standards references

This commit is contained in:
david committed 2026-06-29 05:03:42 +02:00
1 parent 3cb93a81be
commit be2054274d
5885 files changed
+2588 -195

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 };