Skip to content

Conversation

@CarlyAThomas
Copy link
Contributor

Checklist:

This PR is part of the PRs for FCC Proper Integration

Summary

This PR adds challenge map generation from FCC GraphQL and utilities to transform FCC Proper student data into classroom dashboard format.
In addition it scopes tests to challenge-map only; excludes FCC Proper and sync tests (those remain in their feature PRs).

Changes

Build script: build-challenge-map-graphql.mjs (generates data/challengeMap.json)
Utilities: challengeMapUtils.js (buildStudentDashboardData, resolveAllStudentsToDashboardFormat)
Tests: challengeMapUtils.test.js (23 unit/integration cases)
NPM script: test:challenge-map

Rationale

This provides a stable, static curriculum lookup for transforming student progress into dashboard-ready structures.
It also keeps scope tight; FCC Proper proxy/sync work is handled separately so those are separate PRs

Testing

Focused unit tests: npm run test:challenge-map
Optional manual map build: node scripts/build-challenge-map-graphql.mjs

Out of Scope

FCC Proper two-call validation utilities/endpoints
Sync utilities for FCC Proper IDs
Authorization, error handling, v1→v2 migration

Follow-Ups

Merge feat/fcc-proxy-two-call-validation (endpoints + tests)
Add authorization/error handling middleware
Migrate internal endpoints v1→v2
Wire utilities to endpoints for end-to-end flow

Checklist

Build challenge map from GraphQL
Transformation utilities for student data
Focused challenge-map tests
npm run test:challenge-map
FCC Proper/sync tests excluded from this PR

- Add scripts/build-challenge-map-graphql.mjs to generate challengeMap.json
  * Fetches curriculum from FCC GraphQL API
  * Builds flat map with { certification, block, name } structure
  * Output: data/challengeMap.json with 12,847 unique challenges
  * Run: node scripts/build-challenge-map-graphql.mjs

- Add util/challengeMapUtils.js for transforming student data
  * resolveAllStudentsToDashboardFormat() - converts FCC Proper student data to dashboard format
  * buildStudentDashboardData() - groups challenges by certification and block

- Update .gitignore to exclude generated data/challengeMap.json
- Update challenge map builder to store all superblocks and blocks as arrays
- This allows tracking when a challenge appears across multiple superblocks/blocks
- Update challengeMapUtils to use first array element as canonical for dashboard grouping
- First occurrence becomes the primary certification/block for the student dashboard
- Full association history preserved in allSuperblocks/allBlocks arrays for future use

Resolves: Ability to know all superblock associations per challenge
@CarlyAThomas CarlyAThomas requested a review from a team as a code owner January 27, 2026 02:07
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