# aldrin-palado/peso-mabini---copy architecture

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

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

## Overview

PESO is a job-matching and employment-services web application for job seekers, employers, and public employment staff. The main user journey is to browse vacancies, register or sign in, manage a job-seeker profile, and apply; role-specific dashboards provide employer and administrative workflows. Supabase supplies application data and authentication, while the repository also includes AI assistance and Gmail-backed messaging integrations. The map follows routes and imports visible in the excerpts and SOURCE INDEX; several substantial modules are unsampled, so their internal interactions are not inferred.

Main entry points: [`peso-app/src/App.tsx`](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/App.tsx) (Application router), [`peso-app/src/services/supabase.js`](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/supabase.js) (Supabase client), [`peso-app/src/dashboards/JobSeekerDashboard.tsx`](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/JobSeekerDashboard.tsx) (Job seeker dashboard), [`peso-app/supabase/functions/_shared/gmail.ts`](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/supabase/functions/_shared/gmail.ts) (Gmail shared services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and access"]
  node_app["Application router<br/>[App.tsx]"]
  node_public["Public job portal"]
  node_auth["Sign-in and registration<br/>[Login.tsx]"]
  node_timeout["Session management<br/>[SessionTimeout.tsx]"]
end

subgraph group_seeker["Job seeker services"]
  node_seekerboard["Job seeker dashboard"]
  node_jobs["Vacancy search and applications<br/>[JobsModule.tsx]"]
  node_seekerfeatures["Seeker feature modules"]
  node_profile["Profile and resume services"]
  node_aiui["AI assistant interface"]
end

subgraph group_operations["Employer and PESO operations"]
  node_admin["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_staff["Staff dashboard<br/>[StaffDashboard.tsx]"]
  node_employer["Employer dashboard"]
  node_adminops["Admin management modules"]
  node_employerops["Employer modules"]
end

subgraph group_platform["Data and integrations"]
  node_ai["PESO AI service<br/>[pesoAi.ts]"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
  node_supabase[("Supabase platform")]
  node_gmailapi["Gmail integration functions"]
  node_gmailshared["Gmail shared services<br/>[gmail.ts]"]
  node_gmail["Google Gmail"]
end

node_visitor(("Visitor or user"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_auth
node_app -->|"mounts"| node_timeout
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_staff
node_app -->|"routes to"| node_employer
node_app -->|"routes to"| node_seekerboard
node_admin -->|"renders modules"| node_adminops
node_seekerboard -->|"renders module"| node_jobs
node_seekerboard -->|"renders modules"| node_seekerfeatures
node_seekerboard -->|"checks completeness"| node_profile
node_jobs -->|"uses profile service"| node_profile
node_aiui -->|"calls"| node_ai
node_public -->|"uses data client"| node_supabaseclient
node_jobs -->|"reads and writes"| node_supabaseclient
node_auth -->|"authenticates"| node_supabaseclient
node_timeout -->|"checks session"| node_supabaseclient
node_supabaseclient -->|"accesses"| node_supabase
node_gmailapi -->|"uses shared services"| node_gmailshared
node_gmailapi -->|"uses sync services"| node_gmailshared
node_gmailshared -->|"accesses data"| node_supabase
node_gmailshared -->|"calls Gmail API"| node_gmail
node_employer -.->|"serves workflows"| node_employerops
node_staff -.->|"serves workflows"| node_adminops

click node_app "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/App.tsx"
click node_public "https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/pages"
click node_auth "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/components/Login.tsx"
click node_timeout "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/components/SessionTimeout.tsx"
click node_admin "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/AdminDashboard.tsx"
click node_staff "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/StaffDashboard.tsx"
click node_employer "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/EmployerDashboard.tsx"
click node_adminops "https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/adminmodules"
click node_employerops "https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/employersmodules"
click node_seekerboard "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/JobSeekerDashboard.tsx"
click node_jobs "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/jobseekersmodules/JobsModule.tsx"
click node_seekerfeatures "https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/jobseekersmodules"
click node_profile "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/jobSeekerProfile.ts"
click node_aiui "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/jobseekersmodules/AIChatbotModule.tsx"
click node_ai "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/pesoAi.ts"
click node_supabaseclient "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/supabase.js"
click node_gmailapi "https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/supabase/functions"
click node_gmailshared "https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/supabase/functions/_shared/gmail.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_public,node_auth,node_timeout,node_visitor toneBlue
class node_seekerboard,node_jobs,node_seekerfeatures,node_profile,node_aiui toneAmber
class node_admin,node_staff,node_employer,node_adminops,node_employerops toneMint
class node_ai,node_supabaseclient,node_supabase,node_gmailapi,node_gmailshared,node_gmail toneRose
```

## Components

### Web entry and access

- [Application router](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/App.tsx): `peso-app/src/App.tsx`
- [Public job portal](https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/pages): `peso-app/src/pages`
- [Sign-in and registration](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/components/Login.tsx): `peso-app/src/components/Login.tsx`
- [Session management](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/components/SessionTimeout.tsx): `peso-app/src/components/SessionTimeout.tsx`

### Job seeker services

- [Job seeker dashboard](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/JobSeekerDashboard.tsx): `peso-app/src/dashboards/JobSeekerDashboard.tsx`
- [Vacancy search and applications](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/jobseekersmodules/JobsModule.tsx): `peso-app/src/jobseekersmodules/JobsModule.tsx`
- [Seeker feature modules](https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/jobseekersmodules): `peso-app/src/jobseekersmodules`
- [Profile and resume services](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/jobSeekerProfile.ts): `peso-app/src/services/jobSeekerProfile.ts`
- [AI assistant interface](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/jobseekersmodules/AIChatbotModule.tsx): `peso-app/src/jobseekersmodules/AIChatbotModule.tsx`

### Employer and PESO operations

- [Admin dashboard](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/AdminDashboard.tsx): `peso-app/src/dashboards/AdminDashboard.tsx`
- [Staff dashboard](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/StaffDashboard.tsx): `peso-app/src/dashboards/StaffDashboard.tsx`
- [Employer dashboard](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/dashboards/EmployerDashboard.tsx): `peso-app/src/dashboards/EmployerDashboard.tsx`
- [Admin management modules](https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/adminmodules): `peso-app/src/adminmodules`
- [Employer modules](https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/src/employersmodules): `peso-app/src/employersmodules`

### Data and integrations

- [PESO AI service](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/pesoAi.ts): `peso-app/src/services/pesoAi.ts`
- [Supabase client](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/src/services/supabase.js): `peso-app/src/services/supabase.js`
- **Supabase platform**
- [Gmail integration functions](https://github.com/aldrin-palado/peso-mabini---copy/tree/main/peso-app/supabase/functions): `peso-app/supabase/functions`
- [Gmail shared services](https://github.com/aldrin-palado/peso-mabini---copy/blob/main/peso-app/supabase/functions/_shared/gmail.ts): `peso-app/supabase/functions/_shared/gmail.ts`
- **Google Gmail**

### Other components

- **Visitor or user**

## Connections

- Visitor or user → Application router: opens (evidence: `peso-app/src/App.tsx`)
- Application router → Public job portal: routes to (evidence: `peso-app/src/App.tsx`)
- Application router → Sign-in and registration: routes to (evidence: `peso-app/src/App.tsx`)
- Application router → Session management: mounts (evidence: `peso-app/src/App.tsx`)
- Application router → Admin dashboard: routes to (evidence: `peso-app/src/App.tsx`)
- Application router → Staff dashboard: routes to (evidence: `peso-app/src/App.tsx`)
- Application router → Employer dashboard: routes to (evidence: `peso-app/src/App.tsx`)
- Application router → Job seeker dashboard: routes to (evidence: `peso-app/src/App.tsx`)
- Admin dashboard → Admin management modules: renders modules (evidence: `peso-app/src/dashboards/AdminDashboard.tsx`)
- Job seeker dashboard → Vacancy search and applications: renders module (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Job seeker dashboard → Seeker feature modules: renders modules (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Job seeker dashboard → Profile and resume services: checks completeness (evidence: `peso-app/src/dashboards/JobSeekerDashboard.tsx`)
- Vacancy search and applications → Profile and resume services: uses profile service (evidence: `peso-app/src/jobseekersmodules/JobsModule.tsx`)
- AI assistant interface → PESO AI service: calls (evidence: `peso-app/src/jobseekersmodules/AIChatbotModule.tsx`)
- Public job portal → Supabase client: uses data client (evidence: `peso-app/src/pages/Home.tsx`)
- Vacancy search and applications → Supabase client: reads and writes (evidence: `peso-app/src/jobseekersmodules/JobsModule.tsx`)
- Sign-in and registration → Supabase client: authenticates (evidence: `peso-app/src/components/Login.tsx`)
- Session management → Supabase client: checks session (evidence: `peso-app/src/components/SessionTimeout.tsx`)
- Supabase client → Supabase platform: accesses (evidence: `peso-app/src/services/supabase.js`)
- Gmail integration functions → Gmail shared services: uses shared services (evidence: `peso-app/supabase/functions/gmail-inbox/index.ts`)
- Gmail integration functions → Gmail shared services: uses sync services (evidence: `peso-app/supabase/functions/contact-message/index.ts`)
- Gmail shared services → Supabase platform: accesses data (evidence: `peso-app/supabase/functions/_shared/gmail.ts`)
- Gmail shared services → Google Gmail: calls Gmail API (evidence: `peso-app/supabase/functions/_shared/gmail.ts`)
- Employer dashboard → Employer modules: serves workflows
- Staff dashboard → Admin management modules: serves workflows
