How mahmudul-islam32/ai-resume-builder works
1. High-level shape
- This is a two-tier product: a SvelteKit frontend in frontend/ and a FastAPI backend in backend/.
- The app is centered on a workflow for resume upload/editing, job scraping, ATS scoring, cover-letter generation, and application tracking.
2. Frontend boundary
- The frontend is a SvelteKit + TypeScript SPA/SSR app with routes for each user workflow: login, register, dashboard, resumes, jobs/search, match, cover-letters, applications, and interviews.
- Shared UI and feature logic live under src/lib/:
- components/ for reusable UI blocks like upload, editor, charts, job display, and dashboards.
- services/ for client-side API wrappers and local scoring/document utilities.
- stores/auth.ts for session/auth state.
- src/routes/+layout.* suggests the app shell manages navigation and cross-cutting state.
3. Backend boundary
- The backend is a FastAPI application organized by versioned API routes in backend/app/api/v1/.
- Endpoints are split by domain: auth, users, resumes, jobs, ats, ai, applications, and interviews.
- main.py is the application entrypoint, and router.py likely composes the v1 API into the main app.
4. Core backend layers
- core/ holds cross-cutting infrastructure:
- config.py for environment-driven settings.
- database.py for DB session/engine setup.
- security.py for JWT/auth helpers.
- models/base.py and schemas/schemas.py show the standard separation between database models and Pydantic request/response contracts.
5. Domain services and processing pipeline
- Most business logic is in backend/app/services/.
- Key services are:
- resume_parser.py for extracting structured text from uploaded documents.
- job_scraper.py for pulling job descriptions from URLs.
- ats_service.py and ats_scoring-related logic for comparing resumes to job requirements.
- ai_service.py, custom_model_service.py, model_factory.py, and my_custom_model.py for AI/LLM/model integration.
- This suggests a pipeline of ingest → parse → analyze → score/generate → persist/return.
6. Primary data flow: resume analysis
- Users upload resumes from the frontend.
- The backend accepts the file, stores it in the configured upload path, parses it through the resume parsing service, and returns structured content for editing/scoring.
- The ATS layer then compares extracted resume content against a job description to produce scores and recommendations.
- The frontend renders those results in match/analysis views and can feed them into the editor or PDF export flow.
7. Primary data flow: job scraping and matching
- The jobs area lets users submit a job URL.
- jobs.py routes to job_scraper.py, which extracts the posting and formats it for downstream use.
- That job data becomes input for ATS scoring and for cover-letter generation, creating a tight loop between job intake and resume optimization.
8. Primary data flow: AI generation
- The AI endpoints expose generic content generation and resume optimization capabilities.
- The README and service layout indicate support for OpenAI and Ollama/local LLMs, with a factory/service abstraction so model selection is not hardcoded into the API layer.
- This is a clear boundary: the API layer delegates to AI services, which in turn may call external model providers or local inference services.
9. Persistence and state
- The system is designed around PostgreSQL for durable application data such as users, resumes, jobs, applications, interviews, and generated artifacts.
- Redis is part of the architecture for caching, session-related concerns, or background/ephemeral workloads.
- docker/init.sql indicates the database may be bootstrapped with schema/data in containerized setups.
10. Authentication and access control
- auth.py, security.py, and the README together indicate JWT-based authentication.
- The frontend has a dedicated auth store and login/register routes, so most user-facing areas depend on authenticated API calls.
- The architectural boundary is: public auth endpoints vs. protected CRUD/analysis endpoints.
11. Document and export handling
- The app supports resume editing and PDF generation on the frontend, with RichTextEditor and pdfService.
- That implies a split responsibility: structured content and analysis come from the backend, while final document rendering/export is partly client-side.
- Uploaded files and generated outputs are treated as first-class artifacts, not just transient API payloads.
12. Deployment and runtime topology
- The repo is containerized with separate Dockerfiles for frontend and backend, plus docker-compose.yml and docker-compose.dev.yml.
- There is an nginx.conf under docker/, suggesting a reverse-proxy layer for production routing and static delivery.
- The documented runtime stack is: SvelteKit frontend, FastAPI backend, PostgreSQL, Redis, and optional Ollama/OpenAI integration.
13. Operational and delivery boundaries
- GitHub Actions (.github/workflows/ci-cd.yml) indicates CI/CD is part of the architecture, likely building/testing containerized services.
- The backend has multiple requirements files (requirements.txt, requirements-docker.txt, requirements-simple.txt), so deployment shape varies by environment.
- Environment variables in .env.example are a major configuration boundary: database, CORS, secret keys, upload limits, and model/provider settings.
14. What an architecture diagram should emphasize
- Put the frontend at the edge, with route-based feature screens calling a versioned FastAPI API.
- Show the backend split into API controllers, service layer, schema/model layer, and core infrastructure.
- Connect the service layer to PostgreSQL, Redis, file storage/uploads, and external AI/model providers.
- Highlight the main workflows: auth, resume upload/parsing, job scraping, ATS scoring, cover-letter generation, and application/interview tracking.
Main entry points: +layout.svelte App shell · resume_parser.py Domain services · router.py API router · applications.py Tracking API
Components 24
Frontend
SvelteKit user-facing app and workflow screens
- App shell · Global layout and cross-cutting client state
frontend/src/routes/+layout.svelte - Auth pages · Login and registration entry points
frontend/src/routes/login/+page.svelte - Dashboard · High-level user overview and navigation hub
frontend/src/routes/dashboard/+page.svelte - Resumes · Resume upload, editing, and creation flows
frontend/src/routes/resumes/+page.svelte - Job search · Job scraping and search workflow
frontend/src/routes/jobs/search/+page.svelte - ATS match · Resume-to-job scoring and recommendations
frontend/src/routes/match/+page.svelte - Cover letters · Generated letter review and editing
frontend/src/routes/cover-letters/+page.svelte - Applications · Application tracking workspace
frontend/src/routes/applications/+page.svelte - Interviews · Interview tracking and follow-up workflow
frontend/src/routes/interviews/+page.svelte - Shared UI · Reusable components, client services, and auth state
Backend
FastAPI API, services, and domain layer
- Main app · Application bootstrap and server startup
backend/app/main.py - API router · Composes versioned API endpoints
backend/app/api/v1/router.py - Identity API · Auth and user management endpoints
backend/app/api/v1/endpoints/auth.py - Resume/jobs API · Resume ingestion and job scraping endpoints
backend/app/api/v1/endpoints/resumes.py - Scoring/AI API · ATS scoring and AI generation endpoints
backend/app/api/v1/endpoints/ats.py - Tracking API · Applications and interviews endpoints
backend/app/api/v1/endpoints/applications.py - Domain services · Resume parsing, scraping, scoring, and generation logic
backend/app/services/resume_parser.py - AI models · Provider factory and custom model integration
backend/app/services/model_factory.py - Core infra · Settings, database sessions, and JWT helpers
backend/app/core/config.py - Schemas/models · Pydantic schemas and persistence models
backend/app/schemas/schemas.py
Infra
Datastores, storage, and deployment/runtime
- PostgreSQL · Durable application data and artifacts
docker/init.sql - Redis · Ephemeral state and caching layer
- Uploads · Resume files and generated documents
- AI providers · OpenAI and local Ollama-style model backends
Connections 33
- App shell → Auth pages: navigates · Shell routes users into auth flows
- App shell → Dashboard: navigates · Shell exposes the main dashboard
- App shell → Resumes: navigates · Shell exposes resume workflows
- App shell → Job search: navigates · Shell exposes job search workflows
- App shell → ATS match: navigates · Shell exposes ATS analysis views
- App shell → Cover letters: navigates · Shell exposes generated letter workflows
- App shell → Applications: navigates · Shell exposes tracking views
- App shell → Interviews: navigates · Shell exposes interview tracking views
- Auth pages → Identity API: auth calls · Login and registration submit credentials
- Dashboard → Tracking API: loads data · Dashboard aggregates tracked workflow data
- Resumes → Resume/jobs API: uploads/edits · Resume editor sends files and structured content
- Job search → Resume/jobs API: scrapes jobs · Job search submits URLs for extraction
- ATS match → Scoring/AI API: scores · Match view requests ATS analysis
- Cover letters → Scoring/AI API: generates · Cover letter workflow requests AI output
- Applications → Tracking API: tracks · Application records are created and updated
- Interviews → Tracking API: tracks · Interview records are created and updated
- Shared UI → Identity API: api client · Shared client services wrap backend calls
- Main app → API router: mounts · Main app includes the versioned router
- API router → Identity API: routes · Router exposes auth and user endpoints
- API router → Resume/jobs API: routes · Router exposes resume and job endpoints
- API router → Scoring/AI API: routes · Router exposes ATS and AI endpoints
- API router → Tracking API: routes · Router exposes application and interview endpoints
- Identity API → Core infra: uses security · Identity endpoints depend on JWT and config
- Resume/jobs API → Domain services: delegates · Upload and scraping work is handled in services
- Scoring/AI API → Domain services: delegates · Scoring and generation delegate to service layer
- Tracking API → Schemas/models: persists via · Tracking endpoints exchange typed records
- Domain services → AI models: calls models · AI and custom model work is abstracted behind factories
- Domain services → Schemas/models: shapes data · Services return structured schemas and domain objects
- Domain services → PostgreSQL: reads/writes · Persistent workflow data is stored in the database
- Core infra → PostgreSQL: connects · Database engine and sessions are configured here
- Core infra → Redis: caches · Core infrastructure can use Redis for ephemeral state
- Domain services → Uploads: stores files · Uploads and generated artifacts are managed as files
- AI models → AI providers: invokes · Provider abstraction switches between hosted and local LLMs