How praneeth-18/talenttrek-ai-powered-career-companion works
Project Type and Purpose
• This is a full-stack, microservices-oriented job portal platform. It combines:
• A Next.js 15 front-end (React + Tailwind) with built-in API routes.
• Two Python-based backends:
– resume-service (FastAPI) for AI-driven resume customization.
– AI_Interviewer (Flask/FastAPI) for mock interviews with transcription, TTS, and feedback.
• Scheduled Python scripts for job scraping and link processing.
• PostgreSQL (AWS RDS) for main data and MySQL for interview session data.
• External services: AWS Cognito for auth, OpenAI API for AI tasks, S3 (optionally) for file storage.
File Structure
• Top-level directories:
• src/ – Next.js application (UI + serverless API routes).
• resume-service/ – Microservice with frontend/ and backend/.
• AI_Interviewer/ – Interview microservice.
• scripts/ – Standalone Python/JS job-scraping tools.
• prisma/ – Prisma ORM schema & migrations for Postgres.
• Configuration files: .env.local, Dockerfiles, docker-compose.yml, run_*.sh scripts.
• Each Python service has its own requirements.txt and entrypoint (Uvicorn/Docker).
Main Components and Interactions
a. Frontend (Next.js):
• UI pages, React components, AuthContext.
• Makes HTTP calls to:
• Next.js API routes for user actions, applications, resume downloads.
• Resume Service at RESUME_SERVICE_URL for PDF customization.
• Interview Service at http://localhost:5000 (or Docker port) for chat & sessions.
• Uses AWS Cognito for user login/registration flows via JS SDK.
b. Next.js API Layer (Serverless Functions):
• Routes under src/app/api/… handling CRUD for applications, resumes, user data.
• Uses Prisma client to read/write PostgreSQL on AWS RDS.
• Proxies or redirects to external microservices for specialized tasks.
c. Resume Service (FastAPI):
• Receives /api/customize requests, calls LLM (OpenAI) to generate Markdown or LaTeX.
• Converts to PDF via json_to_pdf.py and generate_pdf.py.
• Optionally stores/retrieves templates from S3 via s3_utils.py.
d. AI Interviewer Service (Flask/FastAPI):
• Manages /interviews, /api/chat, transcription, question generation, evaluation.
• Stores sessions and transcripts in MySQL (connected via database.py).
• Calls OpenAI for question generation and evaluation.
e. Job-Scraper Scripts:
• Scheduled via run_job_scheduler.sh / job_scheduler.py.
• Scrape listings, normalize data, insert into AWS RDS Postgres (db-connector.ts or direct SQL).
• Fetch actual links with fetch_actual_links.sh.
f. Databases:
• PostgreSQL (AWS RDS): job listings, user applications, interactions.
• MySQL: interview session data and transcripts.
Architectural Patterns and Design Principles
• Microservices: resume customization & interview services are isolated deployments.
• Serverless functions for the main API, reducing infrastructure overhead.
• Shared database for core data, per-service storage for specialized data.
• Asynchronous scheduled tasks for data ingestion (job scraping).
• Externalization of auth (AWS Cognito) and AI compute (OpenAI).
Essential Elements
• Labels: Component names + key tech (e.g., “Next.js App (React + Tailwind)”).
• Blue: User-facing UI
• Green: Core API
• Orange/Purple: Microservices
• Yellow: Databases
• Grey: External
• Notes:
• Authentication flow via Cognito.
• AI calls to OpenAI.
• Scheduled scraping tasks.