How ateeb09/resai works
1. Purpose and Runtime Shape
CareerLift AI is a two-tier placement-preparation platform: a React single-page client and a FastAPI API. It provides resume review, interview practice, aptitude tests, coaching chat, analytics, authentication, and subscription billing. Backend entrypoint: backend/server.py; frontend bootstrap/router: frontend/src/index.js, frontend/src/App.js.
2. Frontend Application Shell
React (CRA with CRACO) owns route-level workflows and shared visual shell. App.js composes routing, providers, protected pages, navigation, and sitewide features; the auth context maintains client session state and the API client centralizes backend calls.
• frontend/src/App.js
• frontend/src/lib/auth.jsx
• frontend/src/lib/api.js
Route pages implement the principal user journeys: resume analysis, interview simulation, timed aptitude, dashboard, and pricing. The floating career coach and OTP modal are cross-cutting UI capabilities.
• frontend/src/pages/Resume.jsx
• frontend/src/pages/Interview.jsx
• frontend/src/pages/Aptitude.jsx
• frontend/src/components/Chatbot.jsx
• frontend/src/components/AuthModal.jsx
3. API Composition and Shared Boundaries
FastAPI composes domain routers under /api, configures CORS, and mediates all persistence and external-service access. Dependency logic resolves MongoDB connectivity and optional/required authenticated sessions from cookies or Bearer tokens.
• backend/server.py
• backend/deps.py
• backend/auth_routes.py
The client talks only to this API boundary; credentials and provider keys remain backend environment concerns.
4. Identity, Persistence, and Entitlements
Passwordless email OTP creates/fetches users and issues session tokens. MongoDB persists users, sessions, OTPs, feature histories, and payment transactions. Auth is selectively enforced: dashboard requires identity, while several generation flows can operate anonymously and save history when a session is available.
• backend/auth_routes.py
• backend/deps.py
• backend/dashboard_routes.py
The frontend prevents access to core preparation and pricing routes through a route guard, triggering login UI rather than directly exposing protected workflows.
• frontend/src/components/ProtectedRoute.jsx
• frontend/src/lib/auth.jsx
5. AI Preparation Workflows
Resume upload flows through PDF extraction, Gemini-based structured review, persistence, and optional ReportLab report generation. Interview flow generates a configured five-question session, grades each submitted answer, then saves an aggregate session. Aptitude flow generates ten MCQs, accepts timed submissions, returns explanations, and records attempts.
• backend/resume_routes.py
• backend/pdf_parser.py
• backend/interview_routes.py
• backend/aptitude_routes.py
• backend/gemini_service.py
Gemini is the shared intelligence boundary for resume analysis, interview generation/grading, and conversational coaching; its outputs drive UI scorecards and feedback rather than being generated in the browser.
• backend/gemini_service.py
• backend/chat_routes.py
6. Analytics and Conversational Layer
Dashboard aggregation reads module histories to produce a user-specific progress view. The sitewide chat endpoint maintains contextual coaching conversations, with frontend rendering handled independently from preparation pages.
• backend/dashboard_routes.py
• frontend/src/pages/Dashboard.jsx
• backend/chat_routes.py
• frontend/src/components/Chatbot.jsx
7. External Infrastructure
Material services are MongoDB (application records), Gemini 3 Flash via emergentintegrations (LLM), Resend (OTP delivery, with terminal fallback), Stripe Checkout/webhooks (plan upgrades), PyMuPDF (input PDFs), and ReportLab (downloadable reports). Python 3.10+ runs FastAPI; Node 18+ runs the React build/runtime.
• backend/email_service.py
• backend/payment_routes.py
• backend/requirements.txt
• frontend/package.json
Main entry points: server.py API composition · App.js App shell & routes · api.js API client · gemini_service.py Gemini intelligence
Components 22
React client
Browser SPA and user workflows.
- App shell & routes · Composes providers, navigation, protected pages, and shared UI.
frontend/src/App.js - Auth context
frontend/src/lib/auth.jsx - API client · Centralizes all browser-to-API calls.
frontend/src/lib/api.js - Protected route · Triggers login before core preparation and pricing workflows.
frontend/src/components/ProtectedRoute.jsx - Preparation pages · Runs the three primary assessment journeys.
frontend/src/pages/Resume.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Career coach UI · Cross-cutting conversational coaching interface.
frontend/src/components/Chatbot.jsx
FastAPI API
API, identity, preparation workflows, and analytics.
- API composition · Mounts domain routers under /api and configures CORS.
backend/server.py - OTP identity · Creates or fetches users and issues session tokens.
backend/auth_routes.py - Session dependencies · Resolves MongoDB and optional or required cookie/Bearer sessions.
backend/deps.py - Resume workflow · Extracts, reviews, saves, and can export resume reports.
backend/resume_routes.py - PDF extraction
backend/pdf_parser.py - Interview workflow · Generates five-question sessions, grades answers, and saves aggregates.
backend/interview_routes.py - Aptitude workflow · Generates ten MCQs, evaluates timed submissions, and records attempts.
backend/aptitude_routes.py - Gemini intelligence · Shared generation and grading boundary.
backend/gemini_service.py - Coaching chat · Maintains contextual coaching conversations.
backend/chat_routes.py - Progress analytics · Aggregates user module histories.
backend/dashboard_routes.py - Subscriptions · Starts checkout and handles plan-upgrade webhooks.
backend/payment_routes.py
External services
Managed data, AI, messaging, and billing services.
- MongoDB · Stores users, sessions, OTPs, histories, and transactions.
- Resend · Email delivery has a terminal fallback.
- Stripe · Checkout and webhook provider.
- Gemini 3 Flash
Connections 34
- App shell & routes → Auth context: provides session
- App shell & routes → Protected route: guards routes
- App shell & routes → Preparation pages: routes to
- App shell & routes → Dashboard: routes to
- App shell & routes → Career coach UI: renders sitewide
- Auth context → API client: uses
- Protected route → Auth context: checks identity
- Preparation pages → API client: submits workflows
- Dashboard → API client: loads progress
- Career coach UI → API client: sends chat
- API client → API composition: HTTPS /api
- API composition → OTP identity: mounts
- API composition → Resume workflow: mounts
- API composition → Interview workflow: mounts
- API composition → Aptitude workflow: mounts
- API composition → Coaching chat: mounts
- API composition → Progress analytics: mounts
- API composition → Subscriptions: mounts
- OTP identity → Session dependencies: issues sessions
- Session dependencies → MongoDB: connects and resolves
- OTP identity → Resend: delivers OTP
- Resume workflow → PDF extraction: extracts upload text
- Resume workflow → Gemini intelligence: requests review
- Interview workflow → Gemini intelligence: generates and grades
- Aptitude workflow → Gemini intelligence: generates and explains
- Coaching chat → Gemini intelligence: coaching context
- Gemini intelligence → Gemini 3 Flash: emergentintegrations
- Resume workflow → MongoDB: saves history
- Interview workflow → MongoDB: saves sessions
- Aptitude workflow → MongoDB: records attempts
- Coaching chat → MongoDB: stores context
- Progress analytics → MongoDB: aggregates histories
- Subscriptions → Stripe: checkout and webhooks
- Subscriptions → MongoDB: updates entitlements