# Install dependencies
npm install
# Start development with auto-reload
npm run dev:fullOpen https://localhost:8443 in your browser (accept the SSL certificate warning).
| Script | Description |
|---|---|
npm run build |
Build for development (with source maps) |
npm run build:prod |
Build for production (minified, optimized) |
npm run clean |
Clean the dist directory |
npm run serve:https |
Serve built app over HTTPS (required for WebHID) |
npm run serve |
Serve built app over HTTP (WebHID won't work) |
npm run start |
Build and serve over HTTPS |
npm run dev:full |
Recommended: Build, watch, and serve with auto-reload |
npm run watch |
Watch files and rebuild on changes |
npm run dev:fullThis starts the complete development environment:
- Builds the application
- Watches for file changes
- Serves over HTTPS at
https://localhost:8443 - Automatically rebuilds when you save files
npm run startThis builds once and serves the result.
The WebHID API requires HTTPS. The development server uses self-signed certificates located at:
server.crt- SSL certificateserver.key- SSL private key
- Chrome/Edge: Full WebHID support ✅
- Firefox: No WebHID support ❌
- Safari: No WebHID support ❌
When first accessing https://localhost:8443, your browser will show a security warning because we're using a self-signed certificate. This is normal for development - click "Advanced" and "Proceed to localhost" to continue.
├── js/ # Source JavaScript files
│ ├── core.js # Main application entry point
│ ├── controllers/ # Controller-specific classes
│ └── modals/ # Modal dialog handlers
├── css/ # Source CSS files
├── templates/ # HTML template files
├── lang/ # Translation JSON files
├── assets/ # SVG assets
├── dist/ # Built application (auto-generated)
└── dev-server.js # Custom development server
The build system uses Gulp with the following steps:
- JavaScript: Bundled with Rollup, supports ES modules
- CSS: Concatenated and optionally minified
- HTML: Processed and optionally minified
- Assets: Copied to dist, SVGs can be inlined in production
- Languages: JSON files copied and optionally minified
| Feature | Development | Production |
|---|---|---|
| Source maps | ✅ | ❌ |
| Minification | ❌ | ✅ |
| Asset inlining | ❌ | ✅ |
| File hashing | ❌ | ✅ |
If port 8443 is busy:
PORT=8444 npm run serve:httpsClean and rebuild:
npm run clean
npm run buildThe certificates are pre-generated. If you need new ones:
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes -subj "/CN=localhost"- Make sure you're using HTTPS (
npm run serve:https) - Use Chrome or Edge browser
- Accept the SSL certificate warning
- Check browser console for errors