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
|
|
@ -8,14 +8,16 @@
|
|||
|
||||
### Main Use Cases
|
||||
|
||||
- Login
|
||||
- Sign in
|
||||
- Access protected dashboard
|
||||
- View dashboard summary
|
||||
- Manage servers
|
||||
- Manage services
|
||||
- Manage domains
|
||||
- Check DNS for domain
|
||||
- Manage server notes
|
||||
- Logout
|
||||
- Check DNS for a domain
|
||||
- Manage notes
|
||||
- View notes related to a specific server
|
||||
- Sign out
|
||||
|
||||
## 2. Class Diagram
|
||||
|
||||
|
|
@ -79,19 +81,30 @@
|
|||
- Server 1..\* Service
|
||||
- Server 1..\* Note
|
||||
- Service 1..\* Domain
|
||||
- Service \*..1 Server
|
||||
- Domain \*..1 Service
|
||||
- Note \*..1 Server
|
||||
|
||||
### Implementation Notes
|
||||
|
||||
- Server detail page displays related notes for the selected server.
|
||||
- Service forms select an existing server.
|
||||
- Domain forms select an existing service.
|
||||
- Note forms select an existing server.
|
||||
|
||||
## 3. Activity Diagram
|
||||
|
||||
Suggested activity: **Check DNS**
|
||||
Suggested activity: **Check DNS from Domain List**
|
||||
|
||||
Flow:
|
||||
|
||||
- Admin opens domain list/detail
|
||||
- Admin clicks Check DNS
|
||||
- System resolves A record
|
||||
- System compares resolved IPs with expected server IP
|
||||
- System stores result
|
||||
- System shows Match / Mismatch / Unresolved
|
||||
- Admin opens domain list
|
||||
- Admin clicks the DNS status badge
|
||||
- System resolves IPv4 A record(s)
|
||||
- System compares resolved IPs with `expectedServerIp`
|
||||
- System stores check result in the domain record
|
||||
- System refreshes the list
|
||||
- System shows `MATCH`, `MISMATCH`, or `UNRESOLVED`
|
||||
|
||||
## 4. State Chart Diagram
|
||||
|
||||
|
|
@ -99,15 +112,15 @@ Suggested state chart: **Domain DNS Status**
|
|||
|
||||
States:
|
||||
|
||||
- Unresolved
|
||||
- Match
|
||||
- Mismatch
|
||||
- UNRESOLVED
|
||||
- MATCH
|
||||
- MISMATCH
|
||||
|
||||
Transitions:
|
||||
|
||||
- Check DNS success with expected IP found -> Match
|
||||
- Check DNS success with expected IP missing -> Mismatch
|
||||
- Check DNS failure -> Unresolved
|
||||
- DNS check success and expected IP found -> MATCH
|
||||
- DNS check success and expected IP not found -> MISMATCH
|
||||
- DNS resolution failure -> UNRESOLVED
|
||||
|
||||
## 5. Sequence Diagram
|
||||
|
||||
|
|
@ -123,24 +136,41 @@ Objects:
|
|||
|
||||
Flow:
|
||||
|
||||
- Admin submits domain form
|
||||
- UI sends create request
|
||||
- API validates and stores domain
|
||||
- Admin triggers DNS check
|
||||
- UI calls check mutation
|
||||
- API resolves DNS
|
||||
- API updates database
|
||||
- UI displays result
|
||||
- Admin opens create domain page
|
||||
- UI loads available services
|
||||
- Admin selects a service and submits the form
|
||||
- API validates the service relationship
|
||||
- API stores the domain
|
||||
- Admin clicks DNS status / check action
|
||||
- UI calls `domains.check`
|
||||
- API resolves DNS A records
|
||||
- API updates domain check fields in the database
|
||||
- UI refetches and displays the new status
|
||||
|
||||
## 6. Collaboration Diagram
|
||||
|
||||
Show interaction between:
|
||||
Show collaboration between:
|
||||
|
||||
- Admin
|
||||
- Dashboard UI
|
||||
- Auth module
|
||||
- API router
|
||||
- better-auth client / auth middleware
|
||||
- tRPC routers
|
||||
- Database
|
||||
- DNS lookup module
|
||||
|
||||
Focus on how each module collaborates during CRUD and DNS checking.
|
||||
Suggested emphasis:
|
||||
|
||||
- Protected route access
|
||||
- CRUD coordination between UI and API
|
||||
- Parent-child relationship selection in forms
|
||||
- DNS checking and persistence flow
|
||||
- Server detail page collaboration with note listing
|
||||
|
||||
## 7. UI/Interaction Notes for Documentation
|
||||
|
||||
Useful current UI details you can reflect in diagrams or captions:
|
||||
|
||||
- `/` redirects to `/dashboard` or `/login` based on session state
|
||||
- Main list pages are ordered by `createdAt DESC`, then `id DESC`
|
||||
- Delete actions use a two-click icon confirmation flow
|
||||
- Domain DNS check is triggered from the DNS status badge in the list view
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue