# cusherahkugan/careera architecture

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

- Interactive diagram: https://gitdiagram.com/cusherahkugan/careera
- Repository: https://github.com/cusherahkugan/careera

## Overview

This is a two-sided hiring marketplace: job seekers build profiles and apply, while recruiters manage company jobs, review candidates, and schedule interviews. API routes implement those domain stages and use shared services for authentication, matching, resume parsing, notifications, and persistence. The excerpts support several service and route relationships; UI-to-API wiring and some unsampled route behavior are not shown, so those connections are omitted.

Main entry points: [`src/lib/prisma.ts`](https://github.com/cusherahkugan/careera/blob/master/src/lib/prisma.ts) (Application database), [`src/app/api/applications/route.ts`](https://github.com/cusherahkugan/careera/blob/master/src/app/api/applications/route.ts) (Applications), [`src/app/api/profile/resume/route.ts`](https://github.com/cusherahkugan/careera/blob/master/src/app/api/profile/resume/route.ts) (Resume upload), [`src/app/api/interviews/route.ts`](https://github.com/cusherahkugan/careera/blob/master/src/app/api/interviews/route.ts) (Interviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_marketplace_pages["Marketplace pages<br/>[page.tsx]"]
  node_company_pages["Company pages<br/>[page.tsx]"]
  node_application_page["Application view<br/>[page.tsx]"]
  node_dashboard["Recruiter dashboard<br/>[page.tsx]"]
  node_navigation["Navigation<br/>[navbar.tsx]"]
  node_interview_ui["Interview controls<br/>[interviews.tsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_profile_form["Profile editor<br/>[profile-form.tsx]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_registration["Registration<br/>[route.ts]"]
  node_profile_api["Profile API<br/>[route.ts]"]
  node_resume_api["Resume upload<br/>[route.ts]"]
end

subgraph group_hiring["Hiring workflow"]
  node_job_api["Job listings<br/>[route.ts]"]
  node_application_api["Applications<br/>[route.ts]"]
  node_interview_api["Interviews<br/>[route.ts]"]
  node_recommendations["Job recommendations<br/>[route.ts]"]
end

subgraph group_services["Shared services"]
  node_resume_parser["Resume parsing<br/>[resume.ts]"]
  node_ai["AI assistance<br/>[ai.ts]"]
  node_matching["Local matching<br/>[recommend.ts]"]
  node_company["Company context<br/>[company.ts]"]
  node_notifications["Notifications<br/>[notify.ts]"]
  node_email["Email delivery<br/>[email.ts]"]
  node_calendar["Calendar invites<br/>[ics.ts]"]
  node_validation["Request validation<br/>[validations.ts]"]
end

subgraph group_storage["Persistence"]
  node_database[("Application database<br/>[prisma.ts]")]
end

node_jobseeker(("Job seeker"))
node_recruiter(("Recruiter"))

node_auth -->|"looks up users"| node_database
node_registration -->|"creates accounts"| node_database
node_profile_api -->|"checks session"| node_auth
node_profile_api -->|"reads and updates"| node_database
node_resume_api -->|"checks session"| node_auth
node_resume_api -->|"reads and updates"| node_database
node_resume_api -->|"requests parsing"| node_ai
node_resume_api -->|"parses resume"| node_resume_parser
node_job_api -->|"ranks jobs"| node_matching
node_job_api -->|"gets company context"| node_company
node_job_api -->|"reads and writes"| node_database
node_application_api -->|"scores application"| node_matching
node_application_api -->|"rescoring request"| node_ai
node_application_api -->|"sends updates"| node_notifications
node_application_api -->|"creates applications"| node_database
node_application_api -->|"gets company context"| node_company
node_interview_api -->|"builds invitations"| node_calendar
node_interview_api -->|"notifies applicants"| node_notifications
node_interview_api -->|"reads and updates"| node_database
node_interview_api -->|"gets company context"| node_company
node_notifications -->|"stores notifications"| node_database
node_notifications -->|"sends email"| node_email
node_recommendations -->|"checks session"| node_auth
node_recommendations -->|"requests recommendations"| node_ai
node_recommendations -->|"uses local matching"| node_matching
node_recommendations -->|"reads candidate data"| node_database
node_profile_api -->|"validates input"| node_validation

click node_marketplace_pages "https://github.com/cusherahkugan/careera/blob/master/src/app/jobs/page.tsx"
click node_company_pages "https://github.com/cusherahkugan/careera/blob/master/src/app/companies/page.tsx"
click node_application_page "https://github.com/cusherahkugan/careera/blob/master/src/app/applications/%5Bid%5D/page.tsx"
click node_dashboard "https://github.com/cusherahkugan/careera/blob/master/src/app/dashboard/page.tsx"
click node_navigation "https://github.com/cusherahkugan/careera/blob/master/src/components/navbar.tsx"
click node_profile_form "https://github.com/cusherahkugan/careera/blob/master/src/components/profile-form.tsx"
click node_auth "https://github.com/cusherahkugan/careera/blob/master/src/lib/auth.ts"
click node_registration "https://github.com/cusherahkugan/careera/blob/master/src/app/api/auth/register/route.ts"
click node_profile_api "https://github.com/cusherahkugan/careera/blob/master/src/app/api/profile/route.ts"
click node_resume_api "https://github.com/cusherahkugan/careera/blob/master/src/app/api/profile/resume/route.ts"
click node_resume_parser "https://github.com/cusherahkugan/careera/blob/master/src/lib/resume.ts"
click node_job_api "https://github.com/cusherahkugan/careera/blob/master/src/app/api/jobs/route.ts"
click node_application_api "https://github.com/cusherahkugan/careera/blob/master/src/app/api/applications/route.ts"
click node_interview_api "https://github.com/cusherahkugan/careera/blob/master/src/app/api/interviews/route.ts"
click node_interview_ui "https://github.com/cusherahkugan/careera/blob/master/src/components/interviews.tsx"
click node_ai "https://github.com/cusherahkugan/careera/blob/master/src/lib/ai.ts"
click node_recommendations "https://github.com/cusherahkugan/careera/blob/master/src/app/api/ai/job-recommendations/route.ts"
click node_matching "https://github.com/cusherahkugan/careera/blob/master/src/lib/recommend.ts"
click node_company "https://github.com/cusherahkugan/careera/blob/master/src/lib/company.ts"
click node_notifications "https://github.com/cusherahkugan/careera/blob/master/src/lib/notify.ts"
click node_email "https://github.com/cusherahkugan/careera/blob/master/src/lib/email.ts"
click node_calendar "https://github.com/cusherahkugan/careera/blob/master/src/lib/ics.ts"
click node_validation "https://github.com/cusherahkugan/careera/blob/master/src/lib/validations.ts"
click node_database "https://github.com/cusherahkugan/careera/blob/master/src/lib/prisma.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_marketplace_pages,node_company_pages,node_application_page,node_dashboard,node_navigation,node_interview_ui toneBlue
class node_profile_form,node_auth,node_registration,node_profile_api,node_resume_api toneAmber
class node_job_api,node_application_api,node_interview_api,node_recommendations toneMint
class node_resume_parser,node_ai,node_matching,node_company,node_notifications,node_email,node_calendar,node_validation toneRose
class node_database,node_jobseeker,node_recruiter toneIndigo
```

## Components

### User experience

- [Marketplace pages](https://github.com/cusherahkugan/careera/blob/master/src/app/jobs/page.tsx): `src/app/jobs/page.tsx`
- [Company pages](https://github.com/cusherahkugan/careera/blob/master/src/app/companies/page.tsx): `src/app/companies/page.tsx`
- [Application view](https://github.com/cusherahkugan/careera/blob/master/src/app/applications/%5Bid%5D/page.tsx): `src/app/applications/[id]/page.tsx`
- [Recruiter dashboard](https://github.com/cusherahkugan/careera/blob/master/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Navigation](https://github.com/cusherahkugan/careera/blob/master/src/components/navbar.tsx): `src/components/navbar.tsx`
- [Interview controls](https://github.com/cusherahkugan/careera/blob/master/src/components/interviews.tsx): `src/components/interviews.tsx`

### Identity and profiles

- [Profile editor](https://github.com/cusherahkugan/careera/blob/master/src/components/profile-form.tsx): `src/components/profile-form.tsx`
- [Authentication](https://github.com/cusherahkugan/careera/blob/master/src/lib/auth.ts): `src/lib/auth.ts`
- [Registration](https://github.com/cusherahkugan/careera/blob/master/src/app/api/auth/register/route.ts): `src/app/api/auth/register/route.ts`
- [Profile API](https://github.com/cusherahkugan/careera/blob/master/src/app/api/profile/route.ts): `src/app/api/profile/route.ts`
- [Resume upload](https://github.com/cusherahkugan/careera/blob/master/src/app/api/profile/resume/route.ts): `src/app/api/profile/resume/route.ts`

### Hiring workflow

- [Job listings](https://github.com/cusherahkugan/careera/blob/master/src/app/api/jobs/route.ts): `src/app/api/jobs/route.ts`
- [Applications](https://github.com/cusherahkugan/careera/blob/master/src/app/api/applications/route.ts): `src/app/api/applications/route.ts`
- [Interviews](https://github.com/cusherahkugan/careera/blob/master/src/app/api/interviews/route.ts): `src/app/api/interviews/route.ts`
- [Job recommendations](https://github.com/cusherahkugan/careera/blob/master/src/app/api/ai/job-recommendations/route.ts): `src/app/api/ai/job-recommendations/route.ts`

### Shared services

- [Resume parsing](https://github.com/cusherahkugan/careera/blob/master/src/lib/resume.ts): `src/lib/resume.ts`
- [AI assistance](https://github.com/cusherahkugan/careera/blob/master/src/lib/ai.ts): `src/lib/ai.ts`
- [Local matching](https://github.com/cusherahkugan/careera/blob/master/src/lib/recommend.ts): `src/lib/recommend.ts`
- [Company context](https://github.com/cusherahkugan/careera/blob/master/src/lib/company.ts): `src/lib/company.ts`
- [Notifications](https://github.com/cusherahkugan/careera/blob/master/src/lib/notify.ts): `src/lib/notify.ts`
- [Email delivery](https://github.com/cusherahkugan/careera/blob/master/src/lib/email.ts): `src/lib/email.ts`
- [Calendar invites](https://github.com/cusherahkugan/careera/blob/master/src/lib/ics.ts): `src/lib/ics.ts`
- [Request validation](https://github.com/cusherahkugan/careera/blob/master/src/lib/validations.ts): `src/lib/validations.ts`

### Persistence

- [Application database](https://github.com/cusherahkugan/careera/blob/master/src/lib/prisma.ts): `src/lib/prisma.ts`

### Other components

- **Job seeker**
- **Recruiter**

## Connections

- Authentication → Application database: looks up users (evidence: `src/lib/auth.ts`)
- Registration → Application database: creates accounts (evidence: `src/app/api/auth/register/route.ts`)
- Profile API → Authentication: checks session (evidence: `src/app/api/profile/route.ts`)
- Profile API → Application database: reads and updates (evidence: `src/app/api/profile/route.ts`)
- Resume upload → Authentication: checks session (evidence: `src/app/api/profile/resume/route.ts`)
- Resume upload → Application database: reads and updates (evidence: `src/app/api/profile/resume/route.ts`)
- Resume upload → AI assistance: requests parsing (evidence: `src/app/api/profile/resume/route.ts`)
- Resume upload → Resume parsing: parses resume (evidence: `src/app/api/profile/resume/route.ts`)
- Job listings → Local matching: ranks jobs (evidence: `src/app/api/jobs/route.ts`)
- Job listings → Company context: gets company context (evidence: `src/app/api/jobs/route.ts`)
- Job listings → Application database: reads and writes (evidence: `src/app/api/jobs/route.ts`)
- Applications → Local matching: scores application (evidence: `src/app/api/applications/route.ts`)
- Applications → AI assistance: rescoring request (evidence: `src/app/api/applications/route.ts`)
- Applications → Notifications: sends updates (evidence: `src/app/api/applications/route.ts`)
- Applications → Application database: creates applications (evidence: `src/app/api/applications/route.ts`)
- Applications → Company context: gets company context (evidence: `src/app/api/applications/route.ts`)
- Interviews → Calendar invites: builds invitations (evidence: `src/app/api/interviews/route.ts`)
- Interviews → Notifications: notifies applicants (evidence: `src/app/api/interviews/route.ts`)
- Interviews → Application database: reads and updates (evidence: `src/app/api/interviews/route.ts`)
- Interviews → Company context: gets company context (evidence: `src/app/api/interviews/route.ts`)
- Notifications → Application database: stores notifications (evidence: `src/lib/notify.ts`)
- Notifications → Email delivery: sends email (evidence: `src/lib/notify.ts`)
- Job recommendations → Authentication: checks session (evidence: `src/app/api/ai/job-recommendations/route.ts`)
- Job recommendations → AI assistance: requests recommendations (evidence: `src/app/api/ai/job-recommendations/route.ts`)
- Job recommendations → Local matching: uses local matching (evidence: `src/app/api/ai/job-recommendations/route.ts`)
- Job recommendations → Application database: reads candidate data (evidence: `src/app/api/ai/job-recommendations/route.ts`)
- Profile API → Request validation: validates input (evidence: `src/app/api/profile/route.ts`)
