A production system,
built and run in the open.
A system Nathaniel Jay Adams designed, built and operates himself, for his own teaching. Not a university deployment and not offered as one — a working example of the data architecture, integration discipline and operating standard described above.
Watch the architecture film
Animated diagram by WorldWise Learning, derived from the system's own schema and scheduling. The presenter, Minh, is an AI avatar with an AI voice, made with Google Vids. No live records, student data or metrics are shown. The data-centre background is an AI-generated image.
How the system is built, stage by stage
-
Problem
Teaching across several programmes produced the same load weekly: records scattered across documents, progress tracked by hand, nowhere a term’s evidence could be reviewed as a whole.
-
System architecture
A server-rendered application on managed cloud hosting over a relational database, deployed continuously from source control, reachable only behind authentication. Vendor-neutral by construction: the data model is the asset, not the provider.
- Application
- Next.js 16 · React · TypeScript
- Data
- PostgreSQL via Prisma · Zod-validated boundaries
- Runtime dependencies
- 12, deliberately
- Access
- Authenticated; no public surface
-
What was built
A ten-table domain model covering the whole teaching operation rather than one feature, with a command centre for weekly planning on top.
- Students · Instructors · Lessons · Materials
- Assessments · Payments
- Source documents · Review queue
- Integration health · Scheduled run history
-
Data integration and AI readiness
Two scheduled jobs run daily: calendar events are reconciled into lessons, and teaching records are mirrored into Notion. A separate local source-file pipeline tracks files by content hash, so changes, duplicates and disappearances are detected rather than assumed.
The system does not call a language model, deliberately. Source-document tracking and a human review queue are precisely the grounding and oversight substrate a retrieval-grounded assistant requires. The data discipline comes first; the model is added afterwards, if evidence justifies it.
-
Operational use
It runs unattended on a schedule, as working infrastructure rather than a demonstration. The scheduler guarantees only hourly precision and does not retry a failed invocation, so the design accepts both: the two jobs have start windows an hour apart (not a completion dependency), every run is recorded durably, and a missed run is surfaced rather than assumed. Scheduled requests are authenticated and fail closed if the secret is absent. Failures in credential expiry, host permissions and third-party API changes were diagnosed and fixed in production — the part that never appears in a prototype.
-
Evidence
Diagrams generated from the system’s own schema and scheduling configuration.
Architecture in practice
No student, staff or institutional data appears in any of them.01 / Architecture Two planes,
one system.Teaching is what happens.
Operations hold the evidence.Teaching coreStudentLearnerInstructorEducatorLessonLearning experienceAssessmentProgressMaterialResourcesPaymentStudent billingOperations planeSourceDocument Source filesReviewItem Review queueIntegrationHealth Connector healthCronRun Run historyView architecture evidence
Six teaching models, four operations models. Lesson belongs to a Student and Instructor; Material is optional. Assessment belongs to Student and can reference Lesson. Payment belongs to Student, not Lesson.
ReviewItem can reference SourceDocument. IntegrationHealth and CronRun are independent tables. The two planes are conceptual groupings, not a database relationship.
02 / Automation Two daily jobs.
A deliberate sequence.Bring the calendar in.
Then mirror teaching records out.11:00 UTCCalendar → Lessons- Calendar
- Reconcile
- Lessons
1 hour separation12:00 UTCTeaching records → Notion- Database
- Synchronise
- Notion
Each authorised job invocation
starts a CronRun record.View scheduling evidence
0 11 * * *→/api/cron/daily-sync0 12 * * *→/api/cron/notion-syncStart windows are one hour apart; completion order is not locked. The noon job mirrors Students, Instructors, Lessons, Payments and Assessments into Notion.
Source-file hashing and review are a separate local pipeline, not the noon cloud job. Requests require the cron secret; unauthorised requests are rejected before creating a run.
03 / Observability Nothing fails
silently.See what ran, what worked,
and what needs attention.- RunWork begins
- RecordedHistory saved
- Health updatedConnector state
- Failure surfacedAction is visible
Run historyJob · timing · outcome · errorCronRunConnector healthHealth · last sync · last errorA reachable connector does not prove a scheduled job succeeded. Both signals matter.
View observability evidence
CronRun
job · startedAt · finishedAt · ok · error · triggerIntegrationHealth
healthy · lastSyncAt · lastErrorDerived status, not stored health fields: ok, failed, missed, blocked, none. “Missed” means the last successful run is stale; it is not a measured count. Connector health is persisted by the Notion integration separately from run completion.
This illustrates the recording design, not a live monitor or a guarantee against every infrastructure failure. No sample records or invented metrics are shown.
Source-derived architecture. No live records.Understand the system. Inspect the evidence.
-
Transferability
The pattern moves to institutional work unchanged: a defined data model, a scheduled reconciliation pipeline, grounded assistance under human review, and observability that survives real failure. What changes for a university is governance, scale and where review sits — not the architecture.