Internal ID: #38
Imported from ISSUES.md via scripts/import-issues.mjs.
Problem Statement. Three sources of truth about the backend port:
backend/src/auth/auth.http declares @baseUrl = http://localhost:4000.
frontend/store/useGameStore.js hardcodes http://localhost:4001.
README.md says "API → localhost:3001".
This is incoherent. Contributors cannot tell which port to use.
Expected Outcome. One source: .env exposes PORT, BACKEND_URL, FRONTEND_URL. Apps read from env.
Acceptance Criteria.
- README, .http files, store all reference
process.env.NEXT_PUBLIC_API_URL.
Implementation Notes.
- Add
NEXT_PUBLIC_API_URL to frontend/.env.example.
- Replace
localhost:4001 in useGameStore.js.
Files / modules affected.
frontend/store/useGameStore.js
frontend/store/reward/nft-reward-store.js
backend/src/auth/auth.http
README.md
Dependencies. None.
Difficulty / Effort. Easy / S (≈ 2 hours).
Labels. area:backend, area:frontend, developer-experience
Problem Statement. Three sources of truth about the backend port:
backend/src/auth/auth.httpdeclares@baseUrl = http://localhost:4000.frontend/store/useGameStore.jshardcodeshttp://localhost:4001.README.mdsays"API → localhost:3001".This is incoherent. Contributors cannot tell which port to use.
Expected Outcome. One source:
.envexposesPORT,BACKEND_URL,FRONTEND_URL. Apps read from env.Acceptance Criteria.
process.env.NEXT_PUBLIC_API_URL.Implementation Notes.
NEXT_PUBLIC_API_URLtofrontend/.env.example.localhost:4001inuseGameStore.js.Files / modules affected.
frontend/store/useGameStore.jsfrontend/store/reward/nft-reward-store.jsbackend/src/auth/auth.httpREADME.mdDependencies. None.
Difficulty / Effort. Easy / S (≈ 2 hours).
Labels.
area:backend,area:frontend,developer-experience