Skip to content

feat: integrate fCC API for student completion data#602

Open
NewtonLC wants to merge 4 commits into
freeCodeCamp:mainfrom
NewtonLC:feat/freecodecamp-API-Integration
Open

feat: integrate fCC API for student completion data#602
NewtonLC wants to merge 4 commits into
freeCodeCamp:mainfrom
NewtonLC:feat/freecodecamp-API-Integration

Conversation

@NewtonLC

@NewtonLC NewtonLC commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Checklist:

Closes #548

This PR is a re-opening of #585, which belonged to @raisedadead.

raisedadead and others added 2 commits March 6, 2026 14:04
  Connect the classroom app to freeCodeCamp's service-to-service API
  endpoints for fetching real student completion data instead of mock
  json-server data.

  - Add util/fcc-api.js (Bearer token auth, auto-batching at 50 IDs)
  - Add fetchClassroomStudentData() to fetchStudentData.js
  - Resolve fccProperUserId on student join (non-blocking)
  - Dashboard pages conditionally use fCC API when FCC_API_URL is set
  - Add FCC_API_URL and TPA_API_BEARER_TOKEN to .env.sample
NewtonLC added 2 commits June 12, 2026 09:50
… bundle

challengeMapUtils.js uses Node's `fs` at module load time. Importing it
at the top level of fetchStudentData.js caused Next.js to pull `fs` into
the client-side bundle during `next build`, failing with
"Can't resolve 'fs'".

Switching to a dynamic import inside fetchClassroomStudentData keeps the
module server-side only — it is never evaluated during client bundling.
@NewtonLC NewtonLC self-assigned this Jun 14, 2026
@NewtonLC

Copy link
Copy Markdown
Contributor Author

The CodeFactor check is failing due to unresolved TODO comments. However, those comments were not part of this PR and don't affect whether or not this PR can be merged.

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.

Feature: Integrate with freeCodeCamp Proper's API for getting student dat

2 participants