Document environment configuration with an .env.example
Description
The app reads NEXT_PUBLIC_STABLEROUTE_API_BASE in src/lib/apiClient.ts and src/app/quote/page.tsx and persists a stableroute.theme localStorage key in src/lib/theme.ts, but there is no .env.example and the README.md "Setup" section never mentions the API base — a fresh contributor has no idea the dashboard needs a backend URL. This issue documents the configuration surface.
Requirements and context
- Repository scope: StableRoute-Org/Stableroute-frontend only.
- Add an
.env.example documenting NEXT_PUBLIC_STABLEROUTE_API_BASE with a safe placeholder and a comment that it must be a full absolute URL (https in production).
- Add an "Environment" section to
README.md explaining the variable, its localhost default, and how to point the dashboard at a backend.
- Document the
stableroute.theme localStorage key (allowed values: light/dark/system) so contributors understand client persistence.
- Do not commit any real secret or production URL; placeholders only.
Suggested execution
- Fork the repo and create a branch
git checkout -b docs/config-24-env-example
- Implement changes
- Write code in: n/a (docs/config) — add
.env.example.
- Write comprehensive tests in: n/a — verify
npm run build still succeeds and the variable name matches the code.
- Add documentation: add the Environment section to
README.md.
- Ensure the documented variable name exactly matches
process.env.NEXT_PUBLIC_STABLEROUTE_API_BASE.
- Validate Markdown renders and no real values are committed.
- Test and commit
Test and commit
- Run
npm run lint and npm run build.
- Cover edge cases: variable name matches code, default documented, and no secrets committed.
- Include a rendered preview note in the PR description.
Example commit message
docs: add .env.example and document API base and theme key
Guidelines
- Minimum 95 percent test coverage for impacted modules.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the StableRoute community on Discord for questions, reviews, and faster merges: https://discord.gg/37aCpusvx
- ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.
Document environment configuration with an .env.example
Description
The app reads
NEXT_PUBLIC_STABLEROUTE_API_BASEinsrc/lib/apiClient.tsandsrc/app/quote/page.tsxand persists astableroute.themelocalStorage key insrc/lib/theme.ts, but there is no.env.exampleand theREADME.md"Setup" section never mentions the API base — a fresh contributor has no idea the dashboard needs a backend URL. This issue documents the configuration surface.Requirements and context
.env.exampledocumentingNEXT_PUBLIC_STABLEROUTE_API_BASEwith a safe placeholder and a comment that it must be a full absolute URL (https in production).README.mdexplaining the variable, its localhost default, and how to point the dashboard at a backend.stableroute.themelocalStorage key (allowed values: light/dark/system) so contributors understand client persistence.Suggested execution
git checkout -b docs/config-24-env-example.env.example.npm run buildstill succeeds and the variable name matches the code.README.md.process.env.NEXT_PUBLIC_STABLEROUTE_API_BASE.Test and commit
npm run lintandnpm run build.Example commit message
docs: add .env.example and document API base and theme keyGuidelines
Community & contribution rewards