Skip to content

feat: interactive autograded starter workspace (Module 06) - #1

Open
IshmaelRogers wants to merge 1 commit into
mainfrom
feat/interactive-workspace
Open

IshmaelRogers wants to merge 1 commit into
mainfrom
feat/interactive-workspace

Conversation

@IshmaelRogers

@IshmaelRogers IshmaelRogers commented Jun 27, 2026

Copy link
Copy Markdown

Summary

Converts Module 06 — Backend Engineering & API Design from an LMS-duplicated content repo into an interactive, autograded work-along starter workspace, following the approved Module 04 template.

Each lab and the capstone is now a self-contained folderREADME.md (the brief), src/ (starter code with // TODOs), tests/ (the executable spec). The tests are the spec; no answer keys are shipped. Everything tests pure handler/logic (no real server or network): students implement the decisions a backend makes and call them directly.

Toolchain (one root)

  • package.json (devDeps: typescript, vitest, @types/node), strict tsconfig.json, vitest.config.ts.
  • scripts/grade.mjs — per-exercise score grouped by labs/ & assignments/ folder + a strict tsc gate (lab-06-specific strict gate from the template removed; uses the root tsc gate only).
  • .github/workflows/autograde.yml — runs the grader on push/PR, posts the score to the run summary and as a PR comment.
  • Removed Lesson_*.md, LEARNER_GUIDE.md, MODULE_SYLLABUS.md, and the flat labs/*.md + assignment brief markdown. Kept resources/, .devcontainer/, submission templates.

Exercises created (10)

Folder Focus
labs/lab-00-setup minimal HTTP handler (/health 200, else 404)
labs/lab-01-rest-api typed controllers + thin router (200/201/404/400/405, Location)
labs/lab-02-service-layer OrderService + repository interface; domain errors → status codes
labs/lab-03-validation boundary validator: narrow unknown → typed value or field issues
labs/lab-04-auth real scrypt password hashing + HMAC token sign/verify; fail safe
labs/lab-05-authz role + ownership policy; 401 vs 403 distinct; default-deny
labs/lab-06-api-platform error envelope, pagination clamp, idempotent replay, token bucket
labs/lab-07-jobs retry/backoff + dead-letter queue; idempotent job
labs/lab-08-ops readiness aggregation, config-at-boot, log redaction, drain decision
assignments/capstone integrated strict Forge backend (handlers + behaviour + type-level tests)

Verification

  • Stubs (shipped state): 20/89 tests (22%), exit 1 — RED, type-check clean.
  • Reference solution (verified in a throwaway copy, not shipped): 89/89 tests (100%), strict type-check clean, exit 0 — GREEN.

Confirms the tests are satisfiable and correct, and the starter state fails as intended. Total: 89 tests across 10 exercises.

Restructure the LMS-duplicated module into a work-along starter workspace
mirroring the approved Module 04 template:

- One root toolchain: package.json (typescript, vitest, @types/node),
  strict tsconfig, vitest config, scripts/grade.mjs, Autograde CI workflow.
- 9 self-contained labs + capstone, each with README brief, src/ starter
  (// TODOs), and tests/ that ARE the spec. No answer keys shipped.
- Exercises test pure handler/logic (REST routing, service+repository,
  boundary validation, scrypt/HMAC auth, role+ownership authz, error
  envelope/pagination/idempotency/rate-limit, retry queue/DLQ, ops
  readiness) — no real server or network required.
- Capstone integrates the module into one strict module with behaviour
  and type-level (expectTypeOf) tests.
- Remove Lesson_*/guide/syllabus and flat lab/assignment markdown.

Verified: stubs grade 20/89 (22%, RED); reference solution 89/89 (100%,
type-check clean, GREEN).
@github-actions

Copy link
Copy Markdown

Forge SWEXP — Module 06 autograde

Score: 20/89 tests (22%) · Strict type-check: ✅ clean

Exercise Tests Status
assignments/capstone 2/17
labs/lab-00-setup 0/4
labs/lab-01-rest-api 0/7
labs/lab-02-service-layer 1/9
labs/lab-03-validation 2/7
labs/lab-04-auth 6/11
labs/lab-05-authz 4/10
labs/lab-06-api-platform 1/9
labs/lab-07-jobs 1/6
labs/lab-08-ops 3/9

Keep going — open each exercise folder, implement the // TODOs in its src/, and run npm test. The tests in each tests/ folder are the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant