Repository navigation
feat(web): demo mode with sample data - #17
Merged
Merged
Conversation
A demo build of the real web app that runs entirely in the browser, so anyone can try Raidy without signing in or a server. - `npm run build:demo` builds the app for /demo/ with an in-memory backend. It follows the server's rules (omitted dates become unavailable, confirmed dates need everyone, a new raid time moves open dates) and resets on reload. The normal build excludes it entirely. - Sample static "The Echo" with this week's and next week's voting open; dates follow today, so the demo never looks stale. - A banner marks the demo; team URLs now respect the build's base path. - Adds a favicon, which the app was missing. Release v0.0.16.
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.
Summary
A demo build of the real web app that runs entirely in the browser, so anyone can try Raidy without signing in or a server. This is the first step towards the product page with a live demo.
npm run build:demobuilds the app for/demo/. In demo mode,api()hands every call to an in-memory backend (web/src/demo/backend.ts) that follows the server's rules:State resets on reload. The normal build excludes the demo code entirely; I checked that the production bundle has none of it.
Sample static "The Echo" (
web/src/demo/data.ts) has this week's and next week's voting open. Dates follow today, so the demo never looks stale.A banner marks the demo. Team URLs now respect the build's base path (
teamURLinweb/src/lib/paths.ts).A favicon, which the app was missing; the browser's automatic request for one returned a 404.
Release v0.0.16.
Tests
A new Playwright
demoproject runs on the demo build with every real/api/**request blocked, and a fixed clock. It covers:npm run check,format:check,build,build:demo, and the full Playwright suite (28 passed) all pass locally.