refactor: migrate REACT_APP_ env vars to OPENSCAN_ prefix#353
Merged
AugustoL merged 1 commit intoopenscan-explorer:devfrom Apr 11, 2026
Merged
Conversation
Replace all REACT_APP_* environment variables with OPENSCAN_* prefix and use import.meta.env instead of process.env for runtime access. Add envPrefix: "OPENSCAN_" to Vite config so OPENSCAN_* vars are auto-exposed without manual define entries. Only computed defaults (COMMIT_HASH, VERSION, ENVIRONMENT) remain in the define map. Closes openscan-explorer#347
|
🚀 Preview: https://pr-353--openscan.netlify.app |
josealoha666
approved these changes
Apr 1, 2026
Collaborator
josealoha666
left a comment
There was a problem hiding this comment.
Looks good. The OPENSCAN_ prefix migration is consistent across app code, scripts, and docs, and the remaining define entries are just the computed defaults Vite still needs.
MatiasOS
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates all
REACT_APP_*environment variables toOPENSCAN_*prefix convention and replacesprocess.envaccess withimport.meta.env. AddsenvPrefix: "OPENSCAN_"to Vite config so env vars are auto-exposed without manualdefineentries.Related Issue
Closes #347
Type of Change
Changes Made
vite.config.ts: AddedenvPrefix: "OPENSCAN_". Reduceddefinemap from 6 entries to 3 (only computed defaults:OPENSCAN_COMMIT_HASH,OPENSCAN_VERSION,OPENSCAN_ENVIRONMENT). Removed manual entries forGITHUB_REPO,OPENSCAN_NETWORKS, andOPENSCAN_WORKER_URLsince Vite auto-exposes them.Footer.tsx,networks.ts,workerConfig.ts,constants.ts,subdomains.ts,home/index.tsx): Replacedprocess.env.REACT_APP_*/import.meta.env.VITE_*withimport.meta.env.OPENSCAN_*.build-production.sh,build-staging.sh,build-development.sh,run-test-env.sh): Updated env var names fromREACT_APP_*toOPENSCAN_*.README.md,.claude/rules/architecture.md,.claude/rules/commands.md): Updated all env var references.Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
No CI/CD workflow changes needed — GitHub Actions workflows don't reference these env vars directly.