Skip to content

docs: enumerate all env vars the docs code reads in .env.example (closes #85) - #163

Merged
valoryyaa-byte merged 4 commits into
RWA-ToolKit:mainfrom
akindoyinabraham0-collab:fix/issue-85-env-example-sync
Jul 28, 2026
Merged

docs: enumerate all env vars the docs code reads in .env.example (closes #85)#163
valoryyaa-byte merged 4 commits into
RWA-ToolKit:mainfrom
akindoyinabraham0-collab:fix/issue-85-env-example-sync

Conversation

@akindoyinabraham0-collab

@akindoyinabraham0-collab akindoyinabraham0-collab commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Closes #85


Summary

  • docs/.env.example previously declared only NEXT_PUBLIC_API_BASE_URL, but docs/lib/site.ts also reads NEXT_PUBLIC_SITE_URL. Adds the missing entry with http://localhost:3000 as the local-dev default, falling back to the production URL (https://stellar-rwa-docs.vercel.app) per the existing inline ?? in the source.

Diff

+# Public site URL (sitemap.xml, OpenGraph, Twitter cards). Falls back to
+# https://stellar-rwa-docs.vercel.app when unset. See docs/lib/site.ts.
+NEXT_PUBLIC_SITE_URL=http://localhost:3000

Audit table (closed in this PR)

Env var Read in code In docs/.env.example now?
NEXT_PUBLIC_API_BASE_URL docs/app/docs/integration/page.mdx
NEXT_PUBLIC_SITE_URL docs/lib/site.ts:3 ✅ (this PR)

Sister file

api/.env.example is already complete after PR #161 — all 7 vars the api code reads (RWA_RPC_URL, RWA_REGISTRY_ID, RWA_DIVIDEND_ID, RWA_READ_SOURCE, PORT, RUST_LOG, LOG_FORMAT) are declared.

Buffy added 4 commits July 27, 2026 11:48
…pl + last_indexed_ledger)

main currently fails cargo check with 9 errors from PR RWA-ToolKit#122 feat/api-hardening:

- missing deps: metrics, metrics-exporter-prometheus, rand are imported in source but not declared in api/Cargo.toml

- arc-swap 1.9 API: ArcSwap::from_arc was removed (replaced by From<Arc<T>>)

- #[derive(Clone)] on AppState no longer works because ArcSwapAny does not impl Clone; wrap inner in Arc<ArcSwap<Snapshot>> so cloning shares inner cell

- (*guard).clone() in AppState::snapshot returned Arc<Snapshot> not Snapshot, double-deref (**guard) instead

- AppState::last_indexed_ledger never defined; routes::cache_headers called it

- PrometheusBuilder / PrometheusHandle types were undeclared; import them from metrics_exporter_prometheus

- pre-existing dead variable consecutive_failures in Indexer::run

Verified by running the same five gates api.yml runs: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test, and cargo build --release all exit 0, with 8 unit tests passing. Independent of fix/issue-86-tracing-log-format.
…it#85)

docs/lib/site.ts reads process.env.NEXT_PUBLIC_SITE_URL but docs/.env.example never declared it, leading to setup guesswork. Add the missing entry with localhost:3000 as the local-dev default and the existing fallback URL documented inline.
…oolKit#86)

- enable the json feature on tracing-subscriber

- read LOG_FORMAT env var in init_tracing (pretty | compact | json), selected at runtime via Box<dyn tracing_subscriber::Layer<_> + Send + Sync>

- bake LOG_FORMAT=json + RUST_LOG defaults into the runtime stage of the Dockerfile for log-shipper-ready containers; overridable via docker run -e

- document RUST_LOG and LOG_FORMAT in api/.env.example and README.md

Defaults are unchanged when LOG_FORMAT is unset, so this is fully backwards compatible.
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@akindoyinabraham0-collab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@valoryyaa-byte
valoryyaa-byte merged commit 0cc6a84 into RWA-ToolKit:main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repo: .env.example files should enumerate every variable the code reads

2 participants