How agilepartners-ai/myjobsearchagent works
Project Type & Purpose
• This is a full-stack, single-page application (SPA) for AI-powered job search, built with React + TypeScript and Vite.
• The “frontend” is a Vite-bundled React app hosted on Netlify.
• The “backend” consists of BaaS and serverless functions (Supabase edge functions) plus external APIs (job-search API, AI services), with Firebase/Supabase used for authentication and data storage.
• There’s also a small Python Flask/Django CORS server used locally for development.
Main Components
a. Client (Browser)
• React SPA (src/)
• Web Worker (tavusWorker.js / src/workers/tavusWorker.ts) for handling video/AI interview tasks
• Static assets (public/)
b. Hosting/CDN
• Netlify serving the built “dist” folder
c. BaaS & Serverless
• Supabase
• Authentication (supabaseAuthService.ts)
• Postgres Database (job applications, conversations, user profile)
• Edge Functions (resume-proxy in src/supabase/functions/resume-proxy)
• Firebase Authentication (configured via environment variables)
d. External APIs
• Job search API (JSEARCH_API_HOST / JSEARCH_API_KEY)
• Any AI/ML services (OpenAI or vendor for resume optimization)
e. Dev CORS Proxy
• Flask app (server/flask_app.py) and Django CORS settings for local testing
Component Interactions & Data Flow
• User interacts with the React UI → calls client-side “services” (e.g., jobSearchService.ts, conversationService.ts).
• Services either:
• Invoke Supabase JS client (for auth, profile, application tracking), or
• Call serverless endpoints (resume-proxy edge function), or
• Hit external APIs (JSearch, AI resume service).
• Responses flow back to the UI; state is managed in Redux slices (src/store) and React Query style boundaries.
• The Web Worker offloads compute-heavy interview tasks, communicates via postMessage to the main thread.
• CI/CD (GitHub Actions) scans secrets, lints, tests, then deploys to Netlify.
Architectural Patterns & Design Principles
• SPA with clear separation: Presentation (components/screens) ↔ Business Logic (services/hooks) ↔ Data Layer (Supabase / external APIs)
• Service-oriented: each “service” module encapsulates one API integration
• Modular folder structure: components, hooks, services, store, utils
• Serverless backend: BaaS + Edge Functions instead of monolithic server