- Node.js >= 21.1.0 (the project is regularly tested with the latest LTS release).
- Yarn >= 4.5.0 – the repo uses the lock-file generated by Yarn.
You can install Yarn globally with:
corepack enable
yarn set version stableWhy Yarn? Vite's blazing-fast dev server combined with Yarn's parallel installation makes the feedback loop as short as possible. Using the same package-manager across the team also guarantees reproducible installs thanks to
yarn.lock.
git clone https://github.com/silicakes/deluge-extensions.git # or your fork
cd deluge-extensionsyarn installAll required packages (production & dev) will be pulled as defined in package.json.
yarn devThis command starts the Vite dev-server with hot-module-replacement (HMR). By default you can open
http://localhost:5173
in your browser. Any file save will trigger an instant refresh.
If port 5173 is taken Vite will pick the next free port and print it to the console.
Screen streaming uses a WebSocket relay. For local dev we provide a dependency-free Node relay that speaks the same protocol as the Cloudflare Durable Object.
Terminal A (relay):
node server.mjsTerminal B (frontend):
yarn dev --hostThen:
- On the desktop (streamer), open DEx and click Screen streaming.
- Use the stable dev room
local-local. - Set Share base URL to the LAN URL printed by Vite (e.g.
http://192.168.1.10:5173) so the QR/link works on mobile. - On mobile (same network), open the Join URL from the modal (viewer mode).
Notes:
- On local/LAN hostnames, DEx connects to the relay at port
8787by default (no?streamHost=...needed). - If you serve the frontend over HTTPS (secure context), the relay must be reachable via
wss://...(runserver/relay.mjswith--tls-cert/--tls-key).
yarn typecheckRuns the TypeScript compiler in no-emit mode to make sure the codebase type-checks.
yarn test # one-off
# or
yarn test:watch # watch-mode with VitestThe project uses Vitest which has first-class Vite integration and extremely fast cold-starts.
See cypress.config.js for E2E testing setup using Cypress.
yarn build- First the TypeScript project references are compiled (see
tsconfig.*.json). - Afterwards Vite produces an optimised, minified bundle in the
dist/folder.
Tip : To inspect the production bundle locally run
yarn previewwhich serves the files fromdist/with the same configuration Vercel/GitHub-Pages would use.
.
├── public/ # Static assets copied as-is
├── src/ # Application source code
│ ├── components/ # Preact components
│ ├── hooks/ # Custom hooks
│ ├── commands/ # SySex over USB commands
│ ├── styles/ # Tailwind styles / global css
│ └── …
├── styles/ # Tailwind base & utilities
├── dist/ # (generated) production build output
├── cypress/ # E2E tests
├── vite.config.ts # Vite, Preact & Tailwind configuration
├── tailwind.config.js
├── cypress.config.js # Cypress configuration
└── package.json
The repo relies on Prettier for code-formatting. Most editors pick up the configuration automatically. You can enforce the formatting with:
npx prettier --write .ESLint is configured. You can run the linter with:
yarn lintWhen using VS Code we recommend installing the following extensions:
- Prettier – Code formatter
- Tailwind CSS IntelliSense
- ESLint
- Typescript React (TSX) (built-in)
| Issue | Fix |
|---|---|
| "Command not found: yarn" | corepack enable (Node ≥16.13) |
| Changed deps are not reflected | Stop the dev-server and run yarn dev again – Vite occasionally caches aggressively |
| Preact fast-refresh stops working | Make sure you are on the latest Node LTS & the @preact/preset-vite plugin is up-to-date |
| ESLint issues | Run yarn lint to see errors, many can be fixed with editor integrations or eslint --fix |
Feel free to open an issue or start a discussion on GitHub. Happy hacking! 🎉