# mahadshahtech/nowshera-digital-ats architecture

> Architecture diagram of the GitHub repository mahadshahtech/nowshera-digital-ats, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mahadshahtech/nowshera-digital-ats
- Repository: https://github.com/mahadshahtech/nowshera-digital-ats

## Overview

Nowshera Digital ATS supports candidate job applications, recruiter review and hiring decisions, and organization-wide administration. The workflow runs from role-based sign-in and protected portals through job discovery, application/CV submission, pipeline transitions, interview scheduling, and notifications or staff-only Gemini summaries. The graph includes the frontend/API boundary, authorization, persistence, CV storage, and automation. Several domain modules and workspace components are represented from the tree and README; their internal calls are not asserted where excerpts do not show them.

Main entry points: [`server/src/app.ts`](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/app.ts) (Express API), [`server/src/routes/applications.ts`](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/applications.ts) (Application and CV routes), [`server/src/automation.ts`](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/automation.ts) (AI and email automation), [`server/src/middleware/auth.ts`](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/middleware/auth.ts) (JWT and role checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Candidate and staff UI"]
  node_app["React application<br/>[App.tsx]"]
  node_login["Sign-in and registration<br/>[LoginPage.tsx]"]
  node_portals["Role portals"]
  node_jobui["Job workspaces<br/>[JobsWorkspace.tsx]"]
  node_applicationui["Application workspace"]
  node_interviewui["Interview workspace"]
  node_authclient["Auth client<br/>[api.ts]"]
  node_jobclient["Jobs API client<br/>[api.ts]"]
  node_applicationclient["Applications API client<br/>[api.ts]"]
  node_interviewclient["Interviews API client<br/>[api.ts]"]
end

subgraph group_api["API and access control"]
  node_express["Express API<br/>[app.ts]"]
  node_authroutes["Authentication routes<br/>[auth.ts]"]
  node_authorization["JWT and role checks<br/>[auth.ts]"]
  node_jobroutes["Job routes<br/>[jobs.ts]"]
  node_applicationroutes["Application and CV routes<br/>[applications.ts]"]
  node_interviewroutes["Interview routes<br/>[interviews.ts]"]
end

subgraph group_hiring["Hiring domain"]
  node_users["User records<br/>[users.ts]"]
  node_jobs["Job management<br/>[jobs.ts]"]
  node_applications["Application pipeline<br/>[applications.ts]"]
  node_interviews["Interview scheduling<br/>[interviews.ts]"]
end

subgraph group_services["Persistence and automation"]
  node_cvstorage["Protected CV files<br/>[cv-storage.ts]"]
  node_automation["AI and email automation<br/>[automation.ts]"]
  node_database[("PostgreSQL<br/>[db.ts]")]
end

node_people(("Candidates and staff"))
node_gemini["Gemini API"]
node_email["Email delivery"]

node_people -->|"use portals"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_portals
node_login -->|"signs in via"| node_authclient
node_portals -.->|"offers"| node_jobui
node_portals -.->|"offers"| node_applicationui
node_portals -.->|"offers"| node_interviewui
node_jobui -.->|"uses"| node_jobclient
node_applicationui -->|"calls"| node_applicationclient
node_interviewui -.->|"uses"| node_interviewclient
node_authclient -->|"requests API"| node_express
node_jobclient -->|"requests API"| node_express
node_applicationclient -->|"requests API"| node_express
node_interviewclient -->|"requests API"| node_express
node_express -->|"mounts"| node_authroutes
node_express -->|"mounts"| node_jobroutes
node_express -->|"mounts"| node_applicationroutes
node_express -->|"mounts"| node_interviewroutes
node_authroutes -->|"checks access"| node_authorization
node_authroutes -->|"reads users"| node_users
node_jobroutes -->|"checks access"| node_authorization
node_jobroutes -->|"delegates to"| node_jobs
node_applicationroutes -->|"checks access"| node_authorization
node_applicationroutes -->|"delegates to"| node_applications
node_applicationroutes -->|"stores and reads"| node_cvstorage
node_applicationroutes -->|"queues work"| node_automation
node_interviewroutes -->|"checks access"| node_authorization
node_interviewroutes -->|"delegates to"| node_interviews
node_applications -->|"reads and writes"| node_database
node_automation -->|"reads and writes"| node_database
node_automation -->|"reads CV files"| node_cvstorage
node_automation -.->|"generates summaries"| node_gemini
node_automation -.->|"sends notifications"| node_email
node_authorization -->|"loads identity"| node_database

click node_app "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/App.tsx"
click node_login "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/pages/LoginPage.tsx"
click node_portals "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/pages/CandidatePortal.tsx"
click node_jobui "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/components/JobsWorkspace.tsx"
click node_applicationui "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/components/ApplicationsWorkspace.tsx"
click node_interviewui "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/components/InterviewsWorkspace.tsx"
click node_authclient "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/auth/api.ts"
click node_jobclient "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/jobs/api.ts"
click node_applicationclient "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/applications/api.ts"
click node_interviewclient "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/interviews/api.ts"
click node_express "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/app.ts"
click node_authroutes "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/auth.ts"
click node_authorization "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/middleware/auth.ts"
click node_jobroutes "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/jobs.ts"
click node_applicationroutes "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/applications.ts"
click node_interviewroutes "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/interviews.ts"
click node_users "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/users.ts"
click node_jobs "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/jobs.ts"
click node_applications "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/applications.ts"
click node_interviews "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/interviews.ts"
click node_cvstorage "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/cv-storage.ts"
click node_automation "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/automation.ts"
click node_database "https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/db.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_login,node_portals,node_jobui,node_applicationui,node_interviewui,node_authclient,node_jobclient,node_applicationclient,node_interviewclient toneBlue
class node_express,node_authroutes,node_authorization,node_jobroutes,node_applicationroutes,node_interviewroutes toneAmber
class node_users,node_jobs,node_applications,node_interviews,node_gemini toneMint
class node_cvstorage,node_automation,node_database toneRose
class node_people,node_email toneIndigo
```

## Components

### Candidate and staff UI

- [React application](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in and registration](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/pages/LoginPage.tsx): `src/pages/LoginPage.tsx`
- [Role portals](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/pages/CandidatePortal.tsx): `src/pages/CandidatePortal.tsx`
- [Job workspaces](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/components/JobsWorkspace.tsx): `src/components/JobsWorkspace.tsx`
- [Application workspace](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/components/ApplicationsWorkspace.tsx): `src/components/ApplicationsWorkspace.tsx`
- [Interview workspace](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/components/InterviewsWorkspace.tsx): `src/components/InterviewsWorkspace.tsx`
- [Auth client](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/auth/api.ts): `src/auth/api.ts`
- [Jobs API client](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/jobs/api.ts): `src/jobs/api.ts`
- [Applications API client](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/applications/api.ts): `src/applications/api.ts`
- [Interviews API client](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/src/interviews/api.ts): `src/interviews/api.ts`

### API and access control

- [Express API](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/app.ts): `server/src/app.ts`
- [Authentication routes](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/auth.ts): `server/src/routes/auth.ts`
- [JWT and role checks](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/middleware/auth.ts): `server/src/middleware/auth.ts`
- [Job routes](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/jobs.ts): `server/src/routes/jobs.ts`
- [Application and CV routes](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/applications.ts): `server/src/routes/applications.ts`
- [Interview routes](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/routes/interviews.ts): `server/src/routes/interviews.ts`

### Hiring domain

- [User records](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/users.ts): `server/src/users.ts`
- [Job management](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/jobs.ts): `server/src/jobs.ts`
- [Application pipeline](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/applications.ts): `server/src/applications.ts`
- [Interview scheduling](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/interviews.ts): `server/src/interviews.ts`

### Persistence and automation

- [Protected CV files](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/cv-storage.ts): `server/src/cv-storage.ts`
- [AI and email automation](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/automation.ts): `server/src/automation.ts`
- [PostgreSQL](https://github.com/mahadshahtech/nowshera-digital-ats/blob/main/server/src/db.ts): `server/src/db.ts`

### Other components

- **Candidates and staff**
- **Gemini API**
- **Email delivery**

## Connections

- Candidates and staff → React application: use portals
- React application → Sign-in and registration: routes to (evidence: `src/App.tsx`)
- React application → Role portals: routes to (evidence: `src/App.tsx`)
- Sign-in and registration → Auth client: signs in via (evidence: `src/pages/LoginPage.tsx`)
- Role portals → Job workspaces: offers
- Role portals → Application workspace: offers
- Role portals → Interview workspace: offers
- Job workspaces → Jobs API client: uses
- Application workspace → Applications API client: calls (evidence: `src/components/ApplicationsWorkspace.tsx`)
- Interview workspace → Interviews API client: uses
- Auth client → Express API: requests API
- Jobs API client → Express API: requests API
- Applications API client → Express API: requests API
- Interviews API client → Express API: requests API
- Express API → Authentication routes: mounts (evidence: `server/src/app.ts`)
- Express API → Job routes: mounts (evidence: `server/src/app.ts`)
- Express API → Application and CV routes: mounts (evidence: `server/src/app.ts`)
- Express API → Interview routes: mounts (evidence: `server/src/app.ts`)
- Authentication routes → JWT and role checks: checks access (evidence: `server/src/routes/auth.ts`)
- Authentication routes → User records: reads users (evidence: `server/src/routes/auth.ts`)
- Job routes → JWT and role checks: checks access (evidence: `server/src/routes/jobs.ts`)
- Job routes → Job management: delegates to (evidence: `server/src/routes/jobs.ts`)
- Application and CV routes → JWT and role checks: checks access (evidence: `server/src/routes/applications.ts`)
- Application and CV routes → Application pipeline: delegates to (evidence: `server/src/routes/applications.ts`)
- Application and CV routes → Protected CV files: stores and reads (evidence: `server/src/routes/applications.ts`)
- Application and CV routes → AI and email automation: queues work (evidence: `server/src/routes/applications.ts`)
- Interview routes → JWT and role checks: checks access (evidence: `server/src/routes/interviews.ts`)
- Interview routes → Interview scheduling: delegates to (evidence: `server/src/routes/interviews.ts`)
- Application pipeline → PostgreSQL: reads and writes (evidence: `server/src/applications.ts`)
- AI and email automation → PostgreSQL: reads and writes (evidence: `server/src/automation.ts`)
- AI and email automation → Protected CV files: reads CV files (evidence: `server/src/automation.ts`)
- AI and email automation → Gemini API: generates summaries
- AI and email automation → Email delivery: sends notifications
- JWT and role checks → PostgreSQL: loads identity (evidence: `server/src/middleware/auth.ts`)
