@davoodmehraban89 / VELYQOR / commits / 5c1d91e
Fork 0

Intelligence, Advanced Charting & Trading Platform

docs: make managed PostgreSQL hosting replaceable

davoodmehraban89 committed Oct 5, 2026 at 10:21 UTC 5c1d91ed9ee830527f3f7d87f0c425e948d6398e
1 file changed +21
docs/architecture/ADR-0003-managed-postgres-hosting.md new
+21
@@ -0,0 +1,21 @@
1 +# ADR-0003: Managed PostgreSQL Hosting Is Replaceable Infrastructure
2 +
3 +Status: Accepted
4 +Date: 2026-10-05
5 +
6 +## Context
7 +VELYQOR requires PostgreSQL, but the initial project must avoid foreign-payment dependencies. Supabase project capacity is constrained, Neon actions are not exposed in the current execution environment, and Render Free provisioning was observed to require payment credentials.
8 +
9 +## Decision
10 +- The product depends on PostgreSQL, not on a PostgreSQL hosting vendor.
11 +- Runtime configuration exposes the database only as `DATABASE_URL` plus non-secret connection policy settings.
12 +- Aiven Free PostgreSQL is the current initial hosting target if it can be provisioned without payment credentials.
13 +- Hosting-provider SDKs, proprietary auth, proprietary realtime, and provider-specific SQL are prohibited from the core market domain.
14 +- Cloudflare Hyperdrive may be introduced as a connection/edge optimization layer after a reachable PostgreSQL endpoint exists.
15 +- Migrations remain plain PostgreSQL and versioned in the repository.
16 +
17 +## Portability gate
18 +Changing the managed PostgreSQL provider must not require changes to market symbols, pricing formulas, candle semantics, data-quality rules, or chart contracts.
19 +
20 +## Consequences
21 +Aiven, Neon, Supabase, Render, Railway, a VPS, or a future dedicated PostgreSQL cluster can be substituted without rewriting the product domain. Provider-specific operational configuration stays outside the domain layer.