Skip to content

Proposal/teacher onboarding mvp#595

Open
CarlyAThomas wants to merge 14 commits into
freeCodeCamp:mainfrom
CarlyAThomas:proposal/teacher-onboarding-mvp
Open

Proposal/teacher onboarding mvp#595
CarlyAThomas wants to merge 14 commits into
freeCodeCamp:mainfrom
CarlyAThomas:proposal/teacher-onboarding-mvp

Conversation

@CarlyAThomas

@CarlyAThomas CarlyAThomas commented May 18, 2026

Copy link
Copy Markdown
Contributor

Checklist:

This PR is not associated with a specific issue

Case Study (Teacher Invite Acceptance Flow)

  1. Admin creates/resends a teacher invite from the admin dashboard.
  2. System sends a secure email link: /teacher/invite/<token>.
  3. Invited teacher signs in with the invited email.
  4. Teacher accepts invite.
  5. Invitation becomes ACCEPTED and user role is set to TEACHER.

What Changed (and Why)

Validation

  • npm run lint:code
  • npm test

How to Test

Prerequisites
This branch allows you to create an ADMIN account and send out email invitations to users to onboard as teachers.
You need:

  • 1 "Admin" email (to serve as your ADMIN, and set up your Classroom account)
  • 1+ extra "Teacher" emails (to receive email invites and onboard as teachers)

Configuring this branch for local development

  1. Create a local branch that tracks the CarlyAThomas:proposal/teacher-onboarding-mvp branch.
  2. Run cp .env.development.example .env.development
  3. Update SMTP_USER in .env.development with your Admin Email.
  4. Go to myaccount.google.com/apppasswords. Make sure you're using your ADMIN email for steps 3-6.
  5. Type in the name of the Application (FCC Classroom) and select create.
  6. Google generates a 16-character password
  7. Copy that password (not your Gmail password)
  8. Update SMTP_PASS in .env.development with the new password.

Running the app

  1. In the terminal, run npx prisma migrate reset, and press y to reset your database.
  2. Run npm run develop and npx prisma studio to run the project.
  3. Log in with your "Admin" email.
  4. In prisma studio, set your Admin account's role to ADMIN.

Testing

  1. Go to the /admin page
  2. Type out your TEACHER email address, then press Enter.
  3. Open an Incognito tab, or a different browser, so you can log into a different account.
  4. Go to your TEACHER email address and onboard using the link provided. (Use Case: Onboarding a Teacher with a brand new account)
  5. (Alternative) Open localhost:3001 again and create a Classroom account with your TEACHER email address. Then, repeat step 4. (Use Case: Onboarding a Teacher who already has an account)

…ity signature

- Convert pages/error.js and pages/teacher/invite/[inviteToken].js to modern Next.js Link pattern (no nested anchors)
- Refactor util/inviteEmail.js to accept object params {invitedTeacherEmail, inviteUrl, expiresAt, invitedByEmail}
- Ensures proper Nodemailer integration for teacher invitation emails
- redesign invite acceptance page with FCC-aligned styling
- update teacher invitation email content and branding hierarchy
- fix teacher invite post-accept redirect by role
- improve revoke API message for inactive invites
- add README testing/setup notes for SMTP invite flow
@CarlyAThomas CarlyAThomas requested a review from a team as a code owner May 18, 2026 22:40
@socket-security

socket-security Bot commented May 18, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednodemailer@​6.10.198819795100

View full report

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