A real-time monitoring dashboard for a DEMOS blockchain node, built with Svelte 4 and Vite.
| Tool | Version | Install |
|---|---|---|
| Node.js | ≥ 18 | https://nodejs.org or nvm |
| npm | ≥ 9 | bundled with Node.js |
git clone https://github.com/weudlll-cyber/demos-dashboard.git
cd demos-dashboard
npm install
npm run dev
Open http://localhost:5173.
The dev server automatically proxies /api → http://localhost:53550, so no CORS issues during development. The DEMOS node must be running locally. See docs/DEVELOPMENT.md for how to mock the API when no live node is available.
npm test # run all tests once
npm run test:watch # re-run on file changes
Tests use Vitest + happy-dom + @testing-library/svelte. No browser required.
npm run build # outputs compiled files to dist/
npm run preview # serve the production build locally at http://localhost:4173
See docs/VPS_SETUP.md for the full guide.
Three commands — once the repo is cloned on your VPS:
# First-time install — interactive, handles Node.js / nginx / build / deploy / HTTPS
bash scripts/install.sh
# After any code update
bash scripts/update.sh
The installer asks for your domain and email, then takes care of everything — including a free HTTPS certificate from Let's Encrypt if you want one.
demos-dashboard/
├── .github/
│ └── workflows/
│ └── ci.yml # GitHub Actions CI (test + build on every push/PR)
├── docs/
│ ├── VPS_SETUP.md # Full VPS deployment guide
│ └── DEVELOPMENT.md # Local development guide & API mocking
├── scripts/
│ ├── install.sh # VPS first-time installer
│ ├── update.sh # VPS updater (pull → build → deploy)
│ ├── nginx.conf # Nginx config template
│ └── demos-dashboard.service # Systemd unit file (optional vite preview service)
├── src/
│ ├── api.js # fetchNodeData() with error handling & timeout
│ ├── api.test.js # Unit tests for the API module
│ ├── App.svelte # Root component, polling logic
│ ├── main.js # Svelte entry point
│ ├── styles.css # Global dark theme, card grid, pills
│ ├── test-setup.js # Vitest global setup
│ └── components/
│ ├── NodeInfo.svelte
│ ├── NodeInfo.test.js # Component tests for NodeInfo
│ ├── SyncStatus.svelte
│ └── PeerList.svelte
├── index.html
├── package.json
├── vite.config.js
├── CHANGELOG.md
├── CONTRIBUTING.md
└── LICENSE
See CONTRIBUTING.md.
MIT © 2026