TalentSync

AI resume builder and ATS optimizer for job seekers. Tailored resumes, outreach, and interview prep from one profile.

Feature implementation

The core capabilities of TalentSync:

  • Resume analysis engine: text processing pipeline, NLP integration, and result structuring
  • ATS optimization system: keyword analysis, formatting recommendations, and compatibility scoring
  • Interview preparation system: question generation logic, answer evaluation criteria, and interview analytics
  • Communication tools: cold email generation, cover letter creation, and LinkedIn post generator
  • User management, role-based access control, and authentication integration
  • Feature-specific UI components, state management, and API integrations

The platform combines a Next.js frontend with a FastAPI backend, integrating LangChain-based NLP prompts and Pydantic models for structured outputs. The backend exposes REST APIs organized by feature domains, while the frontend consumes these APIs and renders domain-specific UI components.

Repository layout#

The repository keeps layers apart:

  • Backend (FastAPI): routes, services, models, prompts, and core infrastructure
  • Frontend (Next.js): pages, components, services, and UI state management
  • Shared data models and prompts under backend for consistent schema enforcement
  • Authentication via Google OAuth on FastAPI (ts_access_token)

Building blocks#

This section outlines the primary building blocks powering each feature area.

  • Resume Analysis Engine

  • Routes: file-based and text-based endpoints for resume analysis and formatting

  • Service: orchestrates document processing, LLM-driven extraction, validation, and cleanup

  • Models: detailed analysis data structures and typed responses

  • Prompts: structured prompt template for extracting rich, UI-ready data

  • ATS Optimization System

  • Routes: evaluation endpoints supporting both file-based and text-based inputs

  • Service: validates inputs, retrieves JD content (link or file), and normalizes evaluator output

  • Models: request/response schemas for structured evaluation results

  • Prompts: ATS analysis prompt defining keyword coverage, compatibility, and recommendations

  • Interview Preparation System

  • Routes: session lifecycle, answer submission (streaming and non-streaming), code execution, summary generation, and event recording

  • Services: graph orchestration, session management, question generation, answer evaluation, and summary generation

  • Models: interview configuration, templates, and event enums

  • Communication Tools

  • Cold email: form and panel components with selection and generation flows

  • Cover letter: form and panel components with selection and generation flows

  • LinkedIn post: generator UI components

  • User Management and Authentication

  • FastAPI Google OAuth. Prisma still hydrates getSession() from User

  • Role-based access control via database schema and frontend guards

How it fits together#

The system architecture integrates frontend UI components with backend APIs, which delegate to services and prompts orchestrated by LangChain. The backend centralizes routing, middleware, and logging, while the frontend manages user interactions, state, and API consumption.

Resume analysis engine#

The resume analysis engine processes uploaded or formatted resume content, cleans and structures it, and produces a detailed profile suitable for UI rendering and downstream ATS scoring.

  • Text Processing Pipeline

  • File-based analysis reads the uploaded file, writes a temporary file, extracts text, removes the temp file, validates content, and optionally formats text via LLM before JSON extraction.

  • Text-based analysis accepts pre-formatted text, validates it, and performs detailed analysis.

  • Formatting and analysis endpoint returns cleaned text plus structured analysis.

  • NLP Integration

  • Detailed analysis prompt instructs the LLM to produce a JSON object conforming to the ComprehensiveAnalysisData model, covering skills, languages, education, work experience, projects, publications, positions of responsibility, certifications, achievements, and personal links.

  • Structured extraction ensures consistent schema compliance and UI rendering.

  • Result Structuring

  • Responses include typed models for resume analysis, detailed analysis, and formatted-and-analyzed results.

  • Portfolio links are normalized across multiple potential field aliases.

ATS optimization system#

The ATS optimization system evaluates a resume against a job description, computes keyword coverage, compatibility scores, and concrete recommendations.

  • Input Handling

  • Accepts either raw JD text or a JD link; supports optional company context.

  • Validates payload to ensure at least one source of the job description is provided.

  • Evaluation Workflow

  • Retrieves JD content from a link if needed.

  • Normalizes evaluator output to a structured response with success flag, message, score, reasons, and suggestions.

  • Scoring and Recommendations

  • The prompt defines metrics such as semantic similarity, contact completeness, content quality, formatting, keyword coverage, and density.

  • Outputs composite score, strengths, areas for improvement, recommended keywords, and structured recommendations.

Interview preparation system#

Interview prep covers the full lifecycle: session creation, question delivery, answer evaluation (with streaming), code execution, and summary generation.

  • Session Lifecycle

  • Create session with profile and configuration; returns current question.

  • Retrieve, list, and delete sessions; filter by status.

  • Record interview events (e.g., tab switches) for integrity tracking.

  • Answer Evaluation

  • Non-streaming and streaming endpoints for answer submission.

  • Streaming uses Server-Sent Events to simulate typing and deliver final evaluation.

  • Code Execution

  • Execute candidate code for coding questions and stream execution results followed by review.

  • Summary Generation

  • Generate final interview summary (non-streaming and streaming).

Communication tools#

Communication tools enable generating cold emails, cover letters, and LinkedIn posts. The frontend provides dedicated forms and panels, while backend routes handle generation and persistence.

  • Cold Email Generation

  • UI components: EmailDetailsForm and GeneratedEmailPanel

  • Selection and generation flows handled by frontend services

  • Cover Letter Creation

  • UI components: CoverLetterDetailsForm and GeneratedLetterPanel

  • LinkedIn Post Generator

  • UI components for post generation

User management, role-based access control, and authentication#

Auth is Google OAuth on FastAPI. NextAuth is gone. Roles live on User.role. /dashboard/seeker is the resume workspace. /dashboard/recruiter is leftover chrome, not TalentSync-HR.

  • Authentication

  • backend/app/routes/auth.py plus frontend/lib/session.ts

  • Live routes: OAuth, /me, /refresh, /logout, /update-role, /delete-account

  • Password routes return 410 unless CREDENTIALS_AUTH_ENABLED

  • Role-based access

  • USER | RECRUITER | ADMIN on the user row

  • proxy.ts plus page-level useSession() guards

Dependencies#

The backend organizes features into routers, services, models, and prompts. The frontend composes UI components and consumes services that call backend endpoints.

Performance#

  • Asynchronous processing: All major services operate asynchronously to avoid blocking I/O and LLM calls.
  • Temporary file handling: Writes to disk are minimized and removed immediately after processing to reduce I/O overhead.
  • Payload normalization: Reliable input validation and normalization prevent repeated parsing and reduce error handling costs.
  • Streaming responses: Interview answer and summary endpoints use Server-Sent Events to provide responsive UX and incremental feedback.
  • Caching and reuse: Consider caching processed documents and LLM outputs where appropriate to reduce redundant computations.

[No sources needed since this section provides general guidance]

Troubleshooting#

  • Resume Analysis

  • Unsupported file type or processing errors: Ensure the file format is supported and readable; verify LLM availability.

  • Validation errors: Confirm extracted data conforms to expected schema; check alias normalization for portfolio links.

  • Empty or invalid resume text: Validate content presence and structure before analysis.

  • ATS Evaluation

  • Missing job description: Provide either JD text or a valid JD link; ensure link accessibility.

  • JSON decoding failures: Validate evaluator output format; handle non-dictionary outputs gracefully.

  • Web retrieval errors: Confirm external link availability and network connectivity.

  • Interview System

  • Session not found: Verify session identifiers and lifecycle states.

  • Streaming errors: Ensure client supports SSE and network stability.

  • Code execution failures: Validate language support and test inputs.

  • Authentication and Authorization

  • Auth: Google redirect URI and matching JWT_SECRET / BACKEND_JWT_SECRET. NextAuth is gone.

  • Role mismatches: Confirm user roles in the database and frontend guards.