Skip to content

feat(frontend): add env-based api and contract config#53

Merged
joelpeace48-cell merged 4 commits intoFinesseStudioLab:mainfrom
ACOB-DEV:codex/issue-45-env-config
Apr 5, 2026
Merged

feat(frontend): add env-based api and contract config#53
joelpeace48-cell merged 4 commits intoFinesseStudioLab:mainfrom
ACOB-DEV:codex/issue-45-env-config

Conversation

@ACOB-DEV
Copy link
Copy Markdown
Contributor

@ACOB-DEV ACOB-DEV commented Mar 24, 2026

Description

Centralize frontend API and Soroban configuration behind Vite env variables so deployments can change backend targets and optional rewards/campaign contract IDs without editing source files.
Closes #45 #32

Changes proposed

What were you told to do?

Read the API base URL and optional rewards/campaign contract IDs from VITE_* env values, use them for frontend fetch and Soroban wiring, and document the setup in the frontend README.

What did I do?

Shared frontend config

  • added a frontend config module that reads VITE_API_URL, VITE_SOROBAN_RPC_URL, VITE_REWARDS_CONTRACT_ID, and VITE_CAMPAIGN_CONTRACT_ID
  • exposed helpers for API URL building, Soroban RPC server creation, and rewards/campaign contract construction

Frontend wiring and docs

  • updated the landing page campaigns fetch to use the shared API URL helper
  • surfaced the active API/RPC/contract configuration in the landing page to make deployment wiring visible
  • documented the supported frontend env variables and usage in the frontend README

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the main branch (left side).
  • My commit messages styles matches our requested structure.
  • My code additions will fail neither code linting checks nor unit test.
  • I am only making changes to files I was requested to.

Screenshots / Testing Evidence

Validated with npm run build --workspace=frontend. The frontend builds successfully with the shared config module and env-driven API/contract wiring in place.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

@ACOB-DEV is attempting to deploy a commit to the joelpeace48-cell's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 24, 2026

@ACOB-DEV 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

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
trivela-frontend Ready Ready Preview, Comment Mar 24, 2026 11:46pm

@joelpeace48-cell
Copy link
Copy Markdown
Contributor

Please fix conflicts @ACOB-DEV

# Conflicts:
#	frontend/README.md
#	frontend/src/Landing.jsx
@ACOB-DEV ACOB-DEV force-pushed the codex/issue-45-env-config branch from e3e899a to 685d466 Compare March 25, 2026 03:16
@ACOB-DEV
Copy link
Copy Markdown
Contributor Author

@joelpeace48-cell done.

@ACOB-DEV
Copy link
Copy Markdown
Contributor Author

@joelpeace48-cell kindly review and merge

@joelpeace48-cell joelpeace48-cell merged commit ebdac8c into FinesseStudioLab:main Apr 5, 2026
1 of 2 checks passed
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.

Add env-based API URL and contract IDs

2 participants