Skip to content

Convert Module 05 to interactive autograded workspace - #1

Open
IshmaelRogers wants to merge 2 commits into
mainfrom
feat/interactive-workspace
Open

IshmaelRogers wants to merge 2 commits into
mainfrom
feat/interactive-workspace

Conversation

@IshmaelRogers

Copy link
Copy Markdown

What this does

Converts the Module 05 (Frontend Engineering — React/Next.js) course repo from LMS lesson markdown into a clone → implement → npm test starter workspace, following the approved Module 04 template.

Structure

  • One root toolchain: Vitest + jsdom + @testing-library/react / jest-dom / user-event, strict TypeScript (react-jsx, strict, noUncheckedIndexedAccess), vitest.setup.ts importing jest-dom, and scripts/grade.mjs that groups tests by exercise folder and gates on a project-wide strict type-check (tsc --noEmit -p tsconfig.json).
  • Autograde workflow (.github/workflows/autograde.yml): runs npm ci + npm run grade on every push/PR, posts the score to the run summary, and comments it on PRs.
  • 13 self-contained labs + a capstone, each with README.md (brief), src/ (starter with // TODOs), and tests/ (the spec). No answer keys shipped.

Exercises

Folder Autograded core
labs/lab-00-setup typed Badge (tone union) + *.test-d.ts
labs/lab-01-components toneFor, OrderCard, OrderList (data-driven, stable keys)
labs/lab-02-state exhaustive immutable reducer + derived visibleOrders
labs/lab-03-effects debounceReducer + useDebouncedValue (fake-timer cleanup)
labs/lab-04-global-state ThemeProvider + guarded useTheme (throws outside provider)
labs/lab-05-app-router parseOrderParams + nav isActive model
labs/lab-06-server-client renderLocation decision + controlled StatusFilter leaf
labs/lab-07-data isOrder guard + getOrders boundary fetch (injected fetch)
labs/lab-08-design-system tokens + Button (forwards native props) + *.test-d.ts
labs/lab-09-forms validate + submitReducer + accessible OrderForm
labs/lab-10-responsive matches + useMediaQuery (matchMedia stub, cleanup)
labs/lab-11-a11y nextFocusIndex + accessible IconButton
labs/lab-12-performance selectVisibleSorted + memoized useVisibleSorted
assignments/capstone integrated module: selector + data guard + form reducer + StatusBadge

Removed the LMS content (Lesson_*.md, guides, syllabus, flat lab/assignment briefs); kept resources/, .devcontainer/, and the submission templates.

Verification

  • 94 tests across 14 exercise folders (behaviour *.test.ts/.tsx + type-level *.test-d.ts).
  • Stubs: node scripts/grade.mjs31/94 (33%), exit 1 (RED).
  • Reference solutions (implemented in a throwaway temp copy, then deleted — none shipped): 94/94 (100%), exit 0, strict type-check clean (GREEN).

Notes on autogradability

Browser-/server-only deliverables (App Router file conventions, the rendered responsive/a11y passes, the manual keyboard walkthrough, Lighthouse/Profiler measurements) can't run headless, so each affected lab extracts its testable core (pure logic, a typed component/hook, or a decision model) for the autograder and routes the rest to the LMS engineering notebook via its README. Every lab — including the inherently app-centric ones (05, 06, 10, 11) — has a meaningful src + ≥1 test.

Replace the LMS lesson markdown with a clone-implement-test starter workspace
mirroring Module 04: one root toolchain (Vitest + jsdom + Testing Library, strict
TypeScript) and 13 self-contained labs plus a capstone, each with a README brief,
src/ starter (// TODOs), and tests/ spec. The tests are the spec; no answer keys
are shipped. scripts/grade.mjs groups by exercise folder and gates on a project-wide
strict type-check; the Autograde workflow reports the score on every push/PR.

Verified: stubs score 31/94 (RED, exit 1); reference solutions score 94/94 (GREEN,
exit 0, type-check clean).
@github-actions

Copy link
Copy Markdown

Forge SWEXP — Module 05 autograde

Score: 31/94 tests (33%) · Strict type-check: ✅ clean

Exercise Tests Status
assignments/capstone 5/11
labs/lab-00-setup 2/5
labs/lab-01-components 1/4
labs/lab-02-state 1/6
labs/lab-03-effects 2/5
labs/lab-04-global-state 1/5
labs/lab-05-app-router 3/8
labs/lab-06-server-client 3/8
labs/lab-07-data 4/8
labs/lab-08-design-system 4/8
labs/lab-09-forms 1/10
labs/lab-10-responsive 2/5
labs/lab-11-a11y 1/6
labs/lab-12-performance 1/5

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