# youssef5107/careerpulse architecture

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

- Interactive diagram: https://gitdiagram.com/youssef5107/careerpulse
- Repository: https://github.com/youssef5107/careerpulse

## Overview

This is a two-sided recruiting and job-search application. Job seekers discover and save postings, manage profiles, apply, and respond to interviews; employers publish jobs, review applicants, maintain company profiles, and schedule interviews. Next.js pages and API routes implement these workflows, with authentication, Prisma persistence, Redis caching, and Redux UI state behind them. The README is only the default Next.js template; capability labels here come from the repository tree and sampled source. Some page-to-API connections are not evidenced in the available excerpts, so they are omitted.

Main entry points: [`lib/auth.ts`](https://github.com/youssef5107/careerpulse/blob/main/lib/auth.ts) (Authentication), [`lib/prisma.ts`](https://github.com/youssef5107/careerpulse/blob/main/lib/prisma.ts) (Prisma client), [`app/api/employer/posts/route.ts`](https://github.com/youssef5107/careerpulse/blob/main/app/api/employer/posts/route.ts) (Employer posts API), [`store/hooks.ts`](https://github.com/youssef5107/careerpulse/blob/main/store/hooks.ts) (Typed Redux hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Job discovery"]
  node_search_ui["Search and browse<br/>[page.tsx]"]
  node_home_ui["Job seeker home<br/>[page.tsx]"]
  node_search_bar["Search bar<br/>[SearchBar.tsx]"]
  node_recent_jobs["Recently viewed<br/>[RecentlyViewed.tsx]"]
  node_job_detail["Job details<br/>[page.tsx]"]
  node_save_job["Save job<br/>[SaveJobButton.tsx]"]
  node_bookmark["Saved jobs<br/>[BookmarkIcon.tsx]"]
end

subgraph group_employer["Employer tools"]
  node_post_job["Create job posting<br/>[page.tsx]"]
  node_employer_posts["Manage postings<br/>[page.tsx]"]
  node_applicants["Review applicants<br/>[page.tsx]"]
  node_company_profile_ui["Company profile<br/>[page.tsx]"]
end

subgraph group_career["Applications and career"]
  node_profile_ui["Job seeker profile<br/>[page.tsx]"]
  node_apply["Apply for job<br/>[ApplyButton.tsx]"]
  node_applications_api["Applications API<br/>[route.ts]"]
  node_interview_ui["Interview management<br/>[InterviewsPage.tsx]"]
  node_interviews_api["Interviews API<br/>[route.ts]"]
end

subgraph group_platform["Application services"]
  node_auth_actions["Sign-in and signup<br/>[auth.ts]"]
  node_auth_service["Authentication<br/>[auth.ts]"]
  node_auth_config["Auth configuration<br/>[auth.config.ts]"]
  node_job_api["Job search API<br/>[route.ts]"]
  node_posts_api["Employer posts API<br/>[route.ts]"]
  node_profile_api["Profile API<br/>[route.ts]"]
  node_company_api["Company profile API<br/>[route.ts]"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_database[("Application database<br/>[neon.ts]")]
  node_redis[("Redis cache<br/>[redis.ts]")]
end

subgraph group_state["Client state"]
  node_redux_hooks["Typed Redux hooks<br/>[hooks.ts]"]
  node_toast_slice["Toast state<br/>[toastSlice.ts]"]
  node_postings_slice["Postings state<br/>[postingsSlice.ts]"]
  node_jobpost_slice["Job form state<br/>[jobPostSlice.ts]"]
end

node_seeker(("Job seeker"))
node_employer_actor(("Employer"))

node_seeker -->|"uses"| node_home_ui
node_home_ui -->|"renders"| node_search_bar
node_home_ui -->|"renders"| node_recent_jobs
node_seeker -->|"searches"| node_search_ui
node_search_ui -->|"renders"| node_bookmark
node_seeker -->|"views"| node_job_detail
node_job_detail -->|"renders"| node_apply
node_job_detail -->|"renders"| node_save_job
node_seeker -.->|"submits application"| node_applications_api
node_applications_api -->|"authenticates"| node_auth_service
node_applications_api -.->|"creates application"| node_prisma
node_employer_actor -->|"creates posting"| node_post_job
node_post_job -.->|"submits posting"| node_posts_api
node_employer_posts -.->|"loads postings"| node_posts_api
node_posts_api -->|"authenticates"| node_auth_service
node_posts_api -->|"reads and writes"| node_prisma
node_posts_api -->|"caches postings"| node_redis
node_employer_actor -->|"reviews candidates"| node_applicants
node_employer_actor -->|"manages interviews"| node_interview_ui
node_seeker -->|"responds to interviews"| node_interview_ui
node_interview_ui -->|"dispatches toast"| node_toast_slice
node_interviews_api -->|"authenticates"| node_auth_service
node_interviews_api -->|"reads and writes"| node_prisma
node_seeker -->|"maintains profile"| node_profile_ui
node_profile_api -->|"authenticates"| node_auth_service
node_profile_api -->|"reads and writes"| node_prisma
node_employer_actor -->|"maintains company profile"| node_company_profile_ui
node_company_api -->|"authenticates"| node_auth_service
node_company_api -->|"reads and writes"| node_prisma
node_company_api -->|"caches profile"| node_redis
node_search_ui -.->|"loads jobs"| node_job_api
node_job_api -->|"queries jobs"| node_prisma
node_job_api -.->|"reads cache"| node_redis
node_auth_actions -->|"signs in"| node_auth_service
node_auth_actions -->|"creates user"| node_prisma
node_auth_service -->|"uses config"| node_auth_config
node_auth_service -->|"uses adapter"| node_prisma
node_redux_hooks -.->|"types state"| node_postings_slice
node_redux_hooks -.->|"types state"| node_toast_slice
node_apply -->|"uses hooks"| node_redux_hooks
node_apply -->|"dispatches toast"| node_toast_slice
node_bookmark -->|"uses hooks"| node_redux_hooks
node_bookmark -->|"dispatches toast"| node_toast_slice
node_save_job -->|"uses hooks"| node_redux_hooks
node_save_job -->|"dispatches toast"| node_toast_slice

click node_search_ui "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/search/page.tsx"
click node_home_ui "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/home/page.tsx"
click node_search_bar "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/SearchBar.tsx"
click node_recent_jobs "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/RecentlyViewed.tsx"
click node_job_detail "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/jobs/%5Bid%5D/page.tsx"
click node_save_job "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/SaveJobButton.tsx"
click node_bookmark "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/BookmarkIcon.tsx"
click node_post_job "https://github.com/youssef5107/careerpulse/blob/main/app/employer/post-job/job-details/page.tsx"
click node_employer_posts "https://github.com/youssef5107/careerpulse/blob/main/app/employer/postings/page.tsx"
click node_applicants "https://github.com/youssef5107/careerpulse/blob/main/app/employer/applicants/%5Bapplicant-id%5D/page.tsx"
click node_company_profile_ui "https://github.com/youssef5107/careerpulse/blob/main/app/employer/company-profile/page.tsx"
click node_profile_ui "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/profile/page.tsx"
click node_apply "https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/ApplyButton.tsx"
click node_applications_api "https://github.com/youssef5107/careerpulse/blob/main/app/api/applications/route.ts"
click node_interview_ui "https://github.com/youssef5107/careerpulse/blob/main/app/components/InterviewsPage.tsx"
click node_interviews_api "https://github.com/youssef5107/careerpulse/blob/main/app/api/interviews/route.ts"
click node_auth_actions "https://github.com/youssef5107/careerpulse/blob/main/actions/auth.ts"
click node_auth_service "https://github.com/youssef5107/careerpulse/blob/main/lib/auth.ts"
click node_auth_config "https://github.com/youssef5107/careerpulse/blob/main/auth.config.ts"
click node_job_api "https://github.com/youssef5107/careerpulse/blob/main/app/api/jobs/route.ts"
click node_posts_api "https://github.com/youssef5107/careerpulse/blob/main/app/api/employer/posts/route.ts"
click node_profile_api "https://github.com/youssef5107/careerpulse/blob/main/app/api/profile/route.ts"
click node_company_api "https://github.com/youssef5107/careerpulse/blob/main/app/api/company-profile/route.ts"
click node_prisma "https://github.com/youssef5107/careerpulse/blob/main/lib/prisma.ts"
click node_database "https://github.com/youssef5107/careerpulse/blob/main/neon.ts"
click node_redis "https://github.com/youssef5107/careerpulse/blob/main/lib/redis.ts"
click node_redux_hooks "https://github.com/youssef5107/careerpulse/blob/main/store/hooks.ts"
click node_toast_slice "https://github.com/youssef5107/careerpulse/blob/main/store/features/toast/toastSlice.ts"
click node_postings_slice "https://github.com/youssef5107/careerpulse/blob/main/store/features/postings/postingsSlice.ts"
click node_jobpost_slice "https://github.com/youssef5107/careerpulse/blob/main/store/features/jobPost/jobPostSlice.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_search_ui,node_home_ui,node_search_bar,node_recent_jobs,node_job_detail,node_save_job,node_bookmark toneBlue
class node_post_job,node_employer_posts,node_applicants,node_company_profile_ui toneAmber
class node_profile_ui,node_apply,node_applications_api,node_interview_ui,node_interviews_api toneMint
class node_auth_actions,node_auth_service,node_auth_config,node_job_api,node_posts_api,node_profile_api,node_company_api,node_prisma,node_database,node_redis toneRose
class node_redux_hooks,node_toast_slice,node_postings_slice,node_jobpost_slice,node_seeker,node_employer_actor toneIndigo
```

## Components

### Job discovery

- [Search and browse](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/search/page.tsx): `app/jobseeker/search/page.tsx`
- [Job seeker home](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/home/page.tsx): `app/jobseeker/home/page.tsx`
- [Search bar](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/SearchBar.tsx): `app/jobseeker/components/SearchBar.tsx`
- [Recently viewed](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/RecentlyViewed.tsx): `app/jobseeker/components/RecentlyViewed.tsx`
- [Job details](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/jobs/%5Bid%5D/page.tsx): `app/jobseeker/jobs/[id]/page.tsx`
- [Save job](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/SaveJobButton.tsx): `app/jobseeker/components/SaveJobButton.tsx`
- [Saved jobs](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/BookmarkIcon.tsx): `app/jobseeker/components/BookmarkIcon.tsx`

### Employer tools

- [Create job posting](https://github.com/youssef5107/careerpulse/blob/main/app/employer/post-job/job-details/page.tsx): `app/employer/post-job/job-details/page.tsx`
- [Manage postings](https://github.com/youssef5107/careerpulse/blob/main/app/employer/postings/page.tsx): `app/employer/postings/page.tsx`
- [Review applicants](https://github.com/youssef5107/careerpulse/blob/main/app/employer/applicants/%5Bapplicant-id%5D/page.tsx): `app/employer/applicants/[applicant-id]/page.tsx`
- [Company profile](https://github.com/youssef5107/careerpulse/blob/main/app/employer/company-profile/page.tsx): `app/employer/company-profile/page.tsx`

### Applications and career

- [Job seeker profile](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/profile/page.tsx): `app/jobseeker/profile/page.tsx`
- [Apply for job](https://github.com/youssef5107/careerpulse/blob/main/app/jobseeker/components/ApplyButton.tsx): `app/jobseeker/components/ApplyButton.tsx`
- [Applications API](https://github.com/youssef5107/careerpulse/blob/main/app/api/applications/route.ts): `app/api/applications/route.ts`
- [Interview management](https://github.com/youssef5107/careerpulse/blob/main/app/components/InterviewsPage.tsx): `app/components/InterviewsPage.tsx`
- [Interviews API](https://github.com/youssef5107/careerpulse/blob/main/app/api/interviews/route.ts): `app/api/interviews/route.ts`

### Application services

- [Sign-in and signup](https://github.com/youssef5107/careerpulse/blob/main/actions/auth.ts): `actions/auth.ts`
- [Authentication](https://github.com/youssef5107/careerpulse/blob/main/lib/auth.ts): `lib/auth.ts`
- [Auth configuration](https://github.com/youssef5107/careerpulse/blob/main/auth.config.ts): `auth.config.ts`
- [Job search API](https://github.com/youssef5107/careerpulse/blob/main/app/api/jobs/route.ts): `app/api/jobs/route.ts`
- [Employer posts API](https://github.com/youssef5107/careerpulse/blob/main/app/api/employer/posts/route.ts): `app/api/employer/posts/route.ts`
- [Profile API](https://github.com/youssef5107/careerpulse/blob/main/app/api/profile/route.ts): `app/api/profile/route.ts`
- [Company profile API](https://github.com/youssef5107/careerpulse/blob/main/app/api/company-profile/route.ts): `app/api/company-profile/route.ts`
- [Prisma client](https://github.com/youssef5107/careerpulse/blob/main/lib/prisma.ts): `lib/prisma.ts`
- [Application database](https://github.com/youssef5107/careerpulse/blob/main/neon.ts): `neon.ts`
- [Redis cache](https://github.com/youssef5107/careerpulse/blob/main/lib/redis.ts): `lib/redis.ts`

### Client state

- [Typed Redux hooks](https://github.com/youssef5107/careerpulse/blob/main/store/hooks.ts): `store/hooks.ts`
- [Toast state](https://github.com/youssef5107/careerpulse/blob/main/store/features/toast/toastSlice.ts): `store/features/toast/toastSlice.ts`
- [Postings state](https://github.com/youssef5107/careerpulse/blob/main/store/features/postings/postingsSlice.ts): `store/features/postings/postingsSlice.ts`
- [Job form state](https://github.com/youssef5107/careerpulse/blob/main/store/features/jobPost/jobPostSlice.ts): `store/features/jobPost/jobPostSlice.ts`

### Other components

- **Job seeker**
- **Employer**

## Connections

- Job seeker → Job seeker home: uses
- Job seeker home → Search bar: renders (evidence: `app/jobseeker/home/page.tsx`)
- Job seeker home → Recently viewed: renders (evidence: `app/jobseeker/home/page.tsx`)
- Job seeker → Search and browse: searches
- Search and browse → Saved jobs: renders (evidence: `app/jobseeker/search/page.tsx`)
- Job seeker → Job details: views
- Job details → Apply for job: renders (evidence: `app/jobseeker/jobs/[id]/page.tsx`)
- Job details → Save job: renders (evidence: `app/jobseeker/jobs/[id]/page.tsx`)
- Job seeker → Applications API: submits application
- Applications API → Authentication: authenticates (evidence: `app/api/applications/route.ts`)
- Applications API → Prisma client: creates application
- Employer → Create job posting: creates posting
- Create job posting → Employer posts API: submits posting
- Manage postings → Employer posts API: loads postings
- Employer posts API → Authentication: authenticates (evidence: `app/api/employer/posts/route.ts`)
- Employer posts API → Prisma client: reads and writes (evidence: `app/api/employer/posts/route.ts`)
- Employer posts API → Redis cache: caches postings (evidence: `app/api/employer/posts/route.ts`)
- Employer → Review applicants: reviews candidates
- Employer → Interview management: manages interviews
- Job seeker → Interview management: responds to interviews
- Interview management → Toast state: dispatches toast (evidence: `app/components/InterviewsPage.tsx`)
- Interviews API → Authentication: authenticates (evidence: `app/api/interviews/route.ts`)
- Interviews API → Prisma client: reads and writes (evidence: `app/api/interviews/route.ts`)
- Job seeker → Job seeker profile: maintains profile
- Profile API → Authentication: authenticates (evidence: `app/api/profile/route.ts`)
- Profile API → Prisma client: reads and writes (evidence: `app/api/profile/route.ts`)
- Employer → Company profile: maintains company profile
- Company profile API → Authentication: authenticates (evidence: `app/api/company-profile/route.ts`)
- Company profile API → Prisma client: reads and writes (evidence: `app/api/company-profile/route.ts`)
- Company profile API → Redis cache: caches profile (evidence: `app/api/company-profile/route.ts`)
- Search and browse → Job search API: loads jobs
- Job search API → Prisma client: queries jobs (evidence: `app/api/jobs/route.ts`)
- Job search API → Redis cache: reads cache (evidence: `app/api/jobs/route.ts`)
- Sign-in and signup → Authentication: signs in (evidence: `actions/auth.ts`)
- Sign-in and signup → Prisma client: creates user (evidence: `actions/auth.ts`)
- Authentication → Auth configuration: uses config (evidence: `lib/auth.ts`)
- Authentication → Prisma client: uses adapter (evidence: `lib/auth.ts`)
- Typed Redux hooks → Postings state: types state
- Typed Redux hooks → Toast state: types state
- Apply for job → Typed Redux hooks: uses hooks (evidence: `app/jobseeker/components/ApplyButton.tsx`)
- Apply for job → Toast state: dispatches toast (evidence: `app/jobseeker/components/ApplyButton.tsx`)
- Saved jobs → Typed Redux hooks: uses hooks (evidence: `app/jobseeker/components/BookmarkIcon.tsx`)
- Saved jobs → Toast state: dispatches toast (evidence: `app/jobseeker/components/BookmarkIcon.tsx`)
- Save job → Typed Redux hooks: uses hooks (evidence: `app/jobseeker/components/SaveJobButton.tsx`)
- Save job → Toast state: dispatches toast (evidence: `app/jobseeker/components/SaveJobButton.tsx`)
