# nandiniisahuu/hireflow architecture

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

- Interactive diagram: https://gitdiagram.com/nandiniisahuu/hireflow
- Repository: https://github.com/nandiniisahuu/hireflow

## Overview

HireFlow is a multi-tenant recruitment and applicant-tracking platform. Recruiters manage jobs and candidates, track applications through hiring stages, schedule interviews, and progress offers toward onboarding; candidates can discover jobs and apply through public career pages or use the candidate portal. The React client communicates with REST APIs backed by domain services and MySQL, with a separate EmpCloud database supporting identity and organization lookups. AI, analytics, assessments, and recruitment automation extend the central hiring workflow. Several domain modules are represented by their exact directories because their source was not sampled.

Main entry points: [`packages/server/src/api/routes`](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/api/routes) (REST routes), [`packages/server/src/services/application/application.service.ts`](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/application/application.service.ts) (Application tracking), [`packages/server/src/db/adapters/index.ts`](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/adapters/index.ts) (Database adapter), [`packages/client/src/App.tsx`](https://github.com/nandiniisahuu/hireflow/blob/main/packages/client/src/App.tsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Application shell<br/>[App.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
  node_career["Career pages"]
  node_portal["Candidate portal"]
end

subgraph group_api["API and identity"]
  node_routes["REST routes"]
  node_auth["Auth middleware<br/>[auth.middleware.ts]"]
end

subgraph group_hiring["Hiring workflow"]
  node_jobs_candidates["Jobs and candidates"]
  node_applications["Application tracking"]
  node_pipeline["Pipeline stages"]
  node_interviews["Interview management"]
  node_offers["Offers and onboarding"]
end

subgraph group_extensions["Product extensions"]
  node_ai["AI recruitment"]
  node_assessment_scoring["Assessment and scoring"]
  node_analytics["Recruitment analytics"]
  node_automation["Recruitment automation"]
end

subgraph group_storage["Persistence"]
  node_empcloud[("Identity database<br/>[empcloud.ts]")]
  node_db_factory["Database adapter<br/>[index.ts]"]
  node_knex["Knex adapter<br/>[knex.adapter.ts]"]
  node_mysql[("Recruitment database<br/>[empcloud-schema.ts]")]
end

node_recruiter(("Recruiter"))
node_candidate(("Candidate"))

node_recruiter -->|"uses"| node_app
node_candidate -->|"browses and applies"| node_career
node_candidate -->|"views applications"| node_portal
node_app -.->|"uses API"| node_api_client
node_api_client -->|"calls REST APIs"| node_routes
node_routes -.->|"authenticates requests"| node_auth
node_auth -->|"looks up identity"| node_empcloud
node_routes -->|"creates and moves applications"| node_applications
node_applications -->|"dispatches events"| node_automation
node_automation -->|"schedules interviews"| node_interviews
node_applications -->|"reads and writes"| node_db_factory
node_pipeline -->|"reads and writes"| node_db_factory
node_db_factory -->|"creates adapter"| node_knex
node_knex -.->|"persists data"| node_mysql
node_routes -.->|"serves hiring operations"| node_jobs_candidates
node_routes -.->|"serves stage management"| node_pipeline
node_routes -.->|"serves interview workflows"| node_interviews
node_routes -.->|"serves offers and onboarding"| node_offers
node_routes -.->|"serves AI features"| node_ai
node_routes -.->|"serves assessments"| node_assessment_scoring
node_routes -.->|"serves analytics"| node_analytics

click node_app "https://github.com/nandiniisahuu/hireflow/blob/main/packages/client/src/App.tsx"
click node_api_client "https://github.com/nandiniisahuu/hireflow/blob/main/packages/client/src/api/client.ts"
click node_career "https://github.com/nandiniisahuu/hireflow/tree/main/packages/client/src/pages/career"
click node_portal "https://github.com/nandiniisahuu/hireflow/tree/main/packages/client/src/pages/portal"
click node_routes "https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/api/routes"
click node_auth "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/api/middleware/auth.middleware.ts"
click node_empcloud "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/empcloud.ts"
click node_jobs_candidates "https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/job"
click node_applications "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/application/application.service.ts"
click node_pipeline "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/pipeline/pipeline.service.ts"
click node_interviews "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/interview/interview.service.ts"
click node_offers "https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/offer"
click node_ai "https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/ai"
click node_assessment_scoring "https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/scoring"
click node_analytics "https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/analytics"
click node_automation "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/recruitment-ops/recruitment-ops.service.ts"
click node_db_factory "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/adapters/index.ts"
click node_knex "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/adapters/knex.adapter.ts"
click node_mysql "https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/empcloud-schema.ts"

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_app,node_api_client,node_career,node_portal toneBlue
class node_routes,node_auth toneAmber
class node_jobs_candidates,node_applications,node_pipeline,node_interviews,node_offers toneMint
class node_ai,node_assessment_scoring,node_analytics,node_automation toneRose
class node_empcloud,node_db_factory,node_knex,node_mysql,node_recruiter,node_candidate toneIndigo
```

## Components

### Web application

- [Application shell](https://github.com/nandiniisahuu/hireflow/blob/main/packages/client/src/App.tsx): `packages/client/src/App.tsx`
- [API client](https://github.com/nandiniisahuu/hireflow/blob/main/packages/client/src/api/client.ts): `packages/client/src/api/client.ts`
- [Career pages](https://github.com/nandiniisahuu/hireflow/tree/main/packages/client/src/pages/career): `packages/client/src/pages/career`
- [Candidate portal](https://github.com/nandiniisahuu/hireflow/tree/main/packages/client/src/pages/portal): `packages/client/src/pages/portal`

### API and identity

- [REST routes](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/api/routes): `packages/server/src/api/routes`
- [Auth middleware](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/api/middleware/auth.middleware.ts): `packages/server/src/api/middleware/auth.middleware.ts`

### Hiring workflow

- [Jobs and candidates](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/job): `packages/server/src/services/job`
- [Application tracking](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/application/application.service.ts): `packages/server/src/services/application/application.service.ts`
- [Pipeline stages](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/pipeline/pipeline.service.ts): `packages/server/src/services/pipeline/pipeline.service.ts`
- [Interview management](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/interview/interview.service.ts): `packages/server/src/services/interview/interview.service.ts`
- [Offers and onboarding](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/offer): `packages/server/src/services/offer`

### Product extensions

- [AI recruitment](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/ai): `packages/server/src/services/ai`
- [Assessment and scoring](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/scoring): `packages/server/src/services/scoring`
- [Recruitment analytics](https://github.com/nandiniisahuu/hireflow/tree/main/packages/server/src/services/analytics): `packages/server/src/services/analytics`
- [Recruitment automation](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/services/recruitment-ops/recruitment-ops.service.ts): `packages/server/src/services/recruitment-ops/recruitment-ops.service.ts`

### Persistence

- [Identity database](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/empcloud.ts): `packages/server/src/db/empcloud.ts`
- [Database adapter](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/adapters/index.ts): `packages/server/src/db/adapters/index.ts`
- [Knex adapter](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/adapters/knex.adapter.ts): `packages/server/src/db/adapters/knex.adapter.ts`
- [Recruitment database](https://github.com/nandiniisahuu/hireflow/blob/main/packages/server/src/db/empcloud-schema.ts): `packages/server/src/db/empcloud-schema.ts`

### Other components

- **Recruiter**
- **Candidate**

## Connections

- Recruiter → Application shell: uses (evidence: `README.md`)
- Candidate → Career pages: browses and applies (evidence: `README.md`)
- Candidate → Candidate portal: views applications (evidence: `README.md`)
- Application shell → API client: uses API
- API client → REST routes: calls REST APIs (evidence: `README.md`)
- REST routes → Auth middleware: authenticates requests (evidence: `packages/server/src/api/routes/application.routes.ts`)
- Auth middleware → Identity database: looks up identity (evidence: `packages/server/src/api/middleware/auth.middleware.ts`)
- REST routes → Application tracking: creates and moves applications (evidence: `packages/server/src/api/routes/application.routes.ts`)
- Application tracking → Recruitment automation: dispatches events (evidence: `packages/server/src/services/application/application.service.ts`)
- Recruitment automation → Interview management: schedules interviews (evidence: `packages/server/src/services/recruitment-ops/recruitment-ops.service.ts`)
- Application tracking → Database adapter: reads and writes (evidence: `packages/server/src/services/application/application.service.ts`)
- Pipeline stages → Database adapter: reads and writes (evidence: `packages/server/src/services/pipeline/pipeline.service.ts`)
- Database adapter → Knex adapter: creates adapter (evidence: `packages/server/src/db/adapters/index.ts`)
- Knex adapter → Recruitment database: persists data
- REST routes → Jobs and candidates: serves hiring operations
- REST routes → Pipeline stages: serves stage management (evidence: `packages/server/src/api/routes/pipeline.routes.ts`)
- REST routes → Interview management: serves interview workflows (evidence: `packages/server/src/api/routes/interview.routes.ts`)
- REST routes → Offers and onboarding: serves offers and onboarding
- REST routes → AI recruitment: serves AI features (evidence: `packages/server/src/api/routes/interview.routes.ts`)
- REST routes → Assessment and scoring: serves assessments
- REST routes → Recruitment analytics: serves analytics
