A React dashboard for monitoring DMND mining accounts, workers, payouts, generated BTC, subaccounts, and read-only Watcher links.
The repository contains the frontend only. It calls the DMND API directly; there is no bundled application server.
Requirements:
- Node.js 20
- npm
Install dependencies and start Vite:
npm ci
npm run devThe application is available at http://localhost:5173.
Set VITE_DMND_API_BASE to the remote dashboard API origin:
VITE_DMND_API_BASE=https://dashboard-api.example.com npm run devWhen the variable is not defined, the development server defaults to:
https://staging-user-dashboard-server.dmnd.work
Each environment's Dockerfile sets its API URL explicitly, matching the existing user-dashboard setup.
For a build outside Docker, set the API URL in the command or a Vite .env file:
VITE_DMND_API_BASE=https://production-user-dashboard-server.dmnd.work npm run buildMissing or blank values fail the build. CI explicitly uses staging.
The API must allow the frontend origin and credentialed browser requests because authentication uses an HttpOnly session cookie.
Session expiry is controlled by the backend. The frontend validates restored miner sessions through
/api/check_auth and handles authentication rejections from protected API calls.
npm run lint
npm run typecheck
npm test
VITE_DMND_API_BASE=https://dashboard-api.example.com npm run buildEach Dockerfile builds the Vite application with its fixed API URL and serves the static output with nginx:
| Dockerfile | API URL |
|---|---|
Dockerfile.prod |
https://production-user-dashboard-server.dmnd.work |
Dockerfile.staging |
https://staging-user-dashboard-server.dmnd.work |
Build the desired environment without passing an API build argument:
docker build -f Dockerfile.prod -t sv2-ui:production .
docker build -f Dockerfile.staging -t sv2-ui:staging .
docker run --rm -p 8080:80 sv2-ui:stagingOpen http://localhost:8080.
sv2-ui/
├── src/
│ ├── api/ # Remote DMND API clients and response types
│ ├── auth/ # Session handling and authentication validation
│ ├── components/ # Shared interface components
│ ├── hooks/ # React Query data hooks
│ ├── lib/ # Data transformation and formatting helpers
│ └── pages/ # Dashboard and authentication pages
└── public/ # Static assets
- React 18
- TypeScript
- Vite
- TanStack Query
- Tailwind CSS
MIT OR Apache-2.0