How rayyan9477/autoapply-ai-agentic-browser-automation-for-job-search works
Purpose and Entry Points
AutoApply AI is a full-stack job-application workspace: discover jobs, analyze/tailor resumes, manage approval-driven applications, and execute browser automation. The FastAPI app starts at backend/app/main.py; versioned REST routes aggregate in backend/app/api/v1/router.py, with real-time updates exposed by backend/app/api/websocket/endpoint.py. The React/Vite client starts at frontend/src/main.tsx and composes routing/UI in frontend/src/App.tsx.
Client, API, and Tenant Boundary
The frontend has route-level job, application, resume, analytics, and settings views, backed by typed API service modules and client state. It communicates with the backend over REST and WebSocket, rather than directly accessing persistence or automation systems. Authentication/authorization and request dependencies are centralized at backend/app/api/v1/auth.py and backend/app/api/deps.py; tenant-aware database access is represented by backend/app/db/tenant.py.
API and Service Orchestration
Route handlers are thin API boundaries for core workflows: jobs, resumes, applications, settings, analytics, and administration. Business orchestration belongs in services, which coordinate models, scoring, storage, queues, and external providers. Key paths: backend/app/api/v1/jobs.py, backend/app/api/v1/applications.py, backend/app/services/application.py, backend/app/services/resume.py, and backend/app/services/job_search.py.
Persistence, State, and Async Execution
SQLAlchemy models capture users, resumes, jobs, applications, platform sessions, credentials, settings, and LLM usage. Database access is asynchronous and migrations are Alembic-managed. Redis supplies queue/cache infrastructure; application submission is dispatched to workers, separating durable application state and approval decisions from long-running browser runs. Key paths: backend/app/db/session.py, backend/app/models/application.py, backend/app/services/dispatch.py, backend/app/workers/tasks.py, and backend/app/db/arq.py. SQLite is the default runtime database; PostgreSQL is supported.
Resume and ATS Pipeline
Resume upload/generation flows parse PDF/DOCX input, persist documents via a pluggable storage abstraction, render output documents, and evaluate candidate-job fit. The ATS subsystem separates keyword, skills, experience, and scoring/optimization concerns; LLM prompting supports tailoring and cover-letter generation. Key paths: backend/app/core/documents/parser.py, backend/app/core/documents/generator.py, backend/app/core/ats/scorer.py, backend/app/core/ats/optimizer.py, and backend/app/core/llm/client.py. Storage can be local or S3 via backend/app/core/storage/factory.py.
Discovery and Application Automation
Job search is orchestrated through service/API layers and includes Exa semantic search. Automated application execution is platform-adapter based: a registry selects LinkedIn, Indeed, or Glassdoor implementations; runtime stages observe pages and apply through managed browser sessions. Human intervention and configured apply mode are important control boundaries before submission. Key paths: backend/app/core/job_discovery/exa_search.py, backend/app/core/automation/platforms/registry.py, backend/app/core/automation/runtime/apply.py, backend/app/core/automation/session_manager.py, and backend/app/core/automation/intervention.py. Browser-use/Playwright are the material automation runtime dependencies.
External Services, Events, and Operations
LLM access uses a provider factory/client with usage tracking and fallback-capable provider configuration; supported gateways/providers include LiteLLM/Portkey and OpenAI-family integrations. Credentials are isolated behind secret-store abstractions. WebSocket bus/events propagate worker progress to the UI. Logging, tracing, and Prometheus metrics form the observability boundary. Deployment uses Docker Compose with API, frontend, worker, Redis, and reverse-proxy definitions in docker-compose.yml, docker/Dockerfile.worker, and Caddyfile.
Main entry points: application.py Workflow services · tasks.py Application worker · router.py v1 routes · parser.py Resume pipeline
Components 21
Client
- React workspace · Job, resume, application, analytics, and settings views.
frontend/src/App.tsx - Client entry
frontend/src/main.tsx
API & orchestration
- FastAPI app
backend/app/main.py - v1 routes · Jobs, resumes, applications, settings, analytics, and admin boundaries.
backend/app/api/v1/router.py - Auth & tenant scope · Enforces authorization and tenant-aware access.
backend/app/api/v1/auth.py - Jobs API
backend/app/api/v1/jobs.py - Applications API
backend/app/api/v1/applications.py - Workflow services · Coordinates application, resume, and job-search workflows.
backend/app/services/application.py - Tenant database · Durable users, resumes, jobs, applications, sessions, and settings.
backend/app/db/session.py - Resume pipeline · Parses, renders, scores, optimizes, and tailors resumes.
backend/app/core/documents/parser.py - LLM providers · Tailoring and cover-letter generation with usage tracking.
backend/app/core/llm/client.py - Document storage
backend/app/core/storage/factory.py - Job discovery · Uses Exa-backed job search.
backend/app/core/job_discovery/exa_search.py
Async processing
- Submission dispatch · Queues approved application runs.
backend/app/services/dispatch.py - Redis
backend/app/db/arq.py - Application worker · Executes long-running submission tasks and emits progress.
backend/app/workers/tasks.py - Realtime updates · Relays worker progress to the client.
backend/app/api/websocket/endpoint.py
Automation
- Browser application runtime · Applies through managed browser sessions after intervention checks.
backend/app/core/automation/runtime/apply.py - Platform adapters · Selects LinkedIn, Indeed, or Glassdoor implementations.
backend/app/core/automation/platforms/registry.py - Browser sessions
backend/app/core/automation/session_manager.py
Other components
- Deployment & observability · Compose deploys API, client, worker, Redis, and proxy with logging, tracing, and metrics.
docker-compose.yml
Connections 25
- Client entry → React workspace: boots
- React workspace → FastAPI app: REST and WebSocket
- FastAPI app → v1 routes: mounts
- v1 routes → Auth & tenant scope: applies
- Auth & tenant scope → Tenant database: scopes access
- v1 routes → Jobs API: routes
- v1 routes → Applications API: routes
- Jobs API → Workflow services: delegates
- Applications API → Workflow services: delegates
- Workflow services → Tenant database: persists state
- Workflow services → Resume pipeline: tailors resumes
- Resume pipeline → Document storage: stores documents
- Resume pipeline → LLM providers: generates content
- Workflow services → Job discovery: searches jobs
- Workflow services → Submission dispatch: queues approved apply
- Submission dispatch → Redis: enqueues
- Application worker → Redis: consumes
- Application worker → Tenant database: updates application state
- Application worker → Browser application runtime: runs submission
- Browser application runtime → Platform adapters: selects adapter
- Browser application runtime → Browser sessions: uses
- Application worker → Realtime updates: publishes progress
- Realtime updates → React workspace: pushes updates
- Deployment & observability → FastAPI app: deploys
- Deployment & observability → Application worker: deploys