# aldrin-palado/peso-hub architecture

> Architecture diagram of the GitHub repository aldrin-palado/peso-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aldrin-palado/peso-hub
- Repository: https://github.com/aldrin-palado/peso-hub

## Overview

PESO is a public employment-services portal and role-based hiring platform: job seekers discover vacancies and apply, employers manage postings and applications, and staff/admin users oversee accounts, employers, vacancies, analytics, and communications. The map follows the evidenced route and dashboard/module structure and includes major listed capabilities such as AI assistance, messaging, and Gmail integration. Source excerpts are partial and there is no README, so some subsystem relationships are intentionally left unconnected.

Main entry points: [`peso-app/src/App.tsx`](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/App.tsx) (Application router), [`peso-app/src/dashboards/JobSeekerDashboard.tsx`](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/JobSeekerDashboard.tsx) (Seeker workspace), [`peso-app/src/dashboards/AdminDashboard.tsx`](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/AdminDashboard.tsx) (Admin workspace), [`peso-app/src/services/supabase.js`](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/services/supabase.js) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Public Access"]
  node_app["Application router<br/>[App.tsx]"]
  node_public["Public pages<br/>[Home.tsx]"]
  node_auth["Account access<br/>[Login.tsx]"]
  node_seeker_reg["Seeker registration"]
end

subgraph group_marketplace["Hiring Marketplace"]
  node_seeker_dash["Seeker workspace"]
  node_job_search["Vacancy search<br/>[JobsModule.tsx]"]
  node_job_matches["Job matches"]
  node_seeker_apps["Applications"]
  node_saved_jobs["Saved jobs"]
  node_ai_chat["AI assistant"]
  node_employer_dash["Employer workspace"]
  node_employer_jobs["Job postings"]
  node_employer_apps["Applicant management"]
  node_employer_reg["Employer onboarding"]
end

subgraph group_operations["PESO Operations"]
  node_admin_dash["Admin workspace<br/>[AdminDashboard.tsx]"]
  node_employer_admin["Employer oversight"]
  node_seeker_admin["Seeker oversight"]
  node_analytics["Analytics"]
  node_staff_dash["Staff workspace<br/>[StaffDashboard.tsx]"]
end

subgraph group_services["Platform Services"]
  node_messages["Messaging<br/>[DirectMessages.tsx]"]
  node_ai_handler["AI service handler<br/>[index.ts]"]
  node_gmail_oauth["Gmail integration<br/>[index.ts]"]
  node_gmail_sync["Gmail synchronization<br/>[gmail-sync.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.js]"]
  node_supabase_db[("Supabase data services")]
end

node_visitor(("Public user"))

node_visitor -->|"opens"| node_app
node_app -->|"routes"| node_public
node_app -->|"routes"| node_auth
node_app -->|"routes"| node_seeker_reg
node_app -->|"routes"| node_admin_dash
node_app -->|"routes"| node_employer_dash
node_app -->|"routes"| node_seeker_dash
node_app -->|"routes"| node_staff_dash
node_seeker_dash -->|"renders"| node_job_search
node_seeker_dash -->|"renders"| node_job_matches
node_seeker_dash -->|"renders"| node_seeker_apps
node_seeker_dash -->|"renders"| node_saved_jobs
node_seeker_dash -->|"renders"| node_ai_chat
node_employer_dash -->|"renders"| node_employer_jobs
node_employer_dash -->|"renders"| node_employer_apps
node_admin_dash -->|"renders"| node_employer_admin
node_admin_dash -->|"renders"| node_seeker_admin
node_admin_dash -->|"renders"| node_analytics
node_job_search -->|"queries"| node_supabase_client
node_employer_admin -->|"checks"| node_employer_reg
node_employer_admin -->|"queries"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase_db
node_ai_chat -.->|"invokes"| node_ai_handler
node_messages -.->|"uses"| node_supabase_client
node_gmail_oauth -.->|"uses"| node_gmail_sync

click node_app "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/App.tsx"
click node_public "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/pages/Home.tsx"
click node_auth "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/components/Login.tsx"
click node_seeker_reg "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/components/JobSeekerRegistration.tsx"
click node_seeker_dash "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/JobSeekerDashboard.tsx"
click node_job_search "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/JobsModule.tsx"
click node_job_matches "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/JobMatchesModule.tsx"
click node_seeker_apps "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/ApplicationsModule.tsx"
click node_saved_jobs "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/SavedJobsModule.tsx"
click node_ai_chat "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/AIChatbotModule.tsx"
click node_employer_dash "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/EmployerDashboard.tsx"
click node_employer_jobs "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/employersmodules/MyJobPostModule.tsx"
click node_employer_apps "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/employersmodules/ApplicationsModule.tsx"
click node_employer_reg "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/services/employerRegistration.ts"
click node_admin_dash "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/AdminDashboard.tsx"
click node_employer_admin "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/adminmodules/EmployersModule.tsx"
click node_seeker_admin "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/adminmodules/JobSeekersModule.tsx"
click node_analytics "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/adminmodules/AnalyticsModule.tsx"
click node_staff_dash "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/StaffDashboard.tsx"
click node_messages "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/components/DirectMessages.tsx"
click node_ai_handler "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/supabase/functions/peso-ai/index.ts"
click node_gmail_oauth "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/supabase/functions/gmail-oauth-start/index.ts"
click node_gmail_sync "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/supabase/functions/_shared/gmail-sync.ts"
click node_supabase_client "https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/services/supabase.js"

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_public,node_auth,node_seeker_reg,node_visitor toneBlue
class node_seeker_dash,node_job_search,node_job_matches,node_seeker_apps,node_saved_jobs,node_ai_chat,node_employer_dash,node_employer_jobs,node_employer_apps,node_employer_reg toneAmber
class node_admin_dash,node_employer_admin,node_seeker_admin,node_analytics,node_staff_dash toneMint
class node_messages,node_ai_handler,node_gmail_oauth,node_gmail_sync,node_supabase_client,node_supabase_db toneRose
```

## Components

### Public Access

- [Application router](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/App.tsx): `peso-app/src/App.tsx`
- [Public pages](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/pages/Home.tsx): `peso-app/src/pages/Home.tsx`
- [Account access](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/components/Login.tsx): `peso-app/src/components/Login.tsx`
- [Seeker registration](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/components/JobSeekerRegistration.tsx): `peso-app/src/components/JobSeekerRegistration.tsx`

### Hiring Marketplace

- [Seeker workspace](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/JobSeekerDashboard.tsx): `peso-app/src/dashboards/JobSeekerDashboard.tsx`
- [Vacancy search](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/JobsModule.tsx): `peso-app/src/jobseekersmodules/JobsModule.tsx`
- [Job matches](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/JobMatchesModule.tsx): `peso-app/src/jobseekersmodules/JobMatchesModule.tsx`
- [Applications](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/ApplicationsModule.tsx): `peso-app/src/jobseekersmodules/ApplicationsModule.tsx`
- [Saved jobs](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/SavedJobsModule.tsx): `peso-app/src/jobseekersmodules/SavedJobsModule.tsx`
- [AI assistant](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/jobseekersmodules/AIChatbotModule.tsx): `peso-app/src/jobseekersmodules/AIChatbotModule.tsx`
- [Employer workspace](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/EmployerDashboard.tsx): `peso-app/src/dashboards/EmployerDashboard.tsx`
- [Job postings](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/employersmodules/MyJobPostModule.tsx): `peso-app/src/employersmodules/MyJobPostModule.tsx`
- [Applicant management](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/employersmodules/ApplicationsModule.tsx): `peso-app/src/employersmodules/ApplicationsModule.tsx`
- [Employer onboarding](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/services/employerRegistration.ts): `peso-app/src/services/employerRegistration.ts`

### PESO Operations

- [Admin workspace](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/AdminDashboard.tsx): `peso-app/src/dashboards/AdminDashboard.tsx`
- [Employer oversight](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/adminmodules/EmployersModule.tsx): `peso-app/src/adminmodules/EmployersModule.tsx`
- [Seeker oversight](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/adminmodules/JobSeekersModule.tsx): `peso-app/src/adminmodules/JobSeekersModule.tsx`
- [Analytics](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/adminmodules/AnalyticsModule.tsx): `peso-app/src/adminmodules/AnalyticsModule.tsx`
- [Staff workspace](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/dashboards/StaffDashboard.tsx): `peso-app/src/dashboards/StaffDashboard.tsx`

### Platform Services

- [Messaging](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/components/DirectMessages.tsx): `peso-app/src/components/DirectMessages.tsx`
- [AI service handler](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/supabase/functions/peso-ai/index.ts): `peso-app/supabase/functions/peso-ai/index.ts`
- [Gmail integration](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/supabase/functions/gmail-oauth-start/index.ts): `peso-app/supabase/functions/gmail-oauth-start/index.ts`
- [Gmail synchronization](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/supabase/functions/_shared/gmail-sync.ts): `peso-app/supabase/functions/_shared/gmail-sync.ts`
- [Supabase client](https://github.com/aldrin-palado/peso-hub/blob/main/peso-app/src/services/supabase.js): `peso-app/src/services/supabase.js`
- **Supabase data services**

### Other components

- **Public user**

## Connections

- Public user → Application router: opens (evidence: `peso-app/src/App.tsx`)
- Application router → Public pages: routes (evidence: `peso-app/src/App.tsx`)
- Application router → Account access: routes (evidence: `peso-app/src/App.tsx`)
- Application router → Seeker registration: routes (evidence: `peso-app/src/App.tsx`)
- Application router → Admin workspace: routes (evidence: `peso-app/src/App.tsx`)
- Application router → Employer workspace: routes (evidence: `peso-app/src/App.tsx`)
- Application router → Seeker workspace: routes (evidence: `peso-app/src/App.tsx`)
- Application router → Staff workspace: routes (evidence: `peso-app/src/App.tsx`)
- Seeker workspace → Vacancy search: renders (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Seeker workspace → Job matches: renders (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Seeker workspace → Applications: renders (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Seeker workspace → Saved jobs: renders (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Seeker workspace → AI assistant: renders (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Employer workspace → Job postings: renders
- Employer workspace → Applicant management: renders
- Admin workspace → Employer oversight: renders (evidence: `peso-app/src/dashboards/AdminDashboard.tsx`)
- Admin workspace → Seeker oversight: renders (evidence: `peso-app/src/dashboards/AdminDashboard.tsx`)
- Admin workspace → Analytics: renders (evidence: `peso-app/src/dashboards/AdminDashboard.tsx`)
- Vacancy search → Supabase client: queries (evidence: `peso-app/src/jobseekersmodules/JobsModule.tsx`)
- Employer oversight → Employer onboarding: checks (evidence: `peso-app/src/adminmodules/EmployersModule.tsx`)
- Employer oversight → Supabase client: queries (evidence: `peso-app/src/adminmodules/EmployersModule.tsx`)
- Supabase client → Supabase data services: connects (evidence: `peso-app/src/services/supabase.js`)
- AI assistant → AI service handler: invokes
- Messaging → Supabase client: uses
- Gmail integration → Gmail synchronization: uses
