@davoodmehraban89 / VELYQOR / commits / 2528725
Fork 0

Intelligence, Advanced Charting & Trading Platform

docs: refresh Phase 1 execution ledger

davoodmehraban89 committed Oct 5, 2026 at 16:38 UTC 252872537d3371814d93e7beffb4f4c66cda98bb
1 file changed +34 -33
PROJECT_STATE.md
+34 -33
@@ -3,7 +3,7 @@
3 Last updated: 2026-10-05
4
5 ## Current phase
6 -Phase 1 — Market Domain & Data Proof started. Phase 0 PostgreSQL foundation is merged.
6 +Phase 1 — Market Data Integrity & Data Proof.
7
8 ## Product scope locked for MVP
9 - Iran free-market USD/IRT
@@ -16,49 +16,50 @@ Phase 1 — Market Domain & Data Proof started. Phase 0 PostgreSQL foundation is
16 ## Architecture baseline
17 - Modular monolith for MVP, with independently schedulable ingestion workers.
18 - TypeScript/React/Next.js web application.
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.
19 +- PostgreSQL is the canonical database contract; hosting is replaceable through `DATABASE_URL`.
20 +- Cloudflare is edge/runtime/cache/protection. Hyperdrive is configured only after a reachable PostgreSQL endpoint exists.
21 - Provider adapters feed immutable raw observations, normalization, quality gates, candle construction, and derived-series calculation.
22 - UTC canonical storage; Asia/Tehran presentation.
25 -- No UI timeframe may imply precision not supported by source data.
23 +- No UI timeframe may imply precision not supported by observed source cadence.
24
25 ## Completed
28 -- Independent private GitHub repository established.
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.
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.
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.
26 +- Phase 0 foundation and provider-neutral PostgreSQL schema merged.
27 +- Canonical instruments, raw observations, ticks, candles, derived values, quality events, workspaces and drawings schema defined.
28 - Deterministic theoretical 18K gold and premium calculations implemented.
38 -- Source timestamp alignment and staleness semantics implemented.
39 -- Provider normalization contract implemented, including IRR-to-IRT conversion and refusal to guess unsupported units.
40 -- Provider health contract implemented.
41 -- Deterministic market-data quality classification implemented for GOOD / DEGRADED / STALE / INVALID.
42 -- CI floating-point assertion defect was identified from workflow logs and corrected with tolerance-based numeric assertions.
29 +- Timestamp alignment, staleness, provider normalization and provider health implemented.
30 +- GOOD / DEGRADED / STALE / INVALID quality classification implemented.
31 +- Provider-neutral ingestion and derived-gold pipeline implemented.
32 +- Navasan adapters implemented for USD_IRT_FREE and GOLD18_IRT, including IRR→IRT normalization and historical daily OHLC parsing.
33 +- Alpha Vantage XAU/USD spot adapter implemented.
34 +- Data Proof metrics implemented for cadence, gaps, duplicates and out-of-order observations.
35 +- Provider source matrix documented.
36 +- Render Free PostgreSQL was tested and rejected because provisioning required payment credentials.
37
38 ## In progress
45 -- Phase 1 provider research/data proof for USD/IRT, GOLD18/IRT and XAU/USD.
39 +- Deterministic multi-timeframe candle builder with no synthetic gap filling.
40 +- Numeric quality scoring and propagation into candles/derived data.
41 +- Live Data Proof for USD_IRT_FREE, GOLD18_IRT and XAU_USD.
42 - Managed PostgreSQL provisioning on a no-card free provider.
47 -- Provider-specific adapters only after legal/technical source suitability is documented.
48 -- Integration of quality state with ingestion/candle pipeline.
43 +- Secondary legally usable Iranian source research for cross-check/failover.
44
50 -## External blocker
51 -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.
45 +## External blockers
46 +1. No live VELYQOR PostgreSQL endpoint is connected, so production-like migration/invariant execution and Hyperdrive binding cannot yet be completed.
47 +2. Live provider credentials are not connected to the runtime, so real cadence/quota/freshness measurements cannot yet be completed.
48 +
49 +## Phase 1 exit gates
50 +1. PostgreSQL migrations and invariants execute successfully against a live reachable PostgreSQL instance.
51 +2. USD_IRT_FREE, GOLD18_IRT and XAU_USD each have a live tested ingestion path.
52 +3. Observed cadence, latency, gaps, duplicates, out-of-order behavior and failure/recovery are recorded for each source.
53 +4. Candle construction is deterministic and never invents missing observations.
54 +5. Quality state/score propagates into candles and derived values.
55 +6. At least one secondary legally usable reference is identified for Iranian market cross-check, or the lack of one is explicitly accepted as a launch risk.
56 +7. Secrets are runtime-only and absent from the repository.
57 +8. CI is green for all Phase 1 domain behavior.
58
59 ## Risks
54 -- Iranian market-data provider licensing, timestamp quality, anti-bot restrictions, history and reliability.
55 -- UI timeframes must reflect actual observation frequency; synthetic precision is prohibited.
56 -- XAU/USD and USD/IRT source timestamps require explicit alignment/staleness thresholds.
60 +- Iranian market-data licensing, timestamp quality, anti-bot restrictions, history and reliability.
61 +- Free source cadence may be insufficient for intraday timeframes; unsupported timeframes must stay disabled.
62 - Free database hosting is temporary infrastructure and must not become a product dependency.
63
64 ## Next checkpoint
60 -1. Get Phase 1 domain/provider contract CI green and merge.
61 -2. Complete provider source matrix and select primary/secondary candidates for each canonical symbol.
62 -3. Connect Aiven or another no-card PostgreSQL endpoint and execute migrations/invariants.
63 -4. Configure Cloudflare Hyperdrive only after a real PostgreSQL endpoint exists.
64 -5. Start chart application shell after Data Proof gates are satisfied.
65 +Finish all non-external Phase 1 gates, then execute live PostgreSQL and provider Data Proof immediately when runtime credentials/endpoints are available.