docs: add report draft and dashboard form refinements
This commit is contained in:
parent
4e0cf0140f
commit
441e709193
26 changed files with 1700 additions and 505 deletions
|
|
@ -2,18 +2,52 @@
|
|||
|
||||
## Project Description
|
||||
|
||||
Minmon is a student-friendly web dashboard for managing private servers, their hosted services, related domains, and server notes. It focuses on CRUD operations plus simple DNS monitoring, not deployment automation.
|
||||
Minmon is a student-friendly web dashboard for managing private servers, services, domains, and internal notes. The current implementation focuses on protected CRUD flows plus lightweight DNS A-record checking.
|
||||
|
||||
## Main Features
|
||||
## Current Main Features
|
||||
|
||||
- Admin login with better-auth
|
||||
- Dashboard summary for servers, services, domains, DNS status, and inactive services
|
||||
- Admin sign-in with better-auth
|
||||
- Root route (`/`) redirects automatically:
|
||||
- logged in -> `/dashboard`
|
||||
- not logged in -> `/login`
|
||||
- Dashboard summary for:
|
||||
- total servers
|
||||
- total services
|
||||
- total domains
|
||||
- DNS match / mismatch / unresolved counts
|
||||
- inactive or down services
|
||||
- recent notes
|
||||
- Server CRUD
|
||||
- Service CRUD
|
||||
- Domain CRUD
|
||||
- DNS A-record check with match/mismatch/unresolved result
|
||||
- Server note/documentation CRUD
|
||||
- Sample seed data for demo use
|
||||
- Note CRUD
|
||||
- Domain DNS check from:
|
||||
- domain list
|
||||
- domain detail page
|
||||
- Server detail page includes notes that belong to that server
|
||||
- Foreign-key form fields use select inputs for related records:
|
||||
- service -> server
|
||||
- domain -> service
|
||||
- note -> server
|
||||
- Sample seeded admin and demo dataset
|
||||
|
||||
## Current Route Structure
|
||||
|
||||
- `/` -> auth-based redirect
|
||||
- `/login` -> sign-in page
|
||||
- `/dashboard` -> summary page
|
||||
- `/dashboard/servers` -> server list
|
||||
- `/dashboard/servers/new` -> create server
|
||||
- `/dashboard/servers/$serverId` -> server detail + edit + related notes
|
||||
- `/dashboard/services` -> service list
|
||||
- `/dashboard/services/new` -> create service
|
||||
- `/dashboard/services/$serviceId` -> service detail + edit
|
||||
- `/dashboard/domains` -> domain list
|
||||
- `/dashboard/domains/new` -> create domain
|
||||
- `/dashboard/domains/$domainId` -> domain detail + edit
|
||||
- `/dashboard/notes` -> note list
|
||||
- `/dashboard/notes/new` -> create note
|
||||
- `/dashboard/notes/$noteId` -> note detail + edit
|
||||
|
||||
## Local Setup
|
||||
|
||||
|
|
@ -35,19 +69,30 @@ CORS_ORIGIN=http://localhost:5173
|
|||
NODE_ENV=development
|
||||
```
|
||||
|
||||
3. Start PostgreSQL if needed
|
||||
3. Prepare web environment at `apps/web/.env`
|
||||
|
||||
```env
|
||||
VITE_SERVER_URL=http://localhost:3000
|
||||
```
|
||||
|
||||
4. Ensure the web app can reach the server
|
||||
|
||||
- The web client uses the better-auth client with `env.VITE_SERVER_URL`
|
||||
- Make sure the web environment points to the running API server
|
||||
|
||||
5. Start PostgreSQL if needed
|
||||
|
||||
```bash
|
||||
bun run db:start
|
||||
```
|
||||
|
||||
4. Apply schema
|
||||
6. Apply schema
|
||||
|
||||
```bash
|
||||
bun run db:push
|
||||
```
|
||||
|
||||
5. Seed sample data
|
||||
7. Seed sample data
|
||||
|
||||
```bash
|
||||
bun run --filter @minmon/db db:seed
|
||||
|
|
@ -58,17 +103,44 @@ Seeded admin login:
|
|||
- Email: `admin@minmon.local`
|
||||
- Password: `admin12345`
|
||||
|
||||
6. Run the apps
|
||||
8. Run the apps
|
||||
|
||||
```bash
|
||||
bun run dev
|
||||
```
|
||||
|
||||
7. Open the app
|
||||
9. Open the app
|
||||
|
||||
- Web: `http://localhost:5173`
|
||||
- API: `http://localhost:3000`
|
||||
|
||||
## Current Behavior Notes
|
||||
|
||||
### List Ordering
|
||||
|
||||
- Main CRUD list pages are ordered by:
|
||||
- `createdAt DESC`
|
||||
- then `id DESC`
|
||||
- This keeps row ordering deterministic after refetch.
|
||||
|
||||
### Delete Actions
|
||||
|
||||
- List pages use a two-click destructive icon flow:
|
||||
- first click: trash icon
|
||||
- second click: check icon confirms delete
|
||||
- Confirm state resets on blur and timeout.
|
||||
|
||||
### Domain DNS Check
|
||||
|
||||
- Domain list uses the DNS status badge itself as the check trigger.
|
||||
- Domain detail page also provides a DNS check action.
|
||||
- DNS checking resolves IPv4 A records only.
|
||||
|
||||
### Relationship Behavior
|
||||
|
||||
- Deleting a server removes related services, domains, and notes through cascade rules in the database.
|
||||
- Deleting a service removes related domains through cascade rules.
|
||||
|
||||
## Helpful Commands
|
||||
|
||||
```bash
|
||||
|
|
@ -77,9 +149,12 @@ bun run db:push
|
|||
bun run db:studio
|
||||
bun run --filter web check-types
|
||||
bun run --filter server check-types
|
||||
bun x tsc --noEmit -p packages/api/tsconfig.json
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Full workspace typecheck may still fail because of a pre-existing `apps/desktop` typing issue for `three`.
|
||||
- The dashboard app itself, server app, DB push, and DB seed are verified.
|
||||
- The verified implementation path is the web app + server app + database push + database seed.
|
||||
- DNS checking is limited to A record / IPv4.
|
||||
- This project is not a deployment platform and does not include SSH, Docker orchestration, or reverse proxy automation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue