Skip to content

feat: one-click public demo via ?try=demo URL parameter#100

Merged
victorsoriadrp merged 1 commit into
mainfrom
feat/demo-auto-login
Jun 28, 2026
Merged

feat: one-click public demo via ?try=demo URL parameter#100
victorsoriadrp merged 1 commit into
mainfrom
feat/demo-auto-login

Conversation

@victorsoriadrp

Copy link
Copy Markdown
Contributor

Summary

Removes friction from the public demo entry path. Visitors arriving from external surfaces (marketing site, README, LinkedIn, Reddit) land directly in the workspace list — no form to fill, no credentials to copy.

Changes

  • Login.svelte: in onMount, when demo mode is enabled and the URL carries ?try=demo (in either hash or search), auto-invoke loginAsDemo() and redirect to the home route. Existing sessions take priority — real users with an active session are sent to / before the demo branch runs.
  • website/index.html: the three "Live Demo" CTAs (nav link, hero banner, demo banner) now point at https://demo.archipulse.org/#/login?try=demo.
  • README.md: prominent brand-coloured "Try the live demo" badge added at the top of the badge block; all in-body demo links updated to the one-click URL.

Security notes

  • No new attack surface. Demo credentials are already public (shown on the login screen).
  • Existing CSRF/session protections from the manual login path apply unchanged.
  • Real users with active sessions are protected by the existing if (u) push('/') guard before any demo logic runs.
  • ?try=demo is a trigger string, not a secret.

Deploy note

The marketing site (Cloudflare Pages) and README update take effect on merge. The Login.svelte change requires the demo deployment (Railway) to rebuild the embedded SPA — confirm that auto-build is configured or trigger manually after merge.

Test plan

  • Cloudflare preview of website shows updated demo links
  • README badge renders correctly on GitHub
  • After demo redeploy: visiting https://demo.archipulse.org/#/login?try=demo lands directly on workspace list
  • Manual sign-in flow still works for real users (existing form unchanged)
  • Already-logged-in users hitting the demo URL stay logged in as themselves (not switched to demo)

Adds frictionless entry to the public demo from external surfaces
(marketing site, README, social posts) without removing the manual
sign-in path for real users.

- Login.svelte: on mount, if demo mode is enabled and the URL carries
  ?try=demo (in hash or search), auto-invoke loginAsDemo() and redirect
  to the home route. Existing sessions still take priority.
- website/index.html: the three 'Live Demo' CTAs (nav, hero banner,
  CTA section) now point at /#/login?try=demo.
- README.md: prominent brand-coloured 'Try the live demo' badge added
  at the top of the badge block; all in-body demo links updated to the
  one-click URL.

Note: requires the demo deployment to rebuild the embedded SPA to pick
up the Login.svelte change. Marketing site (Cloudflare Pages) and
README take effect on merge.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 28, 2026

Copy link
Copy Markdown

Deploying archipulse with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff7e56b
Status: ✅  Deploy successful!
Preview URL: https://f236b9fe.archipulse.pages.dev
Branch Preview URL: https://feat-demo-auto-login.archipulse.pages.dev

View logs

@victorsoriadrp victorsoriadrp merged commit fd2dfa3 into main Jun 28, 2026
2 checks passed
@victorsoriadrp victorsoriadrp deleted the feat/demo-auto-login branch June 28, 2026 01:26
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