Cargo workspace (domain, application, infrastructure, api), axum health endpoint with SPA fallback, Vue 3 + Tailwind frontend, Vitest, Playwright, Makefile, Gitea Actions CI and README. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
46 lines
2.1 KiB
Markdown
46 lines
2.1 KiB
Markdown
# SoftVisor Infrastructure Monitoring System
|
|
|
|
Web application to monitor and manage the SoftVisor Debian root server: OS/package updates,
|
|
vulnerabilities, backups of the Gitea/Postgres workloads on microk8s, and user management.
|
|
See [ROADMAP.md](ROADMAP.md) for the plan and [CLAUDE.md](CLAUDE.md) for the constraints.
|
|
|
|
## Stack
|
|
|
|
- Backend: Rust, axum, sqlx (SQLite), clean architecture in four crates (`backend/crates/*`)
|
|
- Frontend: Vue 3 + TypeScript, Vite, Tailwind CSS, Pinia, Vue Router (`frontend/`)
|
|
- Tests: `cargo test` (unit + integration), Vitest (components/stores), Playwright (UI)
|
|
|
|
## Development
|
|
|
|
Requirements: Rust stable, Node 22+, `make`.
|
|
|
|
```bash
|
|
cp .env.example backend/.env # then edit JWT_SECRET and the bootstrap admin
|
|
cd frontend && npm ci && npx playwright install chromium && cd ..
|
|
make dev # backend on :8080, frontend on :5173 (proxies /api)
|
|
```
|
|
|
|
| Command | What it does |
|
|
|----------------------|-----------------------------------------------------------|
|
|
| `make test` | backend, frontend unit and Playwright UI tests |
|
|
| `make test-backend` | `cargo test --workspace` |
|
|
| `make test-frontend` | Vitest |
|
|
| `make test-ui` | Playwright (starts backend with in-memory DB + Vite) |
|
|
| `make lint` | rustfmt, clippy, eslint, prettier, vue-tsc |
|
|
| `make build` | production frontend build + release binary |
|
|
|
|
## TDD workflow
|
|
|
|
Every feature starts with its tests:
|
|
|
|
1. List the unit, integration and UI tests the feature needs.
|
|
2. Write them so they fail (`backend/crates/*/src/**` unit tests, `backend/crates/api/tests/`
|
|
integration tests, `frontend/src/**/*.test.ts` and `frontend/e2e/*.spec.ts`).
|
|
3. Implement the smallest code that makes them pass, then refactor.
|
|
4. Commit and push.
|
|
|
|
## First admin
|
|
|
|
On start the backend creates an admin user from `BOOTSTRAP_ADMIN_EMAIL` /
|
|
`BOOTSTRAP_ADMIN_PASSWORD` if no user exists yet.
|