feat(demo): env-gated demo-mode banner#244
Merged
Merged
Conversation
When DEMO_MODE=true on the server, the public brand-settings endpoint returns demoMode plus the shared demo credentials, and a thin top banner appears app-wide (and on the login page) showing the demo notice, the demo login, a Star-on-GitHub link, and a Deploy-your-own link. Fully off by default - with DEMO_MODE unset the flag is false, the banner renders nothing, and no credentials are exposed, so it is inert in real deployments. Closes the code portion of the S0-03 demo-instance task. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the βοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Comment |
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
S0-03 (code portion) β env-gated demo-mode banner
The demo VPS is already live (demo.alianhub.com); this adds the in-app code part of S0-03.
When
DEMO_MODE=trueon the server:/api/v1/getBrandSettingsData) returnsdemoModeplus the shareddemoEmail/demoPassword;Inert by default: with
DEMO_MODEunset, the flag isfalse, the banner renders nothing, and no credentials are exposed β zero impact on real deployments.DemoBanner.vueis self-contained (reads the brand-settings store reactively, so it appears once settings load), registered globally beforeapp.mountso the rootApp.vueresolves it..env.example(DEMO_MODE,DEMO_EMAIL,DEMO_PASSWORD).To activate on the demo server: set those three env vars (on a throwaway demo DB) and rebuild/restart.
Note: login auto-prefill was intentionally left out (Login.vue has no store access + brand settings load async) β the banner shows the creds instead. Prefill can be a small follow-up.
Verification
ESLint clean; controller runtime-parses; full jest suite passes.
π€ Generated with Claude Code