PrepEdge-AI icon indicating copy to clipboard operation
PrepEdge-AI copied to clipboard

Enhance Interview Setup Page with Multi-Step Form and Resume Upload

Open namami-13 opened this issue 1 year ago • 5 comments

PR Description

Issue Number: #94

Type of Changes

  • [x] Frontend feature / UI improvement
  • [ ] Bug fix
  • [ ] Refactor
  • [ ] Documentation update

Changes Implemented:

  • Updated interview form alignment for better layout
  • Made the form mobile-responsive across different screen sizes
  • Implemented multi-step form:
    1. Basic Info
    2. Company & Job Info
    3. Resume Upload
  • File upload supports PDF only with max size 5MB
  • Added progress bar that updates correctly across steps
  • Added toast notifications for success and error messages
  • Form submission triggers API call to set up interview

Screenshots / Demo:

Screenshot 2025-09-17 at 8 17 13 PM Screenshot 2025-09-17 at 8 17 35 PM Screenshot 2025-09-17 at 8 19 19 PM Screenshot 2025-09-17 at 8 19 41 PM

Environment Variables

  • No environment variables required for frontend functionality
  • Backend endpoint must be live for form submission

Checklist

  • [x] Code follows project style guidelines
  • [x] Changes are tested locally and work as expected
  • [x] Documentation / comments added where necessary
  • [x] PR description follows project template
  • [x] Screenshots attached

Summary by CodeRabbit

  • New Features

    • Global toast notifications for consistent feedback.
    • Email/password, Google, and GitHub login flows.
    • Streamlined 3-step Create Interview form with resume upload and progress.
    • App layout now uses dynamic routing with persistent header/footer.
    • Contact API endpoint and protected routes added.
  • Bug Fixes

    • More robust Dashboard and Interview list handling with clear empty states.
  • Style

    • Refreshed Footer and FAQ visuals, responsive tweaks, and animated toast styling.
  • Chores

    • Added react-hot-toast dependency.
    • Moved nodemon to devDependencies.

namami-13 avatar Sep 17 '25 14:09 namami-13

Someone is attempting to deploy a commit to the coderuzumaki's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 17 '25 14:09 vercel[bot]

Walkthrough

Client adds react-hot-toast and refactors App layout to include Toaster and Outlet; Login/SignUp and CreateInterview use Firebase ID tokens and toasts; several components receive UX/defensive updates. Server adds Firebase Admin init, token-verifying middleware, mounts auth/interview/report/contact routes, and moves nodemon to devDependencies.

Changes

Cohort / File(s) Summary
Client toast integration & app shell
client/package.json, client/src/App.jsx
Adds react-hot-toast dependency. App renders Toaster with custom styling, uses Outlet for routed pages, and includes ScrollToTop, Header, Footer.
Auth pages — token exchange & toast usage
client/src/pages/Login.jsx, client/src/pages/SignUp.jsx
Replaces local Toast with react-hot-toast. Login/SignUp obtain Firebase ID tokens and POST to /api/auth/login; adds email/password and OAuth flows using getIdToken, simplified validation and navigation.
Create Interview flow & file validation
client/src/pages/CreateInterview.jsx
Replaces multi-step wizard with streamlined 3-step form + progress bar; adds PDF-only resume validation (5MB), drag-and-drop, FormData submission with token, and toast feedback.
Dashboard normalization & charts
client/src/pages/Dashboard.jsx
Defensive normalization of API responses (arrays fallback), safer chart/summary computation with defaults.
InterviewList pagination & safety
client/src/components/InterviewList.jsx
Defaults interviews prop to [], coerces to safe array, simplified pagination rendering and empty-state message.
ContactForm simplification
client/src/components/ContactForm.jsx
Removes submitted-state view; on success shows alert and resets form; streamlines POST and layout with spinner on submit.
FAQ accessibility & icon update
client/src/components/FAQ.jsx
Uses single rotating FaChevronDown, adds per-item aria-controls/id, minor layout and centering tweaks.
Footer responsive refinements
client/src/components/Footer.jsx
Adjusted spacing, responsive alignment, simplified link markup, resized social icons, and compacted bottom links.
App layout / other UI tweaks
client/src/components/*, client/src/*
Misc layout/styling updates across components (inline keyframes for toast gradient, grid/breakpoint tweaks).
Server Firebase Admin init & routes
server/firebase.js, server/index.js
New server/firebase.js exports initialized Admin SDK from env service account; server/index.js imports it, adds dotenv config, inserts token-verifying middleware for protected routes, and mounts authRoutes, interviewRoutes, reportRoutes, contactRoutes.
Server package tidy
server/package.json
Moves nodemon to devDependencies and adjusts scripts formatting.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant C as Client (Login/SignUp)
  participant FB as Firebase Client SDK
  participant API as Backend (/api/auth)
  participant ADM as Firebase Admin (Server)

  U->>C: Submit credentials or click OAuth
  C->>FB: signInWithEmailAndPassword / signInWithPopup
  FB-->>C: Credential (user)
  C->>FB: user.getIdToken()
  FB-->>C: ID Token (JWT)
  Note over C: Add Authorization: Bearer <ID Token>
  C->>API: POST /api/auth/login
  API->>ADM: admin.auth().verifyIdToken(ID Token)
  alt Valid token
    ADM-->>API: Decoded token
    API-->>C: 200 OK (user/session)
    C-->>U: Show success toast and navigate
  else Invalid/expired
    ADM-->>API: Error
    API-->>C: 401 Unauthorized
    C-->>U: Show error toast
  end
sequenceDiagram
  autonumber
  participant Client as Frontend
  participant API as Backend
  participant MW as /api/protected middleware
  participant ADM as Firebase Admin

  Client->>API: Request to protected endpoint (Bearer token)
  API->>MW: Invoke middleware
  MW->>ADM: verifyIdToken(token)
  alt Verified
    MW-->>API: req.user populated
    API-->>Client: 200 OK (protected data)
  else Missing/Invalid
    MW-->>Client: 401 Unauthorized
  end

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • CoderUzumaki/PrepEdge-AI#78 — Overlaps App.jsx and Footer.jsx layout changes and may conflict with header/footer routing updates.

Suggested labels

enhancement, Level 2

Poem

I hop through routes where tokens gleam,
A little toast pops—what a dream! 🍞✨
Admin nods and checks each key,
Pages render fast and free.
Carrots, code, and cookies—cheers to tea! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Enhance Interview Setup Page with Multi-Step Form and Resume Upload" concisely and accurately summarizes the primary change in this PR — adding a multi-step interview setup form with resume upload and validation — and aligns with the PR objectives and modified CreateInterview page. It is specific, clear, and appropriate for teammates scanning project history.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • [ ] 📝 Generate Docstrings
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Sep 17 '25 14:09 coderabbitai[bot]

@pushh-k @CoderUzumaki Please review this PR whenever you get time 🙌
Implemented the multi-step interview setup form with:

  • File upload (PDF + size validation)
  • Progress bar
  • Toast notifications
  • API integration and Could you please add the GSSoC labels to this PR?

namami-13 avatar Sep 17 '25 14:09 namami-13

Hi, thanks for the contribution! 🙌

Please follow the PR template. Kindly update your PR to match the required format(You've not mentioned the Issue number fixed).

LGTM! @CoderUzumaki @RedK22 Please give a look!

pushh-k avatar Sep 17 '25 17:09 pushh-k

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
prepedge_ai Ready Ready Preview Comment Sep 20, 2025 2:01pm

vercel[bot] avatar Sep 20 '25 14:09 vercel[bot]