# johnnykozman2007/jobassistantcopy architecture

> Architecture diagram of the GitHub repository johnnykozman2007/jobassistantcopy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/johnnykozman2007/jobassistantcopy
- Repository: https://github.com/johnnykozman2007/jobassistantcopy

## Overview

1. This is a three-part monorepo for an AI-assisted job/search or recruiting workflow: a TypeScript frontend, a Python backend API, and a separate Python “Agent” package for AI/scraping logic. The root-level `docker-compose.yml` suggests these pieces are intended to run together as independently containerized services.

2. The `Frontend/` app is a Next.js application built with React and TypeScript. Its route structure shows the main user flows: landing page, onboarding steps, dashboard, profile, and settings. That makes the frontend the primary interaction layer for collecting user data, displaying analysis, and guiding the user through setup.

3. The frontend component set points to a product centered on resume/job analysis and AI-generated guidance. Components like `ResumeUploader`, `JobAnalyzer`, `MatchScoreCard`, `AnalysisModal`, `AIAnswerGenerator`, and `SaveProfilePrompt` indicate that the UI both gathers inputs and renders AI-derived outputs.

4. The `Backend/` directory is a Python service that likely owns application state and persistence. Files like `app/main.py`, `app/user_route.py`, `database/db_client.py`, and `user.py` suggest a route/controller layer plus a database client abstraction for user/profile data.

5. The backend appears to be the system boundary for user and profile management. The frontend likely talks to it for onboarding, saving profiles, and retrieving user-specific data, while the backend isolates database access behind `db_client.py` rather than letting the UI reach storage directly.

6. The `Agent/` package is the AI/workflow subsystem. Its `src/agent/graph.py`, `prompts.py`, `scorer.py`, and `tools/scraper.py` indicate a LangGraph-based pipeline that combines prompting, scoring logic, and a scraping tool. The `langgraph.json` file reinforces that this is designed as a graph-based agent workflow rather than a simple utility script.

7. The Agent’s responsibilities are likely twofold: extract job-description data and compute a resume/job match or related score. The presence of `JOB_DESC_SCRAPER.md` and `RESUME_SCORER.md`, plus tests for scraper and graph behavior, suggests the agent is a reusable analysis engine that the product can call when it needs structured job or resume insights.

8. Data flow is likely: user uploads or enters resume/profile/job data in the frontend, the frontend sends user/profile requests to the backend, and the backend either stores them or invokes the Agent for scoring/scraping workflows. The Agent produces normalized outputs that the backend or frontend then presents as match scores, recommendations, or answers.

9. The repo has clear separation between presentation, application state, and AI logic. The frontend owns UX and routing, the backend owns persistence and user APIs, and the agent owns the expensive or specialized AI/scraping computation. That separation makes it easy to diagram as three services with explicit integration points.

10. Testing is split by subsystem. The Agent has both unit and integration tests under `Agent/tests/`, while GitHub Actions workflows run unit and integration test suites there. That implies the agent is treated as the most algorithmically sensitive part of the system and is validated independently from the web UI.

11. Containerization and deployment are first-class concerns. Each major service has its own `Dockerfile` variant, and the repository includes CI workflows plus environment templates like `Agent/.env.example`, indicating the app is meant to be run in reproducible environments rather than as a single local-only codebase.

12. In an architecture diagram, the main boxes should be: browser/client, Next.js frontend, Python backend/API, Python agent service/workflow, and database/storage behind the backend. The most important arrows are user interaction into the frontend, frontend-to-backend API calls, backend-to-database persistence, and backend/frontend-triggered calls into the Agent for analysis or scraping.

Main entry points: [`Frontend/app/layout.tsx`](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/layout.tsx) (Next.js App), [`Agent/src/agent/graph.py`](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/graph.py) (Agent Graph), [`Backend/app/user_route.py`](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/app/user_route.py) (User Routes), [`Backend/app/main.py`](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/app/main.py) (API App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_fe_app["Next.js App<br/>nextjs app<br/>[layout.tsx]"]
  node_fe_home["Landing<br/>route<br/>[page.tsx]"]
  node_fe_onboarding["Onboarding<br/>flow<br/>[page.tsx]"]
  node_fe_workspace["Workspace<br/>route group<br/>[page.tsx]"]
  node_fe_widgets["Analysis UI<br/>components<br/>[JobAnalyzer.tsx]"]
end

subgraph group_backend["Backend"]
  node_api_app["API App<br/>python api<br/>[main.py]"]
  node_api_users["User Routes<br/>route/controller<br/>[user_route.py]"]
  node_api_db[("DB Client<br/>data access<br/>[db_client.py]")]
  node_api_user["User Model<br/>domain model<br/>[user.py]"]
end

subgraph group_agent["Agent"]
  node_agent_graph{{"Agent Graph<br/>workflow graph<br/>[graph.py]"}}
  node_agent_prompts["Prompts<br/>prompting<br/>[prompts.py]"]
  node_agent_scorer["Scorer<br/>ranking logic<br/>[scorer.py]"]
  node_agent_scraper["Scraper<br/>scraping tool<br/>[scraper.py]"]
end

subgraph group_infra["Infra"]
  node_compose["Compose Stack<br/>container orchestration<br/>[docker-compose.yml]"]
  node_agent_tests["Agent Tests<br/>test suite<br/>[test_graph.py]"]
end

node_browser(("Client"))

node_browser -->|"uses"| node_fe_app
node_fe_app -->|"routes"| node_fe_home
node_fe_app -->|"routes"| node_fe_onboarding
node_fe_app -->|"routes"| node_fe_workspace
node_fe_app -->|"renders"| node_fe_widgets
node_fe_widgets -->|"api calls"| node_api_app
node_fe_onboarding -->|"submit profile"| node_api_users
node_fe_workspace -->|"load profile"| node_api_users
node_api_app -->|"mounts"| node_api_users
node_api_users -->|"reads/writes"| node_api_db
node_api_users -->|"maps"| node_api_user
node_api_app -.->|"invokes"| node_agent_graph
node_agent_graph -->|"uses"| node_agent_prompts
node_agent_graph -->|"scores"| node_agent_scorer
node_agent_graph -->|"extracts"| node_agent_scraper
node_agent_graph -.->|"validated by"| node_agent_tests
node_compose -->|"orchestrates"| node_fe_app
node_compose -->|"orchestrates"| node_api_app
node_compose -->|"orchestrates"| node_agent_graph

click node_fe_app "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/layout.tsx"
click node_fe_home "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/page.tsx"
click node_fe_onboarding "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/onboarding/step-1/page.tsx"
click node_fe_workspace "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/dashboard/page.tsx"
click node_fe_widgets "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/components/JobAnalyzer.tsx"
click node_api_app "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/app/main.py"
click node_api_users "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/app/user_route.py"
click node_api_db "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/database/db_client.py"
click node_api_user "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/user.py"
click node_agent_graph "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/graph.py"
click node_agent_prompts "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/prompts.py"
click node_agent_scorer "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/scorer.py"
click node_agent_scraper "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/tools/scraper.py"
click node_compose "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/docker-compose.yml"
click node_agent_tests "https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/tests/integration_tests/test_graph.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fe_app,node_fe_home,node_fe_onboarding,node_fe_workspace,node_fe_widgets toneBlue
class node_api_app,node_api_users,node_api_db,node_api_user toneAmber
class node_agent_graph,node_agent_prompts,node_agent_scorer,node_agent_scraper toneMint
class node_compose,node_agent_tests toneRose
class node_browser toneNeutral
```

## Components

### Frontend

Next.js UI and user flows

- [Next.js App](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/layout.tsx): nextjs app · Top-level React/TypeScript application shell · `Frontend/app/layout.tsx`
- [Landing](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/page.tsx): route · Entry page and primary product introduction · `Frontend/app/page.tsx`
- [Onboarding](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/onboarding/step-1/page.tsx): flow · Multi-step setup and profile capture · `Frontend/app/onboarding/step-1/page.tsx`
- [Workspace](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/app/dashboard/page.tsx): route group · Dashboard, profile, and settings surfaces · `Frontend/app/dashboard/page.tsx`
- [Analysis UI](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Frontend/components/JobAnalyzer.tsx): components · Resume upload, job analysis, scores, and AI prompts · `Frontend/components/JobAnalyzer.tsx`

### Backend

Python API and persistence boundary

- [API App](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/app/main.py): python api · Backend service entrypoint · `Backend/app/main.py`
- [User Routes](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/app/user_route.py): route/controller · User and profile endpoints · `Backend/app/user_route.py`
- [DB Client](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/database/db_client.py): data access · Database abstraction used by the API · `Backend/database/db_client.py`
- [User Model](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Backend/user.py): domain model · User/profile data structure · `Backend/user.py`

### Agent

AI scoring and scraping workflow

- [Agent Graph](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/graph.py): workflow graph · LangGraph orchestration for analysis tasks · `Agent/src/agent/graph.py`
- [Prompts](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/prompts.py): prompting · Prompt templates and task framing · `Agent/src/agent/prompts.py`
- [Scorer](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/scorer.py): ranking logic · Resume/job match scoring and evaluation · `Agent/src/agent/scorer.py`
- [Scraper](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/src/agent/tools/scraper.py): scraping tool · Job-description extraction and normalization · `Agent/src/agent/tools/scraper.py`

### Infra

Container and test orchestration

- [Compose Stack](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/docker-compose.yml): container orchestration · Root service orchestration for the monorepo · `docker-compose.yml`
- [Agent Tests](https://github.com/johnnykozman2007/jobassistantcopy/blob/main/Agent/tests/integration_tests/test_graph.py): test suite · Unit and integration validation for the agent workflow · `Agent/tests/integration_tests/test_graph.py`

### Other components

- **Client**: user/client · End user interacting with the product

## Connections

- Client → Next.js App: uses · User interacts with the frontend
- Next.js App → Landing: routes · Renders the landing experience
- Next.js App → Onboarding: routes · Guides account setup
- Next.js App → Workspace: routes · Hosts dashboard, profile, and settings views
- Next.js App → Analysis UI: renders · Composes the analysis and input components
- Analysis UI → API App: api calls · Sends user and analysis requests to the backend
- Onboarding → User Routes: submit profile · Persists onboarding data through user endpoints
- Workspace → User Routes: load profile · Fetches and updates account data
- API App → User Routes: mounts · Exposes the user route layer
- User Routes → DB Client: reads/writes · Persists application state
- User Routes → User Model: maps · Transforms request data into domain objects
- API App → Agent Graph: invokes · Delegates AI and scraping work to the agent subsystem
- Agent Graph → Prompts: uses · Builds task-specific prompts
- Agent Graph → Scorer: scores · Computes match and analysis outputs
- Agent Graph → Scraper: extracts · Pulls structured data from job descriptions
- Agent Graph → Agent Tests: validated by · Covered by dedicated agent tests
- Compose Stack → Next.js App: orchestrates · Starts the frontend service
- Compose Stack → API App: orchestrates · Starts the backend API service
- Compose Stack → Agent Graph: orchestrates · Starts the agent workflow service
