# ashishgoyal197/recruitment-app architecture

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

- Interactive diagram: https://gitdiagram.com/ashishgoyal197/recruitment-app
- Repository: https://github.com/ashishgoyal197/recruitment-app

## Overview

#### Purpose and Entry Points
This repository implements an AI-assisted recruitment workflow: resume intake, candidate analysis, communication, and interview coordination. The deployable architecture is split into a Python backend and React frontend, with container orchestration in `docker-compose.yml`. Primary runtime entry points are `backend/main.py` and `frontend/src/index.tsx`; the original agent workflow is defined in `backend/ai_recruitment_agent_team.py`.

#### Backend API and Agent Orchestration
The backend exposes the application service layer from `backend/main.py`. Recruitment-domain orchestration and specialized AI-agent behavior live in `backend/ai_recruitment_agent_team.py`, which is the likely boundary for resume analysis, candidate assessment, email communication, and scheduling actions. `backend/role.json` supplies backend role-oriented data/configuration.

#### Candidate Persistence Boundary
Candidate or recruitment records are persisted through the Cosmos DB adapter at `backend/db/RecruitmentCosmosDb.py`. This isolates application logic from Azure Cosmos DB access and is the main durable-state boundary between agent/API processing and stored candidate data.

#### Frontend Application Shell
The browser client is a TypeScript React application rooted at `frontend/src/index.tsx` and composed through `frontend/src/App.tsx`. It provides the operator-facing recruitment workflow rather than relying on the README’s older Streamlit-only entry point. Container serving is configured by `frontend/Dockerfile` and `frontend/nginx.conf`.

#### Recruitment Workflow UI
The frontend organizes key stages as dedicated components: recruitment setup in `frontend/src/components/ConfigurationForm.tsx`, individual and batch document intake in `frontend/src/components/ResumeUploader.tsx` and `frontend/src/components/BatchResumeUploader.tsx`, candidate browsing in `frontend/src/components/CandidateList.tsx`, and model/workflow output presentation in `frontend/src/components/AnalysisResult.tsx`. Document review is separated into PDF and Word viewers.

#### Client Data and Authentication Boundaries
Frontend-to-backend communication is centralized in `frontend/src/services/api.ts`; recruitment state and operations are coordinated through `frontend/src/hooks/useRecruitment.ts`. Authentication configuration and session-facing behavior are isolated in `frontend/src/authConfig.ts` and `frontend/src/hooks/useAuth.ts`, separating identity concerns from recruitment processing.

#### External Services and Deployment
The stated workflow depends on OpenAI GPT-4o, Zoom’s Server-to-Server OAuth APIs, and Gmail via Phidata EmailTools; PDF parsing uses PyPDF2 and scheduling requires timezone handling. Azure Cosmos DB is represented in the backend persistence layer. Dockerized backend and frontend images are defined in `backend/Dockerfile` and `frontend/Dockerfile`, coordinated by `docker-compose.yml`.

Main entry points: [`backend/ai_recruitment_agent_team.py`](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/ai_recruitment_agent_team.py) (Recruitment agent team), [`frontend/src/App.tsx`](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/App.tsx) (Application shell), [`backend/main.py`](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/main.py) (Backend API), [`docker-compose.yml`](https://github.com/ashishgoyal197/recruitment-app/blob/main/docker-compose.yml) (Docker Compose)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React frontend"]
  node_frontend_image["Frontend container<br/>Docker image"]
  node_nginx["Nginx<br/>web server<br/>[nginx.conf]"]
  node_frontend_entry["React entry<br/>browser entry<br/>[index.tsx]"]
  node_app_shell["Application shell<br/>React composition<br/>[App.tsx]"]
  node_recruitment_hook["Recruitment state<br/>React hook<br/>[useRecruitment.ts]"]
  node_api_client["API client<br/>frontend service<br/>[api.ts]"]
  node_auth["Authentication<br/>auth configuration and hook<br/>[authConfig.ts]"]
  node_workflow_ui["Recruitment workflow UI<br/>React components"]
end

subgraph group_backend["Python backend"]
  node_backend_image["Backend container<br/>Docker image"]
  node_api["Backend API<br/>Python application<br/>[main.py]"]
  node_agent_team["Recruitment agent team<br/>AI orchestration"]
  node_role_data["Role data<br/>role configuration<br/>[role.json]"]
  node_cosmos_adapter["Cosmos DB adapter<br/>persistence adapter"]
end

subgraph group_external["External services"]
  node_cosmos[("Azure Cosmos DB<br/>database")]
  node_openai["OpenAI GPT-4o<br/>AI service"]
  node_gmail["Gmail<br/>email service"]
  node_zoom["Zoom APIs<br/>scheduling service"]
  node_identity["Identity provider<br/>authentication service"]
end

node_compose{{"Docker Compose<br/>orchestration<br/>[docker-compose.yml]"}}

node_compose -->|"builds and runs"| node_frontend_image
node_compose -->|"builds and runs"| node_backend_image
node_frontend_image -->|"configures"| node_nginx
node_nginx -->|"serves"| node_frontend_entry
node_frontend_entry -->|"mounts"| node_app_shell
node_app_shell -->|"composes"| node_workflow_ui
node_app_shell -->|"uses"| node_recruitment_hook
node_app_shell -->|"uses"| node_auth
node_recruitment_hook -->|"calls"| node_api_client
node_auth -->|"authenticates with"| node_identity
node_api_client -->|"requests"| node_api
node_backend_image -->|"runs"| node_api
node_api -->|"orchestrates"| node_agent_team
node_agent_team -->|"uses"| node_role_data
node_agent_team -->|"persists through"| node_cosmos_adapter
node_cosmos_adapter -->|"reads and writes"| node_cosmos
node_agent_team -->|"analyzes with"| node_openai
node_agent_team -->|"sends communication"| node_gmail
node_agent_team -->|"coordinates interviews"| node_zoom

click node_compose "https://github.com/ashishgoyal197/recruitment-app/blob/main/docker-compose.yml"
click node_frontend_image "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/Dockerfile"
click node_nginx "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/nginx.conf"
click node_frontend_entry "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/index.tsx"
click node_app_shell "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/App.tsx"
click node_recruitment_hook "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/hooks/useRecruitment.ts"
click node_api_client "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/services/api.ts"
click node_auth "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/authConfig.ts"
click node_workflow_ui "https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/components/ConfigurationForm.tsx"
click node_backend_image "https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/Dockerfile"
click node_api "https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/main.py"
click node_agent_team "https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/ai_recruitment_agent_team.py"
click node_role_data "https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/role.json"
click node_cosmos_adapter "https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/db/RecruitmentCosmosDb.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_frontend_image,node_nginx,node_frontend_entry,node_app_shell,node_recruitment_hook,node_api_client,node_auth,node_workflow_ui toneBlue
class node_backend_image,node_api,node_agent_team,node_role_data,node_cosmos_adapter toneAmber
class node_cosmos,node_openai,node_gmail,node_zoom,node_identity toneMint
class node_compose toneNeutral
```

## Components

### React frontend

Operator-facing recruitment workflow.

- [Frontend container](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/Dockerfile): Docker image · Builds and serves the browser client. · `frontend/Dockerfile`
- [Nginx](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/nginx.conf): web server · Serves the compiled frontend. · `frontend/nginx.conf`
- [React entry](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/index.tsx): browser entry · `frontend/src/index.tsx`
- [Application shell](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/App.tsx): React composition · `frontend/src/App.tsx`
- [Recruitment state](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/hooks/useRecruitment.ts): React hook · Coordinates recruitment state and operations. · `frontend/src/hooks/useRecruitment.ts`
- [API client](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/services/api.ts): frontend service · Centralizes frontend-to-backend communication. · `frontend/src/services/api.ts`
- [Authentication](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/authConfig.ts): auth configuration and hook · Separates session behavior from recruitment processing. · `frontend/src/authConfig.ts`
- [Recruitment workflow UI](https://github.com/ashishgoyal197/recruitment-app/blob/main/frontend/src/components/ConfigurationForm.tsx): React components · Setup, resume intake, candidate browsing, and analysis output. · `frontend/src/components/ConfigurationForm.tsx`

### Python backend

API, agent orchestration, and persistence access.

- [Backend container](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/Dockerfile): Docker image · Packages the Python application service. · `backend/Dockerfile`
- [Backend API](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/main.py): Python application · Application service entry point. · `backend/main.py`
- [Recruitment agent team](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/ai_recruitment_agent_team.py): AI orchestration · Runs analysis, assessment, communication, and scheduling workflows. · `backend/ai_recruitment_agent_team.py`
- [Role data](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/role.json): role configuration · `backend/role.json`
- [Cosmos DB adapter](https://github.com/ashishgoyal197/recruitment-app/blob/main/backend/db/RecruitmentCosmosDb.py): persistence adapter · Isolates recruitment records from Cosmos DB access. · `backend/db/RecruitmentCosmosDb.py`

### External services

AI, communication, scheduling, identity, and durable storage.

- **Azure Cosmos DB**: database · Durable candidate and recruitment records.
- **OpenAI GPT-4o**: AI service
- **Gmail**: email service · Used through Phidata EmailTools.
- **Zoom APIs**: scheduling service · Uses Server-to-Server OAuth APIs.
- **Identity provider**: authentication service

### Other components

- [Docker Compose](https://github.com/ashishgoyal197/recruitment-app/blob/main/docker-compose.yml): orchestration · Coordinates frontend and backend containers. · `docker-compose.yml`

## Connections

- Docker Compose → Frontend container: builds and runs
- Docker Compose → Backend container: builds and runs
- Frontend container → Nginx: configures
- Nginx → React entry: serves
- React entry → Application shell: mounts
- Application shell → Recruitment workflow UI: composes
- Application shell → Recruitment state: uses
- Application shell → Authentication: uses
- Recruitment state → API client: calls
- Authentication → Identity provider: authenticates with
- API client → Backend API: requests
- Backend container → Backend API: runs
- Backend API → Recruitment agent team: orchestrates
- Recruitment agent team → Role data: uses
- Recruitment agent team → Cosmos DB adapter: persists through
- Cosmos DB adapter → Azure Cosmos DB: reads and writes
- Recruitment agent team → OpenAI GPT-4o: analyzes with
- Recruitment agent team → Gmail: sends communication
- Recruitment agent team → Zoom APIs: coordinates interviews
