Viewing asMia Chen

Demo only. With Microsoft Entra sign-in, everyone sees just their own view.

Workflow staff

Teachers & Heads of Faculty

Students

How it's built

One engine, many workflows

This proof of concept runs on Cloudflare so everyone can try it. It is designed to move to the school's Microsoft Entra and Azure environment by swapping a few small adapters, not by rewriting it.

Proof of concept today, Azure later

Each row is one seam in the code. Everything above these seams stays the same.

LayerNow (Cloudflare)Production (Microsoft)Where it changes
HostingCloudflare Workers (Next.js via OpenNext)Azure App Service, staging and production slotsSame Next.js app; different deploy target
DatabaseCloudflare D1 (SQLite)Azure Database for PostgreSQLsrc/lib/db: swap the Drizzle dialect, re-run migrations
Evidence filesCloudflare KVAzure Blob Storage, private containersrc/lib/platform/storage.ts (3 functions)
Sign-in“Viewing as” persona switcherMicrosoft Entra ID single sign-onsrc/lib/platform/auth.ts; roles stay in the database
EmailRecorded in the Outbox pageMicrosoft Graph sendMail from a shared mailboxsrc/lib/platform/mail.ts (1 function)
Letters to PDFBrowser “Print or save as PDF”Headless Chromium in a background workerSame HTML templates
RemindersConfigured, not sentScheduled worker counting school daysTimer definitions already in each workflow

A five-minute demo

  1. 1

    Switch to Mia Chen (student). Start a new exam reschedule with a medical certificate.

    Students see only their own applications.

  2. 2

    Switch to Grace Holloway (RCC admin). Open Mia's application, check the evidence and send it to the approver.

    RISE applications also land here, because RISE routes to RCC.

  3. 3

    Switch to Dr Helen Park (RCC approver). Approve one exam and decline the other, setting the new date.

    Per-assessment decisions; the letter is generated automatically.

  4. 4

    Switch to Grace Holloway. Check the letter and send it. The sitting appears on the Sittings board.

    The letter goes to the student and parents, with the teacher copied.

  5. 5

    Switch to Tom Reid (teacher). See the approved new dates for his students, but not the evidence.

    Permissions are scoped by role and subject.

  6. 6

    Switch to Daniel Moss (teacher). Book a Dist Ed exam for a distance student.

    A different workflow on the same engine.

  7. 7

    Switch to Alex Morgan (workflow owner). In the Admin console, rename a stage, change who can take a step, or edit a letter.

    Saved as a new version; nothing to redeploy.

Use the Viewing as menu at the top right to switch. You can reset the demo data from the Admin console.

Adding a new workflow

  1. Describe it as a definition: who starts it, the form fields, the stages, the steps between them and who may take each one.
  2. Choose the effects on each step: notify a role, generate or send a letter, create sittings.
  3. Set permissions and reminders in the Admin console.
  4. Publish. The forms, boards, timeline and diagram all draw themselves from the definition.

Access Arrangements (extra time, readers, scribes) is planned as the next workflow.

Where the code lives

  • src/lib/engine/types.tsThe workflow definition format: states, steps, roles, fields, permissions, timers
  • src/lib/engine/definitions.tsThe three seed workflows (AARA Exam, AARA Assignment, Dist Ed Exam)
  • src/lib/engine/engine.tsRouting, permissions, transitions and effects. Nothing AARA-specific
  • src/lib/platform/*The swap points for Azure: auth, storage, mail
  • src/lib/db/schema.ts + drizzle/Tables and migrations
  • src/app/*Pages. Forms, boards and diagrams are drawn from the definitions