ShiftCircle

A shift-scheduling prototype for a 24/7 provincial correctional centre. Supervisors plan 8- and 12-hour shifts (a 16 h day is a 12 h shift plus an extension) against a configurable rules engine (rest and hours limits, consecutive shifts, staffing, qualifications, overtime). A planner builds a whole-quarter draft through the same engine, changes single shifts in it by hand, and commits it to the planning board. Employees see their schedule and hours, and can propose extra shifts: each draft is rule-checked with the others, then sent with a note, followed and withdrawn on My schedule; a supervisor in scope (or the planner) approves or declines each shift in the Proposals inbox, with the rules checked again at approval (v1.3, ADR-032). Supervisors have a rank and their own rostered shifts on two supervisor posts, under the same rules, with a rule table for who can work a post and overtime offered by position (v1.3, ADR-031). Time feeds a payroll export, and reports show coverage and overtime as planned vs. actual.

A prototype. All data is synthetic. Payroll and sign-on are simulated. The default demo seeds 100 fictional officers and 10 supervisors over 90 days; the About reset card can also load Dataset 120 and Dataset 150 for the quarter planner.

Using it? INSTALL.md sets it up and the user guide explains each role. All documentation starts at docs/index.md.

Demo video

Watch the 3-minute walkthrough on YouTube, or download the MP4 (16 MB), recorded on release v1.3. It follows docs/demo-script.md §1–6: the safeguards and rules story.

Architecture at a glance

Three containers: web (nginx + React) · api (Java 21 + Spring Boot 4.x, JdbcTemplate + Flyway, Drools rules engine) · db (PostgreSQL). See docs/03-architecture.md.

Documentation

Doc What’s in it
INSTALL.md Standalone Docker-only install guide: prerequisites, secrets, start, health check, demo datasets and reset, upgrade, removal, troubleshooting
USER-GUIDE.md How to use it, per role: officer, supervisor, planner, auditor, rules admin and approver
docs/01-scope-and-plan.md Problem, users, outcomes, feature priorities, assumptions, plan, open questions
docs/02-requirements.md Screens, functional and non-functional requirements, rules catalogue, data model, test cases
docs/03-architecture.md Containers, feature slices, JdbcTemplate persistence, change flow, frontend, JWT security
docs/04-rules-engine.md Rules engine design: Drools decision tables a non-technical admin can edit
docs/05-union-rules.md Mock collective-agreement rule set, with each rule’s source
docs/06-data-model.md PostgreSQL tables, constraints, ER diagram, migrations and seed
docs/07-api-spec.md REST endpoints, rule-check/override contract, error format, screen-to-endpoint map
docs/08-deployment.md Docker Compose topology, configuration, startup, nginx, path to pilot
docs/09-access-control.md Roles, permission matrix, enforcement, mock sign-in, privacy
docs/10-testing.md Test strategy, rule boundary matrix, scenarios, E2E flows, demo dataset spec
docs/ui/README.md UI spec: Sask design tokens, components, every screen; design files in docs/ui/screens/
docs/roadmap.md Known limits, staffing findings and the ordered post-submission roadmap
docs/decisions.md Decision log (ADRs)

How this was built

The build process is kept apart from the product docs, in docs/process/:

BUILD_RECORD.md is the two-page summary.

UI design: six screens (planning board, my schedule, overtime board, rules admin, reports, wall display) are specified in docs/ui/.

Quick install

One command. It needs a bash shell (macOS, Linux, or on Windows a WSL2 Ubuntu terminal, not PowerShell or cmd: see INSTALL.md, Windows; without WSL, see below), curl, git, Docker with Compose v2, a running Docker daemon and a free port. It clones into ./ShiftCircle, creates .env with freshly generated random secrets that it never prints, runs docker compose up -d --build --wait, checks /healthz and /api/v1/version, and prints the URL:

curl -fsSLo install.sh https://raw.githubusercontent.com/dmhdev01-cell/ShiftCircle/v1.3.1/install.sh && bash install.sh

A failed download stops at the curl step with a non-zero exit. (curl -fsSL <url> | bash also works, because the script does nothing until it has all been read, but the pipe reports bash’s exit status, so a failed download looks like success.) The safest way is to read it first:

curl -fsSLo install.sh https://raw.githubusercontent.com/dmhdev01-cell/ShiftCircle/v1.3.1/install.sh
less install.sh
bash install.sh

Windows without WSL (Docker Desktop on the Hyper-V backend, common on managed Windows Pro/Enterprise laptops): in Git Bash (installed with Git for Windows; Docker Desktop puts docker on its PATH) run this form of the one-liner, which stops Git converting line endings:

curl -fsSLo install.sh https://raw.githubusercontent.com/dmhdev01-cell/ShiftCircle/v1.3.1/install.sh && GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.autocrlf GIT_CONFIG_VALUE_0=false bash install.sh

With no bash at all, INSTALL.md, Windows without WSL has the PowerShell steps (clone, generate .env, docker compose up).

Course submission: the version submitted for the assessment is the release tag v1.3 (supervisors on their own posts and shift proposals, on top of v1.2). The one-liner above installs v1.3.1, the current release: v1.3 plus the fixes and docs made after it (the installer’s takeover guard, the bare address opening the sign-in screen, a supervisor’s own row locked on the planning board, LF checkouts on Windows, the demo video and the architecture diagram; see release 13.1). The v1.3 tag is unchanged and its own install.sh stays pinned to v1.3, so the same one-liner with v1.3 in place of v1.3.1 still installs the submitted version exactly; its release page has the v1.3 install notes. The earlier submission build was the tag v1.1.2-submission (v1.1.1 plus the staffing-shortfall hotfix); its own install.sh stays pinned to that tag, so the same one-liner with v1.1.2-submission in place of v1.3 still installs it exactly.

Overrides (environment variables, put them before bash install.sh): SC_WEB_PORT (host port, 1-65535, default 8080, for example SC_WEB_PORT=9090 bash install.sh), SHIFTCIRCLE_PROJECT (compose project name, default shiftcircle; a COMPOSE_PROJECT_NAME already in your shell is ignored on purpose), SHIFTCIRCLE_REF (tag or branch to install, not a commit SHA; default the release tag), SHIFTCIRCLE_DIR (default ./ShiftCircle), and, advanced, SHIFTCIRCLE_REPO (clone URL). The port and project name are saved in .env (SC_WEB_PORT, COMPOSE_PROJECT_NAME). It refuses to touch an existing non-empty directory that is not a ShiftCircle checkout; re-running in the same place skips the clone and keeps the .env (it only fills a blank secret). It never runs docker compose down. The manual steps are below.

Already running ShiftCircle (or anything else) under the compose project name shiftcircle? Compose knows a stack only by its project name, so a second install under the same name would take over the first one (recreate its containers, reuse its database volume, and then fail with password authentication failed). So give a second copy its own name, for example SHIFTCIRCLE_PROJECT=shiftcircle-2 SC_WEB_PORT=9090 bash install.sh; you can check which names are taken with docker compose ls -a. The installer since v1.3.1 (the one-liner above; the v1.3 installer does not have it) checks this for you: if containers of that project were started from another directory, or its database volume exists and this checkout’s .env does not record creating it (a fresh install, or a re-run), it stops with exit code 20 without touching the other stack. A fresh install has already cloned ./ShiftCircle by then; run it again with another SHIFTCIRCLE_PROJECT and the clone is skipped. Re-running in the same directory works, with one exception: a checkout installed before the installer recorded its volume (SC_DB_VOLUME_CREATED in .env) whose stack is stopped is refused once; if you know the volume is its own, start it once from the checkout (cd ShiftCircle && docker compose -p <name> up -d) and run the installer again. If you moved or renamed a checkout, its old containers still name the old path: cd ShiftCircle && docker compose -p <name> down (keeps the database volume) and run the installer again.

First 5 minutes (checked on 26 Nov 2026 against v1.3, every demo user signed in; step 1 describes v1.3.1):

  1. Open the address the installer prints, http://localhost:8080/login (your port if you set SC_WEB_PORT). Each user lands on their own home page; the bare address opens the sign-in screen too, or your own home page when you are already signed in. (With v1.3, open /login yourself: its installer prints the bare address, which first sends every user to the Planning board, where an officer, rules admin, rules approver or the wall display sees “Could not load the schedule”; that is a landing-page quirk, not a failed install: use the side menu, or sign out and sign in again.)
  2. M. Ellis (supervisor): the Planning board, Unit B, week of 16 Nov. Give Nia Thompson the empty Sat 21 Nov cell a D8 day shift: the rest rule blocks it and nothing is saved (demo script §2).
  3. T. Nakamura (officer): My schedule, hours and offers.
  4. L. Fraser then P. Singh: change a rule, then approve and publish it (maker/checker).
  5. P. Planner: Quarter plan, then About & version → Reset the demo data to return to the seeded state (about 6 s; Dataset 100 checksum beb2e222…b7d1).

The full walkthrough is docs/demo-script.md; installs that stop with an error are covered in INSTALL.md §10.

Setup (clean clone)

Everything is on main: the API, all the screens, the mock sign-in, the quarter planner with draft edits, and the E2E suite. INSTALL.md is the full install guide; this section is the short version. The steps below were re-run on 24 Nov 2026 from a fresh git clone of the branch for this docs pass (own compose project, SC_WEB_PORT set): docker compose up -d --build --wait built and became healthy in 50 s with warm caches, /healthz returned ok, /api/v1/version returned the commit, rule set v3 (v4 since release v1.3), demo profile and Dataset 100, and the eight demo users in §3 match GET /api/v1/auth/demo-users. Anything not run is marked UNVERIFIED.

Prerequisites

Docker only: Docker Desktop (macOS, Windows) or Docker Engine (Linux) with Compose v2, about 2 GB of free memory, and one free host port (8080 by default). No JDK, Maven, Node or database is needed on the host: everything, including the test dependencies, installs and builds inside containers.

1. Configure the secrets

cp .env.example .env

Then set the two secrets in .env. There are no committed defaults:

Variable Rule Example to generate one
POSTGRES_PASSWORD at least 8 characters openssl rand -base64 18
SC_JWT_SECRET at least 32 characters (signs the mock sign-in tokens, HS256) openssl rand -base64 48

If either is missing, docker compose stops before starting anything, with required variable POSTGRES_PASSWORD is missing a value: … copy .env.example to .env and set it (checked: docker compose --env-file /dev/null config). If either is too short, the API refuses to start and says which one.

2. Start

docker compose up -d --build --wait

--wait returns when all three containers are healthy: the database first, then the API (after it has run the Flyway migrations and generated the synthetic dataset), then the web. Then open http://localhost:8080 and you see the mock sign-in screen with the demo users.

How long: with Docker’s build cache warm, up -d --build --wait took 31 s on 2026-11-20 and 50 s on 2026-11-24, and the demo data took about 6.6 s of that (Demo data generated in … ms in docker compose logs api). The very first build also downloads the base images and the Maven and pnpm dependencies: on 26 Nov 2026 the one-liner on a completely empty Docker (Docker-in-Docker, linux/arm64, fast network, 15 CPUs) finished in 68 s, with about 0.85 GB of container memory at the sampled peak and about 0.47 GB once running. Allow several minutes on a slower network or laptop, and longer under amd64 emulation. The default dataset: 100 fictional officers and 10 supervisors, 1 Oct – 29 Dec 2026, “today” fixed at 19 Nov 2026, seed 20261001. The About reset card can also load Dataset 120 and Dataset 150 (see “Demo data and the quarter planner”).

Ports in use? Only the web publishes a port, and it is bound to 127.0.0.1 (not the LAN) because the demo has mock sign-in and a destructive reset. Set SC_WEB_PORT in .env, for example SC_WEB_PORT=18080, and open that port instead. For local debugging, docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build also publishes the API (SC_API_PORT, default 8081) and the database (SC_DB_PORT, default 5433), both on 127.0.0.1 only.

Checks once it’s up (both checked):

Stop with docker compose down; add -v to delete the database and start from the seeded data again.

Optional, build information only: to show the commit at /api/v1/version, run git rev-parse --short HEAD and paste the value into .env (for example SC_GIT_COMMIT=3a4bbbd) before docker compose up -d --build --wait. Compose doesn’t run $(…) in .env. The value is baked into the api image at build time, so recreating a container doesn’t change it; only a rebuild does.

3. Sign in (mock)

Sign-in is simulated. The sign-in screen lists fictional demo users (GET /api/v1/auth/demo-users). Picking one asks the API for a signed token (POST /api/v1/auth/mock-login, HS256 with SC_JWT_SECRET, 8-hour expiry). The API then validates that token on every request exactly as it would a real identity provider’s token. Only the token issuer is fake. The prod-like profile (SC_PROFILE=prod-like) removes mock sign-in entirely.

User Roles Scope Use it for
M. Ellis Supervisor, Employee Units A, B and both supervisor posts Planning board, overtime, time and payroll; her own schedule (My schedule) as Morgan Ellis, a SUP-L supervisor (D12 day crew on 120/150; rotating 8 h on 100)
J. Chen Supervisor, Employee Admissions, Control, Escort and both supervisor posts Scope checks (can’t see Unit B); their own schedule (My schedule) as Jamie Chen, a SUP-O supervisor (D12 day crew on 120/150; rotating 8 h on 100)
T. Nakamura Employee own records My schedule, offers (accept/decline)
L. Fraser Rules admin none Edit, build and submit rule changes
P. Singh Rules approver none Approve and publish (not their own drafts)
A. Reviewer Auditor all, read-only Reports and audit
Unit office TV Display counts only Wall display
P. Planner Planner all units; the live board is read-only, the uncommitted quarter draft is theirs to edit and commit (plus preferences planning and the demo reset) Quarter plan, draft edits, preferences, reset the demo data

Demo data and the quarter planner

A reset rebuilds a known state from a fixed seed. About & version → Reset the demo data (signed in as P. Planner) selects:

Since release v1.3 (ADR-031) every dataset has supervisors on their own posts: two supervisor posts, Supervision · Living units (SUP-L, covers A, B and C) and Supervision · Operations (SUP-O, covers Admissions, Control and Escort), each needing one supervisor per block, 24/7. M. Ellis and J. Chen are linked to supervisor records, so their My schedule shows their own schedule, headed with their position and post. The supervisors were added after every officer row from their own seeded streams, so the officers’ roster, plan and payroll rows are unchanged: the officers alone still give the earlier checksums (4156077d…da6b, 82b19cf8…32ca, 2e6cd938…d7f8), and a test asserts it.

Every reset (and a fresh stack) also plants four shift proposals (v1.3 P5, ADR-032), so the Proposals inbox is not empty: Tara Nakamura’s Waiting proposal with a Unit B shift for M. Ellis and an Admissions shift for J. Chen, one Declined by J. Chen with a comment, one Expired, and M. Ellis’s own Waiting supervisor-post shift for J. Chen. A fresh reset shows Proposals (1) for M. Ellis and Proposals (2) for J. Chen. They create no shift, so every checksum above is unchanged; docs/demo-script.md §8 walks them.

The reset is asynchronous, one at a time and audited, takes a few seconds, and leaves the payroll golden file unchanged.

Quarter plan (P. Planner) builds the next quarter (Mon 4 Jan to Sun 11 Apr 2027, seven 14-day periods) from a fixed seed and the 8 h pattern (rotating 5 on / 2 off by default; fixed 5/2 and 7/3 are selectable and show their warnings). Every proposed shift goes through the same rules engine as the planning board; a Block leaves a visible gap. The scorecard, gaps, roster, compare and commit are on the same screen. The scorecard includes a read-only Qualified staff card: block-days with fewer qualified officers on duty than the unit’s minimum, as a warning only.

Before committing, the planner can change single shifts in the draft: move one (time or unit), give it to another officer, remove it, or add one. Each change is checked by the same rules engine: a Block saves nothing, a Warn needs a second, acknowledged save, and there is no emergency override in a draft. The whole scorecard is worked out again after each change, edited shifts read “· edited”, and each edit is in the audit log. Generating again or discarding drops the hand edits after a confirm.

Commit re-checks every shift, hand edits included, needs the warning list accepted once, and refuses a stale draft or a locked period. On Dataset 120 the measured draft is 38 gaps of 1,764 officer block-days (all Escort evening), 7 warnings, zero Block, and 5,595 shifts on commit (5,103 officer + 492 supervisor; the supervisor posts have no gaps). The demo script in docs/demo-script.md §7 walks it.

Known limits, stated on the scorecard and in BUILD_RECORD.md:

4. Run the tests

All in Docker.

GitHub Actions (.github/workflows/ci.yml, on pull requests and pushes to main) runs the check scripts, the web lint, tsc -b, unit tests and build, and the API mvn verify below. Playwright e2e is not in CI: run it locally as described below; running it on Actions is a follow-up.

# Guard: a source or docs path hidden by .gitignore is invisible to git, so a clean
# checkout silently misses it. Run this before committing and again in the clean
# worktree used for the verified run.
./scripts/check-ignored-sources.sh

# API: rules boundary tests, repository tests (Testcontainers PostgreSQL), API and authorization tests.
# Takes about 15 minutes (measured at the release 11 gate); run it in the foreground and wait.
# Needs the Docker socket; .env must exist because compose reads the whole file.
# --build is required: compose otherwise reuses an old api-test image and a stale run can
# report BUILD SUCCESS for a tip that never ran.
docker compose --profile test run --rm --build api-test

# Web unit tests (Vitest)
docker run --rm -v "$PWD/web":/app -w /app node:24-alpine \
  sh -c "corepack enable && pnpm install --frozen-lockfile && pnpm test"

# End-to-end (Playwright, E1–E5, axe, keyboard-only E1/E3) against the running stack; see e2e/README.md.
# 1. Install the test dependencies in a container (no Node on the host):
docker run --rm -v "$PWD/e2e":/app -w /app node:24-alpine \
  sh -c "corepack enable && pnpm install --frozen-lockfile"
# 2. Run the browser in a container. host.docker.internal reaches the host's web port (8080, or
#    your SC_WEB_PORT: export it in this shell too, a value only in .env is not seen here) on
#    Docker Desktop (macOS, Windows); --add-host makes the same name work on Linux.
#    EXPECT_COMMIT is required: the suite refuses a stack built from any other commit
#    (use the value you set as SC_GIT_COMMIT, or `git rev-parse --short HEAD`).
docker run --rm --add-host=host.docker.internal:host-gateway -v "$PWD/e2e":/work -w /work \
  -e BASE_URL=http://host.docker.internal:${SC_WEB_PORT:-8080} -e EXPECT_COMMIT=<the commit you built> \
  mcr.microsoft.com/playwright:v1.65.1-noble npx playwright test --grep-invert @fixtures --project desktop-datasets

The UI test: how to run the Playwright suite yourself. Chromium only (the config refuses any other browser), against the compose stack. What the suite covers, screen by role by state, is in e2e/COVERAGE.md; these commands are from e2e/README.md.

# once: install the test dependencies in a container (no Node on the host)
docker run --rm -v "$PWD/e2e":/app -w /app node:24-alpine \
  sh -c "corepack enable && pnpm install --frozen-lockfile"

# the stack the suite drives. ALWAYS give a test stack its own project with -p:
# docker-compose.yml pins `name: shiftcircle`, so a bare `docker compose` lands in
# the same project as a stack you already run by hand.
docker compose -p sc-test up -d --build --wait

# desktop viewport, real API (skip the fixtures-only specs). The commit guard
# requires EXPECT_COMMIT: the suite refuses to drive a stack running a build
# other than the one you name, and refuses port 18080 (kept for a hand-run stack)
# unless ALLOW_PERSON_STACK=yes.
docker run --rm --add-host=host.docker.internal:host-gateway -v "$PWD/e2e":/work -w /work \
  -e BASE_URL=http://host.docker.internal:${SC_WEB_PORT:-8080} -e EXPECT_COMMIT=<the commit you built> \
  mcr.microsoft.com/playwright:v1.65.1-noble npx playwright test --grep-invert @fixtures --project desktop-datasets

# tablet: the real-API specs change data, so a fresh stack per viewport
docker compose -p sc-test down -v && docker compose -p sc-test up -d --wait
docker run --rm --add-host=host.docker.internal:host-gateway -v "$PWD/e2e":/work -w /work \
  -e BASE_URL=http://host.docker.internal:${SC_WEB_PORT:-8080} -e EXPECT_COMMIT=<the commit you built> \
  mcr.microsoft.com/playwright:v1.65.1-noble npx playwright test --grep-invert @fixtures --project tablet-datasets

Port: the e2e commands read SC_WEB_PORT from your shell and fall back to 8080. If you changed the port in .env, also export SC_WEB_PORT=<port> in the shell where you run them (or edit BASE_URL). host.docker.internal reaches the host from a container on Docker Desktop; the --add-host line makes the same name work on Docker Engine (run on macOS; on Linux it is UNVERIFIED, and --network host with BASE_URL=http://localhost:${SC_WEB_PORT:-8080} is the alternative). E2E_WORKERS (default 2) sets parallelism; tests/screenshots.spec.ts writes full-page captures and index.json to SHOTS_DIR (default /private/tmp/sc-ui-shots/<RUN_ID>, outside the repository: mount it the same way when the browser runs in Docker); the HTML report is playwright-report/. The fixtures-mode web and the @api / @fixtures tags are in e2e/README.md.

Count (v1.3, the course submission): measured on 25 Nov 2026 on the final main for v1.3 (d3d1d28), on S8’s branch at bd7d377 (docs and the install pin; the build record followed in 1739543), a fresh stack per viewport with 1 worker:

Earlier gates: v1.2 was API 503, web 591 in 58 files, desktop 132 and tablet 131 + 1; the earlier submission line v1.1.1-submission (before the v1.1.2-submission hotfix) was API 470, web 532 in 54 files, desktop 124 and tablet 123 + 1 (fixtures 23 passed, 79 skipped). Both are in docs/10-testing.md.

Pins (release v1.3 S4, moved once): the supervisors move every dataset pin once. Dataset checksums 100 beb2e222…b7d1, 120 ca73467d…a64a, 150 353e2e62…91a5; plan rows 7,266 / 5,595 / 5,877; the payroll golden for 26 Oct – 8 Nov is 1,124 lines, sha256 b946ef1f…00e6. The move is additive and a test proves it (GeneratorCharacterizationTest): the officers alone still give the earlier checksums (4156077d…da6b, 82b19cf8…32ca, 2e6cd938…d7f8), plan fingerprints (ec337014…, e8b29ce6…, a1e093f7…), rows (6,586 / 5,103 / 5,414) and scorecard warnings (135 / 7 / 39), and the golden’s first 1,038 lines are the earlier file byte for byte (9f2d51b3…04ff), with only the supervisors’ S-… rows appended. Earlier counts, release by release, are in docs/process/release-notes.md; each round is in docs/process/review-rounds.md.

One viewport per fresh stack; dataset specs last. --project desktop-datasets runs the parallel desktop specs first, then the stack-wide specs (dataset resets, quarter-plan generate/commit/discard, the E4 pay-period lock) one at a time, because they would corrupt each other in parallel (e2e/README.md). The real-API specs change the data (an offer is confirmed, a rule version is published, a period is locked), so a second viewport run on the same database fails on the changed data. Run --project desktop-datasets, then docker compose -p sc-test down -v && docker compose -p sc-test up -d --wait, then --project tablet-datasets. The web unit tests write web/node_modules with Linux binaries.

Fixtures and the shared test database: each API test class gets its own database inside the shared PostgreSQL container (PostgresTestSupport creates one per class, and Flyway builds the schema), so class order cannot leak a generated roster, a published rule set or a linked employee into another class. Keep new fixtures off the demo day (19 Nov 2026) where the schedule and display tests assert exact Unit A coverage; dates after it are safer. When you change shared test infrastructure, also run reverse and random class order so a future regression is caught:

docker run --rm -v "$PWD/api":/src -v /var/run/docker.sock:/var/run/docker.sock \
  -e TESTCONTAINERS_HOST_OVERRIDE=host.docker.internal -w /src \
  maven:3.9-eclipse-temurin-21 ./mvnw -B test -Dsurefire.runOrder=reversealphabetical

docker run --rm -v "$PWD/api":/src -v /var/run/docker.sock:/var/run/docker.sock \
  -e TESTCONTAINERS_HOST_OVERRIDE=host.docker.internal -w /src \
  maven:3.9-eclipse-temurin-21 ./mvnw -B test \
  -Dsurefire.runOrder=random -Dsurefire.runOrderRandomSeed=20261120

What is real and what is simulated

Real Simulated
Rules engine: Drools decision tables compiled from editable rows; rule checks with plain-language reasons Sign-in: the token issuer is a mock; token validation is real
Safeguards: emergency-policy Blocks need an override with a written reason (≥ 10 characters), and other Blocks can’t be overridden (ADR-023); maker/checker on rule versions (API and a database CHECK); append-only audit (database triggers); locked pay periods (trigger) Payroll system: ShiftCircle produces the payroll CSV; nothing is sent anywhere
Role and unit scope on every endpoint (out of scope returns 404) People and data: 100, 120 or 150 fictional officers plus 10, 10 or 12 supervisors, generated from fixed seeds
Quarter planner: deterministic heuristic, every shift checked by the same rules engine, including the planner’s hand edits to a draft Collective-agreement values: many are MOCK placeholders to validate (docs/05-union-rules.md)
Period-based overtime classification and the payroll CSV “Today” is fixed at 19 Nov 2026 (SC_DEMO_TODAY)
PostgreSQL with Flyway migrations  

Not built at all (designed, but not in the prototype): the Excel round-trip for rule tables, offer withdrawal, a payroll-clerk role, arrow-key grid navigation, the two extra selectable patterns measured for decision 15, and more. The full list, with what exists instead, is in docs/10-testing.md §8.

Known limit, by decision (ADR-025): on the prod-like profile the sign-in token is kept in memory only, so a page refresh, a new tab or a deep link asks you to sign in again (“Please sign in to continue.”; the demo profile keeps the session across a same-tab refresh in sessionStorage, per the ADR-025 amendment) and then returns you to the screen you asked for.

Licence

MIT. All data in this repository is synthetic.