Data model
Generated from the declared schema; tests fail if the code writes anything it does not declare. The ERD.
| Collection | Key | Fields | What it holds |
|---|---|---|---|
students | id | id, phone?, chosenName, pronouns?, zip, county?, age?, goal?, dial, household, enrollment, receives?, helpAreas, communities?, account?, createdAt | Who the student is and how they want to be helped. Sealed facts are never stored here. |
deadlines | id | id, studentId, title, due, course?, kind, source, confirmed, effortHours?, durationMin?, done? | Every date that matters: assignments, exams, aid, bills, appointments. Found dates stay unconfirmed until the student checks them. |
classes | student:course:index | course, days, start, end, building?, room?, campus? | Weekly class meetings, from the schedule or a room-change email. |
shifts | student:date:start | date, start, end, employer? | Work shifts, typed by the student or sent through the API. |
holds | id | id, deadlineId?, title, date, start, end | Time the student asked the Advocate to keep for a piece of work. |
reminders | id | id, about, at, text | Reminders the student asked for. |
drafts | id | id, studentId, to, recipient, body, purpose, status | Messages the Advocate wrote for the student to send. Nothing leaves without the student approving the exact text. |
messages | id | id, studentId, author, text, nextSteps, urgency, why?, at, status, holdReason? | Everything the team said to the student, with why and what the tone gate decided. |
last_steps | student | steps | The choices on the last message, so a reply of "1" by text picks the first. |
playbook_runs | student:playbook | playbook, studentId, stepId, status, startedAt, history, waitingSince? | Where the student is in each playbook, with every checkpoint. |
pulse_state | student | asked, everyDays, off? | Quick questions: which were asked when, how often, or off. |
pulse_pending | student | pulse | A quick question waiting for a yes or no. |
sources | student:source | source, connectedAt | What the student connected: calendar, forwarding, class site, location. Each grant is also in the consent ledger. |
api_tokens | sha256(token) | id, label, scopes, createdAt | Tokens the student created to connect other tools. Only a hash is stored. |
webhooks | id | id, url, events, secret | Where the student asked to be notified. Https only; payloads carry ids, never message text. |
vault | student:name | name, addedAt | Names of documents the student keeps; contents are sealed. |
money | student | balance, bills, pay? | Balance, bills and pay, for spotting a short month ahead of time. |
household_plan | student | childCare?, commuteMin?, sleepHours?, commuteMode?, homeStop? | Child care hours, commute and sleep, for the week solver. |
commute_plans | student|date | date, course, classStart, from, to, itineraries, notice?, fetchedAt | Bus trips that get the student to their first class each day, from the transit planner. |
transit_now | student | stop, at, arrivals, alerts | Live arrivals and alerts at the student's stop; used only while under ten minutes old. |
dispatches | idempotency key | id, studentId, kind, request, key, status, attempts, result?, queuedAt | Writes the student asked for (room bookings), each sent once with an idempotency key and confirmed by looking it up. |
campus_feeds | campus | campus, fetchedAt, locations, hours, menus, spaces, events, postings, mentors, stops, unknown | What the operator last fetched from each campus service: dining, places, careers and transit stops. Shared, not about any student. |
leases | job | job, holder, until, beats | Which operator holds which job, with a heartbeat, so two never run the same job. |
meetings | id | id, title, date, start, attendees, course? | Group meetings to prepare for. |
courses | student:course | course, aiPolicy, aiPolicyLine? | Each course and its AI policy, read from the syllabus. |
dismissed | student:subject | subject, at | Alerts the student said are fine. |
aid | student | disbursement | When financial aid is expected, for book timing. |