From ff7e56b2e1fb3ab1343f88abf890cadec35b297e Mon Sep 17 00:00:00 2001
From: Victor Soria
Date: Sat, 27 Jun 2026 20:23:30 -0500
Subject: [PATCH] feat: one-click public demo via ?try=demo URL parameter
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.
---
README.md | 8 +++++---
cmd/archipulse/ui/src/routes/Login.svelte | 7 +++++++
website/index.html | 6 +++---
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index a2e05a1..a8f8191 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,8 @@
Built on ArchiMate · Powered by Go · PostgreSQL · Open Source
+[](https://demo.archipulse.org/#/login?try=demo)
+
[](https://github.com/DisruptiveWorks/archipulse/actions)
[](./LICENSE)
[](https://go.dev)
@@ -17,13 +19,13 @@ Built on ArchiMate · Powered by Go · PostgreSQL · Open Source
[](https://www.opengroup.org/archimate-forum)
[](./CONTRIBUTING.md)
-[Live Demo](https://demo.archipulse.org) · [Getting Started](#getting-started) · [Features](#features) · [How It Works](#how-it-works) · [Roadmap](#roadmap) · [Contributing](#contributing) · [Support](#support)
+[Live Demo](https://demo.archipulse.org/#/login?try=demo) · [Getting Started](#getting-started) · [Features](#features) · [How It Works](#how-it-works) · [Roadmap](#roadmap) · [Contributing](#contributing) · [Support](#support)
---
-> **Try it:** [demo.archipulse.org](https://demo.archipulse.org) — pre-loaded with the ArchiSurance example model. No sign-up required.
+> **Try it:** [demo.archipulse.org](https://demo.archipulse.org/#/login?try=demo) — pre-loaded with ArchiSurance and ArchiMetal example models. One click, no sign-up required.
---
@@ -129,7 +131,7 @@ flowchart TD
-> Demo video coming soon. In the meantime, try the [live demo](https://demo.archipulse.org) — no sign-up required.
+> Demo video coming soon. In the meantime, try the [live demo](https://demo.archipulse.org/#/login?try=demo) — one click, no sign-up required.
---
diff --git a/cmd/archipulse/ui/src/routes/Login.svelte b/cmd/archipulse/ui/src/routes/Login.svelte
index 3aadd82..85f267a 100644
--- a/cmd/archipulse/ui/src/routes/Login.svelte
+++ b/cmd/archipulse/ui/src/routes/Login.svelte
@@ -20,6 +20,13 @@
demoMode = cfg.demo_mode ?? false;
demoEmail = cfg.demo_email ?? '';
demoPassword = cfg.demo_password ?? '';
+
+ const hashParams = new URLSearchParams(window.location.hash.split('?')[1] || '');
+ const searchParams = new URLSearchParams(window.location.search);
+ const tryParam = hashParams.get('try') || searchParams.get('try');
+ if (demoMode && tryParam === 'demo') {
+ await loginAsDemo();
+ }
});
async function handleSubmit(e) {
diff --git a/website/index.html b/website/index.html
index 5ea617c..46e673b 100644
--- a/website/index.html
+++ b/website/index.html
@@ -565,7 +565,7 @@
-
+
Open Live Demo →