Skip to content

NEXT_PUBLIC_SITE_URL, read by sitemap.ts, is undocumented in both .env.example and README's environment variables table #256

Closed

Description

@chonilius

src/app/sitemap.ts reads a third environment variable that neither .env.example nor
README.md mentions:

const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://mergefi.app";

.env.example documents exactly two variables (NEXT_PUBLIC_API_URL,
NEXT_PUBLIC_STELLAR_NETWORK), both described at length with comments explaining their
validation and defaults. README.md's "Environment variables" table lists the same two,
with a sentence noting "Both variables are validated at build time." NEXT_PUBLIC_SITE_URL
appears in neither place.

Unlike the other two variables, this one isn't validated by src/lib/env.ts at all — it's
read directly via process.env in sitemap.ts with a silent fallback to
"https://mergefi.app". Any deployment of this frontend to a domain other than
mergefi.app (a fork, a staging environment, a different production domain) that doesn't
happen to discover this undocumented variable will silently generate a sitemap whose
every URL points at https://mergefi.app/... instead of the actual deployed domain,
with no build-time warning of any kind — contrasting sharply with how deliberately loud
this app's other env-var misconfigurations are designed to be (per env.ts's own stated
philosophy of failing builds rather than silently defaulting for consequential values).

Suggested fix: add NEXT_PUBLIC_SITE_URL to both .env.example (with a comment
explaining it drives sitemap.ts's URLs) and the README's environment variables
table.

Activity

  1. added
    documentation
    good first issue
    on Aug 21, 2026
  2. Timrossid commented on Aug 21, 2026

    @Timrossid

    Hi maintainer, I’ve reviewed this issue and I would love to work on this. I am confident that I will be able to resolve it neatly.

  3. Timrossid commented on Aug 21, 2026

    @Timrossid

    Hi maintainer, I’ve reviewed this issue and I would love to work on this. I am confident that I will be able to resolve it neatly.

  4. added
    bug
    help wanted
    on Aug 21, 2026
  5. added
    Stellar Wave
    on Aug 25, 2026
  6. Waffiyyi commented on Aug 25, 2026

    @Waffiyyi

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

    I would love to work on this issue. Please assign this to me.

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

  7. Sweet-Kid commented on Aug 25, 2026

    @Sweet-Kid
    Contributor

    @Sweet-Kid has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hello maintainer, I can handle this issue

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

  8. drips-wave commented on Aug 25, 2026

    @drips-wave

    Congratulations, @Sweet-Kid! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

    🧑‍💻 @Sweet-Kid: 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 🌊

  9. drips-wave commented on Aug 29, 2026

    @drips-wave

    This issue has been completed by @Sweet-Kid as part of the Stellar Wave Program's 8th Wave 🥳

    😎 @Sweet-Kid: You earned 200 Points for completing this issue! After the current Wave ends, 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.

  10. removed
    Stellar Wave
    on Oct 15, 2026
  11. added
    Stellar Wave
    on Oct 15, 2026
  12. removed
    Stellar Wave
    on Oct 15, 2026
  13. added
    Stellar Wave
    on Oct 15, 2026
  14. removed
    Stellar Wave
    on Oct 15, 2026
  15. added
    Stellar Wave
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar Wavebugdocumentationgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions