This guide covers everything you need to set up a Hypermark development environment.
git clone https://github.com/pheuberger/hypermark.git
cd hypermark
npm installmake devThis starts:
- Signaling server on port 4444 (WebRTC peer discovery)
- Vite dev server on port 5173 (the app)
Navigate to http://localhost:5173. Logs are merged into logs/dev.log.
make stopGracefully kills all processes spawned by make dev or make remote. Uses PID files in /tmp/hypermark-*.pid.
| Command | Purpose |
|---|---|
make dev |
Local development (signaling + Vite) |
make remote |
Cross-device testing via ngrok tunnels |
make stop |
Stop all Hypermark processes |
Configuration is handled via .env and .env.local files.
| Variable | Description | Default |
|---|---|---|
VITE_SIGNALING_URL |
WebSocket URL for WebRTC signaling | ws://localhost:4444 |
VITE_SUGGESTION_URL |
Content suggestion service URL (optional) | Derived from signaling URL |
make dev and make remote overwrite .env.local automatically on each run. See .env.example for documentation.
Open multiple browser tabs to http://localhost:5173. They sync via BroadcastChannel (same-origin) and WebRTC.
- Run
make dev - Find your local IP (
ip addr showorifconfig) - Set
VITE_SIGNALING_URL=ws://<LOCAL_IP>:4444in.env.local - Access
http://<LOCAL_IP>:5173from other devices
Requires ngrok installed and configured:
# ~/.config/ngrok/ngrok.yml
tunnels:
vite:
proto: http
addr: 5173
signaling:
proto: http
addr: 4444Then:
make remote # Starts tunnels, discovers URLs, opens browser
make stop # Stops everythingThe Makefile discovers tunnel URLs via the ngrok local API (http://localhost:4040/api/tunnels) and writes the signaling URL to .env.local.
npm test # Watch mode
npm run test:run # Single run
npm run test:coverage # With coverage report
npm run test:security # Security-critical tests only
npm run test:ui # Interactive test UISee Testing documentation for details on test structure, coverage requirements, and CI/CD integration.
npm run build # Outputs to dist/
npm run preview # Preview the production build locallyThe production build is configured for deployment to Netlify via netlify.toml.
The signaling server (in services/) handles WebRTC peer discovery and URL metadata extraction. It runs separately from the frontend:
npm run signaling # Run locally on port 4444
cd services && fly deploy # Deploy to Fly.ioSee services/Dockerfile for the container configuration.
- Ports in use: If ports 4444 or 5173 are occupied,
make devwill fail. Runmake stopor manually kill conflicting processes. - Stale PIDs: If the app crashed,
make stopcleans up stale PID files in/tmp/. - Log inspection: Check
logs/dev.logfor output from signaling, Vite, and ngrok. - ngrok not working: Ensure ngrok is running and configured before
make remote. The Makefile querieshttp://localhost:4040/api/tunnels.