146 lines
2 KiB
Markdown
146 lines
2 KiB
Markdown
# UML Guidance
|
|
|
|
## 1. Use Case Diagram
|
|
|
|
### Main Actor
|
|
|
|
- Admin
|
|
|
|
### Main Use Cases
|
|
|
|
- Login
|
|
- View dashboard summary
|
|
- Manage servers
|
|
- Manage services
|
|
- Manage domains
|
|
- Check DNS for domain
|
|
- Manage server notes
|
|
- Logout
|
|
|
|
## 2. Class Diagram
|
|
|
|
### Main Classes / Entities
|
|
|
|
#### Server
|
|
|
|
- id
|
|
- name
|
|
- primaryIpAddress
|
|
- secondaryIpAddress
|
|
- operatingSystem
|
|
- location
|
|
- provider
|
|
- description
|
|
- status
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
#### Service
|
|
|
|
- id
|
|
- serverId
|
|
- name
|
|
- type
|
|
- internalPort
|
|
- externalPort
|
|
- protocol
|
|
- status
|
|
- description
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
#### Domain
|
|
|
|
- id
|
|
- serviceId
|
|
- name
|
|
- expectedServerIp
|
|
- lastResolvedIp
|
|
- lastResolvedIps
|
|
- resolutionStatus
|
|
- lastCheckedAt
|
|
- remarks
|
|
- lastCheckMessage
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
#### Note
|
|
|
|
- id
|
|
- serverId
|
|
- title
|
|
- content
|
|
- category
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
### Relationships
|
|
|
|
- Server 1..\* Service
|
|
- Server 1..\* Note
|
|
- Service 1..\* Domain
|
|
|
|
## 3. Activity Diagram
|
|
|
|
Suggested activity: **Check DNS**
|
|
|
|
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
|
|
|
|
## 4. State Chart Diagram
|
|
|
|
Suggested state chart: **Domain DNS Status**
|
|
|
|
States:
|
|
|
|
- Unresolved
|
|
- Match
|
|
- Mismatch
|
|
|
|
Transitions:
|
|
|
|
- Check DNS success with expected IP found -> Match
|
|
- Check DNS success with expected IP missing -> Mismatch
|
|
- Check DNS failure -> Unresolved
|
|
|
|
## 5. Sequence Diagram
|
|
|
|
Suggested sequence: **Create Domain and Check DNS**
|
|
|
|
Objects:
|
|
|
|
- Admin
|
|
- Web UI
|
|
- tRPC API
|
|
- Database
|
|
- DNS Resolver
|
|
|
|
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
|
|
|
|
## 6. Collaboration Diagram
|
|
|
|
Show interaction between:
|
|
|
|
- Admin
|
|
- Dashboard UI
|
|
- Auth module
|
|
- API router
|
|
- Database
|
|
- DNS lookup module
|
|
|
|
Focus on how each module collaborates during CRUD and DNS checking.
|