concord-demo
Standalone static demo — runs entirely in the browser with no server
How It Works
concord-demo/build.py copies concord-server/.../static/ verbatim into the site, copies
the unmodified server index.html, and injects a few demo-only scripts just before the app's modules.
There is no demo-specific index.html or app.js, so the demo cannot drift from the server UI:
any change to the server frontend appears in the demo on the next deploy.
The injected scripts replace the backend. demo_api.js patches window.fetch() for
/api/* and answers from synthetic data; demo_dataset.js also replaces
EventSource for /api/bids/download to simulate the cloud download.
The Visitor Walkthrough
- The browser opens at
/demo/datasetsand lists the Concord Demo Dataset (6 synthetic subjects). - Subject Detail, sessions and recordings behave as on the server. DEMO01 starts as local; the others are cloud.
- Clicking a cloud recording opens the download dialog. The simulated download streams progress lines, then the subject flips to local (remembered in
localStorage). - Opening a local recording generates its signals (Wendling model, ~1–2 s) and opens the full viewer: time series, PSD, spectrogram, metrics, 3D brain, montages, notch filter, layouts.
- Settings → Server explains there is no server to configure.
- On a phone or tablet (a viewport under 900 px wide, or a touch-only device) the demo shows a full-screen notice asking the visitor to open it in a desktop browser, with a copy-link button.
- The footer says who built the demo and links to Montage Neuroscience; "About this demo" explains what the visitor is looking at, maps each thing to try onto the consulting service it demonstrates, and says which services are not shown.
File Structure
concord-demo/
build.py Builds the site (also: --serve PORT to preview locally)
demo_api.js Mock concord-server API (fetch patch) for the currently open recording
demo_dataset.js Virtual BIDS dataset, download state, simulated download (EventSource)
demo_signals.js Synthetic SEEG generator (electrode layouts, Wendling regimes, pink noise)
demo_ui.js Footer and "About this demo" dialog (the only UI additions)
synth.js, dsp.js Wendling model port; Welch PSD, spectrogram, band power
CNAME GitHub Pages custom domain
measure_amplitudes.js Node script for tuning channel amplitudes
Synthetic Data
- Each subject has an electrode layout (bilateral amygdala, left temporal, bilateral hippocampus), seizure-onset contacts and an onset time.
- Recordings are 30 s at 500 Hz. Interictal runs are all background; ictal runs switch the seizure-onset contacts to a spike-wave regime at the onset time and add a seizure annotation.
- Signals are deterministic (seeded per subject and run), so the same recording always looks the same.
Build and Preview
# From the project root (stdlib only, no install needed):
python concord-demo/build.py --serve 8001 # then open http://127.0.0.1:8001/
Deployment
.github/workflows/deploy-demo.yml runs on pushes to main that touch the server frontend,
concord-demo/ or docs/. It builds the site and force-pushes it to the public
ewiverson/concord-demo repository (the main repo is private) using a write-enabled SSH deploy key
stored as the DEMO_DEPLOY_KEY secret. GitHub Pages serves that repo at the custom domain in CNAME
(concord.montageneuroscience.com). This documentation site ships under /docs of the same build.