ServPulse/Domain: Difference between revisions

From Nasqueron Agora
Ieli (talk | contribs)
No edit summary
Ieli (talk | contribs)
No edit summary
Line 26: Line 26:


;Users
;Users
:This concept represents the users who view or edit the status page.
:Admin access is controlled by JWT tokens signed with JWT_SECRET. There is no user table, no user accounts, and no permissions system. A single admin role exists. Tokens are generated via CLI and pasted into the login page.
:'''Attributes:''' name, role, permissions (permissions could also be defined at role level)
:'''Token payload:''' { role: 'admin' }
:'''Endpoint:''' POST /api/auth/verify

Revision as of 15:31, 17 February 2026

Lexicon

Configuration
Application-level settings stored in config/app.json and served via the config API.
Attributes: navbar.title, navbar.buttons_left (array of {name, link}), footer.line1 (text with %link1%/%link2% placeholders, labels, URLs), footer.line2 (text with %link% placeholder, label, URL).
Endpoint: GET /api/config/getAll (public), PUT /api/config (admin)
Service
A monitored entity on the status page (server, application, database, API, etc.). Services can be grouped and ordered.
Attributes: name, group, description, url, auto_status, status (operational, degraded, partial, major, maintenance), order.
Database table: service
Metrics
This concept represents the performance metrics or indicators being measured for each component, such as uptime, response time, error rates, and other relevant metrics.
Attributes: name, value, unit, timestamp.
Incidents
An outage, disruption, or degradation reported on the status page. Incidents follow a lifecycle and can affect multiple services.
Attributes: title, status (investigating, identified, monitoring, resolved), impact (none, minor, major, critical), start_date, update_date, end_date.
Database tables: incident, incident_update, incident_service
Incident Update
A timestamped status change within an incident, forming the incident timeline.
Attributes: incident_id, status, message.
Database tables: incident_update
Users
Admin access is controlled by JWT tokens signed with JWT_SECRET. There is no user table, no user accounts, and no permissions system. A single admin role exists. Tokens are generated via CLI and pasted into the login page.
Token payload: { role: 'admin' }
Endpoint: POST /api/auth/verify