How batouldev/ai-job-agent works
This is an AI-assisted job-search application: users sign up, upload and review a CV, set preferences, then receive job matches and manage applications and cover letters from a dashboard. Separate automation workflows ingest jobs and analyze CVs; internal API routes support those workers. The tree also shows payments and a daily-news feature. The graph highlights substantiated calls and data access; several automation-to-API links are dashed because the workflow excerpts do not establish their wiring, and the README offers no product-specific architecture.
Main entry points: auth Authentication · page.tsx Dashboard and matches · server.ts Supabase · ingestSourceBatch.ts Job ingestion
Components 20
Identity and onboarding
- Authentication
src/app/api/auth - Auth rate limits
src/lib/authRateLimit - Onboarding
src/app/onboarding
Job discovery
- Job ingestion
src/lib/ingestion/ingestSourceBatch.ts - Job providers
src/lib/ingestion/providerConfig.ts - Ingestion workflows
n8n-workflows/ai-job-agent-01-job-ingestion.ts - Job matching
src/lib/matching - Matching workflow
n8n-workflows/ai-job-agent-02-job-matching.ts
Career assistance
- CV analysis
src/app/api/cv-analysis - CV analysis worker
n8n-workflows/cv-analysis-worker.ts - Cover letters
src/lib/coverLetters - Letter generation
n8n-workflows/ai-job-agent-03-cover-letter-generation.ts
Job-seeker experience
- Dashboard and matches
src/app/dashboard/page.tsx - Applications
src/lib/applications - Daily job news
src/lib/dailyNews
Platform services
- Checkout
src/app/api/checkout/route.ts - Payment attempts
src/lib/payments/checkout.ts - Supabase
src/lib/supabase/server.ts - Admin Supabase client
src/lib/supabase/admin.ts
Other components
- Job seeker
Connections 23
- Job seeker → Authentication: signs up or in
src/app/api/auth/login/route.ts - Authentication → Auth rate limits: reserves attempts
src/app/api/auth/login/route.ts - Authentication → Supabase: authenticates
src/app/api/auth/login/route.ts - Auth rate limits → Admin Supabase client: creates client
src/lib/authRateLimit/rateLimit.ts - Authentication → Onboarding: routes after sign-in
- Job seeker → Onboarding: sets preferences
- Onboarding → CV analysis: submits CV
- CV analysis → Supabase: reads and writes
src/app/api/cv-analysis/submit-feedback/route.ts - CV analysis worker → CV analysis: handles analysis tasks
- Ingestion workflows → Job ingestion: runs ingestion
- Job ingestion → Job providers: loads provider config
src/lib/ingestion/ingestSourceBatch.ts - Job ingestion → Supabase: upserts jobs
- Ingestion workflows → Matching workflow: feeds matching
- Matching workflow → Job matching: runs matching
- Job matching → Dashboard and matches: supplies matches
- Job seeker → Dashboard and matches: reviews matches
- Dashboard and matches → Applications: manages applications
- Dashboard and matches → Cover letters: requests letters
- Letter generation → Cover letters: generates letters
- Job seeker → Daily job news: reads briefings
- Job seeker → Checkout: starts checkout
src/app/api/checkout/route.ts - Checkout → Payment attempts: starts attempt
src/app/api/checkout/route.ts - Payment attempts → Supabase: persists attempt