Skip to content

Frontend API base URL defaults to an empty string and no .env.example documents the required variables #1985

Closed

Description

@yusuftomilola

Problem

lib/auth-api.ts uses process.env.NEXT_PUBLIC_API_URL ?? "", so without it requests go to the Next.js origin and 404. The variables the app reads (NEXT_PUBLIC_API_URL, NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_SENTRY_*, NEXT_PUBLIC_GOOGLE_VERIFICATION, JWT_SECRET for middleware, ANALYZE) are not listed anywhere, there is no frontend/.env.example, and CI points NEXT_PUBLIC_API_URL at http://localhost:3001 while the backend defaults to port 6000.

Proposed change

Add .env.example, validate env once in lib/env.ts (Zod) with a clear startup error, default the API URL to http://localhost:6000 in development, and align CI and the README with the same port.

Acceptance criteria

  • A clean clone runs against a local backend after copying .env.example.

Activity

  1. memplethee-lab commented on Oct 17, 2026

    @memplethee-lab
    Contributor

    @memplethee-lab has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maintainer,

    I’m a full-stack developer, and I’d like to contribute to the task. I’ll implement it carefully and efficiently thoroughly understand requirements and edge cases
    Communicate promptly about suggestions or improvements. And I will provide regular progress updates and address blockers
    Align with project goals through feedback and clarification.

    Thank you,

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @memplethee-lab to this issue.

  2. S4V10N commented on Oct 17, 2026

    @S4V10N

    @S4V10N has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello I’m experienced in technical writing and documentation, and I produce clear, accurate, and well-structured Markdown docs for APIs, components, and contributor guides.
    I can start immediately and will open a draft PR within 24–48 hours after assignment. I’m also available to take on additional documentation tasks in this repo to help improve clarity and onboarding.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @S4V10N to this issue.

  3. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @memplethee-lab! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @memplethee-lab: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. added a commit that references this issue on Oct 18, 2026
    2352775
  5. grantfox-oss commented on Oct 18, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @memplethee-lab's PR #2050 was approved and merged by @yusuftomilola.

    🏆 @memplethee-lab: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,705 total points). Track your full progress on GrantFox.

    👏 Great work, @memplethee-lab! Keep contributing to DistinctCodes.

  6. drips-wave commented on Oct 18, 2026

    @drips-wave

    This issue has been completed by @memplethee-lab as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @memplethee-lab: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions