@davoodmehraban89 / VELYQOR / commits / c429543
Fork 0

Intelligence, Advanced Charting & Trading Platform

docs: update architecture for provider-neutral PostgreSQL

davoodmehraban89 committed Oct 5, 2026 at 10:21 UTC c429543041291cda0f6e497e0594273288544f6d
1 file changed +24 -20
PROJECT_STATE.md
+24 -20
@@ -3,7 +3,7 @@
3 Last updated: 2026-10-05
4
5 ## Current phase
6 -Phase 0 — Foundation & Governance; PostgreSQL core implementation in progress.
6 +Phase 1 — Market Domain & Data Proof started. Phase 0 PostgreSQL foundation is merged.
7
8 ## Product scope locked for MVP
9 - Iran free-market USD/IRT
@@ -14,41 +14,45 @@ Phase 0 — Foundation & Governance; PostgreSQL core implementation in progress.
14 - Professional charting, drawing tools, technical indicators, overlays, and persistent user workspaces
15
16 ## Architecture baseline
17 -- Modular monolith for the MVP.
17 +- Modular monolith for MVP, with independently schedulable ingestion workers.
18 - TypeScript/React/Next.js web application.
19 -- PostgreSQL is the canonical datastore; hosting is provider-portable through `DATABASE_URL`.
20 -- Neon is the preferred initial managed PostgreSQL provider, but is not a domain dependency.
21 -- Cloudflare is edge/runtime/cache/protection; Hyperdrive may front PostgreSQL after credentials exist.
19 +- PostgreSQL is the only canonical database contract. Hosting provider is replaceable through `DATABASE_URL`.
20 +- Initial hosting target is Aiven Free PostgreSQL if it can be provisioned without payment credentials; Aiven is infrastructure only, never a domain dependency.
21 +- Supabase, Neon, Render and Railway are not architectural dependencies. They remain replaceable hosting alternatives.
22 +- Cloudflare is edge/runtime/cache/protection. Hyperdrive can front any compatible reachable PostgreSQL once credentials exist.
23 - Provider adapters feed immutable raw observations, normalization, quality gates, candle construction, and derived-series calculation.
24 - UTC canonical storage; Asia/Tehran presentation.
25 +- No UI timeframe may imply precision not supported by source data.
26
27 ## Completed
28 - Independent private GitHub repository established.
27 -- Phase 0 foundation PR passed CI and was merged to `main`.
29 +- Phase 0 foundation merged to `main` with green CI.
30 +- Provider-neutral PostgreSQL market core merged to `main` with green CI.
31 - Engineering rules, Definition of Done, architecture baseline and canonical market contracts established.
29 -- PostgreSQL portability decision recorded in ADR-0002.
30 -- Initial PostgreSQL migrations created for instruments, providers, raw observations, normalized ticks, candles, derived values, data-quality events, users, workspaces and drawings.
32 +- PostgreSQL migrations exist for instruments, providers, raw observations, normalized ticks, candles, derived values, data-quality events, users, workspaces and drawings.
33 - Six canonical MVP instruments are seeded.
32 -- Database invariant test added for canonical instruments and invalid OHLC rejection.
33 -- Cloudflare account connection verified; Hyperdrive API is available and currently has no configurations.
34 -- Neon plugin is installed in the ChatGPT environment, but its operational actions are not exposed in this conversation yet.
34 +- Database invariant test exists for canonical instruments and invalid OHLC rejection.
35 +- Cloudflare account connection verified.
36 +- Render Free PostgreSQL was tested and rejected for the current zero-cost constraint because provisioning required payment credentials.
37
38 ## In progress
37 -- Provisioning a managed PostgreSQL database for VELYQOR.
38 -- Applying and executing database migrations/invariant tests against a real PostgreSQL instance.
39 -- Cloudflare Hyperdrive configuration after PostgreSQL credentials exist.
40 -- Phase 1 provider research/data proof.
39 +- Phase 1 market-domain implementation independent of a live hosting provider.
40 +- Managed PostgreSQL provisioning on a no-card free provider.
41 +- Provider research/data proof for USD/IRT, GOLD18/IRT and XAU/USD.
42 +- Data quality, source alignment, theoretical-gold and premium engines.
43
44 ## External blocker
43 -A live PostgreSQL instance has not yet been provisioned/connected in this conversation. Until a database connection is available, migrations cannot truthfully be reported as executed. Neon is the selected initial provider; the schema itself remains portable PostgreSQL.
45 +A live VELYQOR PostgreSQL endpoint is not yet connected. This blocks executing migrations against production-like infrastructure, but it does not block domain implementation, deterministic tests, provider research, or application scaffolding.
46
47 ## Risks
48 - Iranian market-data provider licensing, timestamp quality, anti-bot restrictions, history and reliability.
49 - UI timeframes must reflect actual observation frequency; synthetic precision is prohibited.
50 - XAU/USD and USD/IRT source timestamps require explicit alignment/staleness thresholds.
51 +- Free database hosting is temporary infrastructure and must not become a product dependency.
52
53 ## Next checkpoint
51 -1. Provision/connect VELYQOR PostgreSQL.
52 -2. Execute migrations and invariant tests.
53 -3. Create Cloudflare Hyperdrive against the database.
54 -4. Start Phase 1 provider adapters and data-quality proof.
54 +1. Implement deterministic market-domain calculations and tests.
55 +2. Complete provider research and source contracts.
56 +3. Connect Aiven or another no-card PostgreSQL endpoint and execute migrations/invariants.
57 +4. Configure Cloudflare Hyperdrive only after a real PostgreSQL endpoint exists.
58 +5. Start chart application shell after Data Proof gates are satisfied.