Architecture
Data Model
Three tables — Employees, Processes, Reminders — with field tables and relationships
The brief specifies three tables and adds: "Use whatever database makes sense." Field names and descriptions below are reproduced verbatim from the brief.
Employees
| Field | Description |
|---|---|
| id | Unique identifier |
| name | Full name |
| Email address | |
| role | Job title |
| is_manager | Boolean — determines dashboard access |
| slack_user_id | Slack member ID for DMs |
Processes
| Field | Description |
|---|---|
| id | Unique identifier |
| name | Process/SOP name |
| source | Where SOP lives (Trainual, Notion, Google Docs, etc.) |
| url | Direct link to the SOP |
| category | Grouping label (Sales, Safety, Service, etc.) |
Reminders
| Field | Description |
|---|---|
| id | Unique identifier |
| type | correction or recognition |
| employee_id | FK to employees |
| process_id | FK to processes |
| sent_by | FK to employees (manager) |
| note | Manager's message |
| priority | low / medium / high (corrections only) |
| status | pending / acknowledged |
| sent_at | Timestamp when created |
| acknowledged_at | Timestamp when acknowledged (null if pending) |
| employee_feedback | Optional comment from employee on acknowledgement (null if none) |
Relationships
- Reminder belongs_to Employee via
employee_id— the recipient of the correction or recognition. - Reminder belongs_to Process via
process_id— the SOP the reminder is tied to. - Reminder belongs_to Employee as sent_by via
sent_by— the manager who created the reminder. - Employee has_many Reminders — both as recipient (
employee_id) and as sender (sent_by). - Process has_many Reminders via
process_id.
Database choice and indexes
The brief says: "Use whatever database makes sense." It does not prescribe an engine, primary key type, index strategy, or constraints beyond the foreign key relationships and the enum-like fields (type, priority, status) implied by the descriptions. Specific indexes are not specified — the implementation should add them where the derived queries and screen reads warrant, but the brief is silent on the exact set.