Skip to content

Refactor config#1064

Merged
giurgiur99 merged 26 commits intomainfrom
refactor-config
Oct 20, 2025
Merged

Refactor config#1064
giurgiur99 merged 26 commits intomainfrom
refactor-config

Conversation

@giurgiur99
Copy link
Contributor

@giurgiur99 giurgiur99 commented Oct 7, 2025

Fixes #1065

Changes proposed in this PR:

  • Refactor config
  • Cleaner architecture
  • Rely on zod validations
  • Config.json first approach. If everything needed to be overwritten env vars can be used

Logic:
Load config.json → Parse JSON
Merge with env var overrides (using ENV_TO_CONFIG_MAPPING)
Preprocess legacy env vars (INTERFACES → hasHttp/hasP2P)
Validate with Zod schemas (types, ranges, URLs, business rules)
Post-process (set defaults, build C2D clusters)

@giurgiur99 giurgiur99 marked this pull request as ready for review October 8, 2025 10:20
Copy link
Member

@bogdanfazakas bogdanfazakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

# Conflicts:
#	src/components/core/compute/startCompute.ts
#	src/utils/config.ts
@giurgiur99 giurgiur99 merged commit 42549ce into main Oct 20, 2025
76 of 85 checks passed
@giurgiur99 giurgiur99 deleted the refactor-config branch October 20, 2025 12:16
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.

Refactor config files

4 participants