Skip to content

Centralize API configuration and eliminate environment drift across frontend calls #523

Description

@grantfox-oss

Standardize API base resolution and runtime config to prevent mismatches between demo, local, and production requests, especially for profile and marketplace flows.

  • Affected files: app/frontend/src/lib/api.ts, app/frontend/src/app/page.tsx, app/frontend/src/app/[username]/page.tsx, app/frontend/src/hooks/providers/productionMarketplaceProvider.ts, app/frontend/src/hooks/providers/productionRealtimeProvider.ts, app/frontend/src/hooks/marketplaceApi.ts, app/frontend/src/hooks/analyticsApi.ts, app/frontend/src/app/layout.tsx, app/frontend/src/app/pay/page.tsx
  • Acceptance criteria:
    • A single source of truth resolves backend and wallet endpoints consistently across environments.
    • Runtime requests fail with a clear error and safe fallback when the API base is misconfigured.
    • Browser and SSR code paths avoid mismatched fetch behavior and stale env assumptions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignbugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions