Skip to content

feat(demo): env-gated demo-mode banner#244

Merged
parth0025 merged 1 commit into
stagingfrom
feat/demo-mode-banner
Jun 16, 2026
Merged

feat(demo): env-gated demo-mode banner#244
parth0025 merged 1 commit into
stagingfrom
feat/demo-mode-banner

Conversation

@parth0025

Copy link
Copy Markdown
Collaborator

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=true on the server:

  • the public, pre-auth brand-settings endpoint (/api/v1/getBrandSettingsData) returns demoMode plus the shared demoEmail / demoPassword;
  • a thin top banner appears app-wide and on the login page: the demo notice, the demo login creds, a ⭐ Star on GitHub link, and a Deploy your own link.

Inert by default: with DEMO_MODE unset, the flag is false, the banner renders nothing, and no credentials are exposed β€” zero impact on real deployments.

  • DemoBanner.vue is self-contained (reads the brand-settings store reactively, so it appears once settings load), registered globally before app.mount so the root App.vue resolves it.
  • Env vars documented in .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

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>
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 18bc4cfd-99e0-4720-9aaf-87f5bc33f6df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/demo-mode-banner

Comment @coderabbitai help to get the list of available commands and usage tips.

@parth0025 parth0025 merged commit b9a26c4 into staging Jun 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant