Skip to content

feat(site): Live Demo — the real console, mocked, in the browser - #669

Merged
Timur Tukaev (tym83) merged 3 commits into
mainfrom
feat/live-demo
Aug 30, 2026
Merged

feat(site): Live Demo — the real console, mocked, in the browser#669
Timur Tukaev (tym83) merged 3 commits into
mainfrom
feat/live-demo

Conversation

@tym83

Copy link
Copy Markdown
Contributor

Summary

Adds a Live Demo — the real cozystack-ui console running entirely in the browser, so a visitor can explore the actual marketplace and console without a cluster, signup, or install.

  • /demo — the real SPA with a mocked Kubernetes API (MSW). Fixtures are captured from a live cluster: 27 catalog apps (ApplicationDefinition), demo instances, node metrics. It's the actual UI, just with demo data — not screenshots or a scripted tour.
  • Home page — a promo block after the screenshot gallery: "See the console before you install anything" → links to /demo/.
  • Top menu — a Live Demo entry (weight 15, between GitHub and Community).

How the mock works

The mock layer lives in cozystack-ui behind VITE_DEMO=1: a single MSW router intercepts every fetch in k8s-client and serves fixtures. No backend, no auth. Built to static and vendored here under static/demo.

Follow-ups (not blocking a look)

  • Land the demo-mode source in cozystack-ui so CI reproduces the build instead of vendoring the artifact.
  • Deep-link/refresh on /demo/<subpath> falls through to the site 404 on GitHub Pages (SPA from a subpath). Entering at /demo/ works; a hash-router or SPA-fallback is the fix.
  • Console/instance/metrics screens beyond the catalog need a mock pass.

Adds a /demo section: the actual cozystack-ui SPA running entirely
client-side with MSW-mocked Kubernetes API, so visitors can browse the
real marketplace and console without a cluster, signup, or install.
Data fixtures are captured from a live cluster (27 catalog apps + demo
instances), so it looks real rather than invented.

Also adds a Live Demo top-menu entry (weight 15) and a promo block on
the home page linking to it.

The mock layer lives in cozystack-ui behind VITE_DEMO=1; the built
static output is vendored here under static/demo. A follow-up PR should
land the demo-mode source in cozystack-ui so CI can reproduce the build.

Known limitation: deep links / refresh on /demo/<subpath> fall through
to the site 404 on GitHub Pages (SPA served from a subpath). Entering at
/demo/ works; a hash-router or SPA-fallback is the follow-up.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: tym83 <6355522@gmail.com>
@netlify

netlify Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit d569cfa
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6a93f0154db6580008001290
😎 Deploy Preview https://deploy-preview-669--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e0e82a5-4e8e-4099-9de8-ea09a5c651a7


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Mock every k8s route the console actually calls so no sidebar link or form
lands on a broken page: namespaced backup resources, tenant modules, cluster
tenants and resource quotas, CRD schemas for the backup create/edit forms,
and the form option source that drives every dropdown (storage class, image,
instance type, backup class). Add fieldSelector filtering so the External IPs
page only lists load balancers.

Serve the SPA under its base path by setting the router basename from
BASE_URL, so deep links and in-app navigation keep the /demo/ prefix instead
of escaping to the site root.

Replace the captured tenant secrets, node addresses and storage endpoint with
demo placeholders. The fixtures were snapshotted from a live cluster and still
carried real credentials (S3 keys, a service-account token, a kubeconfig,
database passwords) and public node IPs; none of that should ship in a public
demo bundle.

Signed-off-by: tym83 <6355522@gmail.com>
The Admin capacity screens query the cozystack "info" module
(apps.cozystack.io/infos/info); it was unmocked and 404'd. Add a handler
serving a captured Info snapshot. Caught by the new demo smoke check.

Signed-off-by: tym83 <6355522@gmail.com>
@tym83
Timur Tukaev (tym83) merged commit 87f784a into main Aug 30, 2026
6 of 7 checks passed
@tym83
Timur Tukaev (tym83) deleted the feat/live-demo branch August 30, 2026 09:45
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