# litongormhel/ohmployee-web architecture

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

- Interactive diagram: https://gitdiagram.com/litongormhel/ohmployee-web
- Repository: https://github.com/litongormhel/ohmployee-web

## Overview

OHMployee is a workforce operations web platform covering workforce records, staffing and vacancy workflows, approvals, reporting, administration, and user access. The main user flow is sign-in and role-based dashboard access, then using a domain workspace to read or submit operational changes; approvals review queued requests, while query modules access Supabase for data and mutations. The README describes a thin client with business rules, RBAC, and integrity delegated to Supabase. The graph emphasizes documented major workspaces and source-backed links; many routes and query modules were not sampled, so their internal wiring is not inferred.

Main entry points: [`src/lib/supabase/client.ts`](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/supabase/client.ts) (Supabase client), [`src/lib/auth.ts`](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/auth.ts) (Session & identity), [`src/app/(dashboard)/plantilla/page.tsx`](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/plantilla/page.tsx) (Plantilla staffing), [`src/app/(dashboard)/vacancy/page.tsx`](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/vacancy/page.tsx) (Vacancy pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access &amp; shell"]
  node_login["Login / signup<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_auth["Session &amp; identity<br/>[auth.ts]"]
  node_rbac["Role permissions<br/>[rbac.ts]"]
  node_shell["Dashboard shell<br/>[layout.tsx]"]
end

subgraph group_operations["Workforce operations"]
  node_plantilla["Plantilla staffing<br/>[page.tsx]"]
  node_plantilla_detail["Staffing detail<br/>[page.tsx]"]
  node_vacancy["Vacancy pipeline<br/>[page.tsx]"]
  node_vacancy_ui["Applicant pipeline UI<br/>[VacancyTable.tsx]"]
  node_hr["HR employee records<br/>[page.tsx]"]
  node_cencom["Cencom operations<br/>[page.tsx]"]
end

subgraph group_governance["Approvals &amp; governance"]
  node_approvals["Approval queues<br/>[page.tsx]"]
  node_queue["Queue review pane"]
  node_requests["Operational requests<br/>[requests.ts]"]
  node_my_requests["My requests<br/>[page.tsx]"]
  node_more["Admin &amp; imports<br/>[page.tsx]"]
end

subgraph group_insight["Insights &amp; administration"]
  node_reports["Reports &amp; integrity<br/>[page.tsx]"]
  node_users["Users &amp; access<br/>[page.tsx]"]
  node_notifications["Notifications<br/>[page.tsx]"]
end

subgraph group_data["Data services"]
  node_vacancy_queries["Vacancy data operations<br/>[vacancy.ts]"]
  node_plantilla_queries["Staffing data operations<br/>[plantilla.ts]"]
  node_hr_queries["Employee data operations<br/>[hr_emploc.ts]"]
  node_governance_queries["Governance operations<br/>[governance.ts]"]
  node_supabase[("Supabase client<br/>[client.ts]")]
  node_server_client["Scoped API client<br/>[server.ts]"]
  node_ohmni["Ohmni API route<br/>[route.ts]"]
end

node_user(("Workforce user"))

node_user -->|"signs in"| node_login
node_login -.->|"authenticates"| node_auth
node_dashboard -->|"checks session"| node_auth
node_auth -->|"verifies session"| node_supabase
node_auth -->|"resolves access"| node_rbac
node_shell -.->|"frames workspace"| node_user
node_user -.->|"manages staffing"| node_plantilla
node_user -.->|"runs hiring"| node_vacancy
node_user -.->|"manages records"| node_hr
node_user -.->|"reviews deployment"| node_cencom
node_plantilla -->|"loads staffing"| node_plantilla_queries
node_plantilla -->|"loads vacancies"| node_vacancy_queries
node_vacancy -->|"renders table"| node_vacancy_ui
node_vacancy -->|"loads and updates"| node_vacancy_queries
node_vacancy_ui -.->|"updates pipeline"| node_vacancy_queries
node_hr -->|"loads records"| node_hr_queries
node_approvals -.->|"presents queues"| node_queue
node_queue -->|"loads approvals"| node_requests
node_my_requests -.->|"tracks requests"| node_requests
node_more -->|"administers controls"| node_governance_queries
node_reports -.->|"reads reports"| node_supabase
node_users -.->|"manages access"| node_rbac
node_requests -->|"reads and writes"| node_supabase
node_plantilla_queries -->|"reads and writes"| node_supabase
node_hr_queries -->|"reads and writes"| node_supabase
node_governance_queries -.->|"loads controls"| node_supabase
node_server_client -->|"creates scoped client"| node_supabase
node_ohmni -->|"validates bearer"| node_server_client

click node_login "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(auth)/login/page.tsx"
click node_dashboard "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/dashboard/page.tsx"
click node_auth "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/auth.ts"
click node_rbac "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/rbac.ts"
click node_shell "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/layout.tsx"
click node_plantilla "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/plantilla/page.tsx"
click node_plantilla_detail "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/plantilla/%5Bid%5D/page.tsx"
click node_vacancy "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/vacancy/page.tsx"
click node_vacancy_ui "https://github.com/litongormhel/ohmployee-web/blob/main/src/components/vacancy/VacancyTable.tsx"
click node_hr "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/hr-emploc/page.tsx"
click node_cencom "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/cencom/page.tsx"
click node_approvals "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/approvals/page.tsx"
click node_queue "https://github.com/litongormhel/ohmployee-web/blob/main/src/components/approvals/ActiveQueueReviewPane.tsx"
click node_requests "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/requests.ts"
click node_my_requests "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/my-requests/page.tsx"
click node_more "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/more/page.tsx"
click node_reports "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/reports/page.tsx"
click node_users "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/users/page.tsx"
click node_notifications "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/notifications/page.tsx"
click node_vacancy_queries "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/vacancy.ts"
click node_plantilla_queries "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/plantilla.ts"
click node_hr_queries "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/hr_emploc.ts"
click node_governance_queries "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/governance.ts"
click node_supabase "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/supabase/client.ts"
click node_server_client "https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/supabase/server.ts"
click node_ohmni "https://github.com/litongormhel/ohmployee-web/blob/main/src/app/api/ohmni/route.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_login,node_dashboard,node_auth,node_rbac,node_shell,node_user toneBlue
class node_plantilla,node_plantilla_detail,node_vacancy,node_vacancy_ui,node_hr,node_cencom toneAmber
class node_approvals,node_queue,node_requests,node_my_requests,node_more toneMint
class node_reports,node_users,node_notifications toneRose
class node_vacancy_queries,node_plantilla_queries,node_hr_queries,node_governance_queries,node_supabase,node_server_client,node_ohmni toneIndigo
```

## Components

### Access & shell

- [Login / signup](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [Dashboard](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/dashboard/page.tsx): `src/app/(dashboard)/dashboard/page.tsx`
- [Session & identity](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Role permissions](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/rbac.ts): `src/lib/rbac.ts`
- [Dashboard shell](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/layout.tsx): `src/app/(dashboard)/layout.tsx`

### Workforce operations

- [Plantilla staffing](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/plantilla/page.tsx): `src/app/(dashboard)/plantilla/page.tsx`
- [Staffing detail](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/plantilla/%5Bid%5D/page.tsx): `src/app/(dashboard)/plantilla/[id]/page.tsx`
- [Vacancy pipeline](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/vacancy/page.tsx): `src/app/(dashboard)/vacancy/page.tsx`
- [Applicant pipeline UI](https://github.com/litongormhel/ohmployee-web/blob/main/src/components/vacancy/VacancyTable.tsx): `src/components/vacancy/VacancyTable.tsx`
- [HR employee records](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/hr-emploc/page.tsx): `src/app/(dashboard)/hr-emploc/page.tsx`
- [Cencom operations](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/cencom/page.tsx): `src/app/(dashboard)/cencom/page.tsx`

### Approvals & governance

- [Approval queues](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/approvals/page.tsx): `src/app/(dashboard)/approvals/page.tsx`
- [Queue review pane](https://github.com/litongormhel/ohmployee-web/blob/main/src/components/approvals/ActiveQueueReviewPane.tsx): `src/components/approvals/ActiveQueueReviewPane.tsx`
- [Operational requests](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/requests.ts): `src/lib/queries/requests.ts`
- [My requests](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/my-requests/page.tsx): `src/app/(dashboard)/my-requests/page.tsx`
- [Admin & imports](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/more/page.tsx): `src/app/(dashboard)/more/page.tsx`

### Insights & administration

- [Reports & integrity](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/reports/page.tsx): `src/app/(dashboard)/reports/page.tsx`
- [Users & access](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/users/page.tsx): `src/app/(dashboard)/users/page.tsx`
- [Notifications](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/(dashboard)/notifications/page.tsx): `src/app/(dashboard)/notifications/page.tsx`

### Data services

- [Vacancy data operations](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/vacancy.ts): `src/lib/queries/vacancy.ts`
- [Staffing data operations](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/plantilla.ts): `src/lib/queries/plantilla.ts`
- [Employee data operations](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/hr_emploc.ts): `src/lib/queries/hr_emploc.ts`
- [Governance operations](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/queries/governance.ts): `src/lib/queries/governance.ts`
- [Supabase client](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/supabase/client.ts): `src/lib/supabase/client.ts`
- [Scoped API client](https://github.com/litongormhel/ohmployee-web/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- [Ohmni API route](https://github.com/litongormhel/ohmployee-web/blob/main/src/app/api/ohmni/route.ts): `src/app/api/ohmni/route.ts`

### Other components

- **Workforce user**

## Connections

- Workforce user → Login / signup: signs in (evidence: `README.md`)
- Login / signup → Session & identity: authenticates
- Dashboard → Session & identity: checks session (evidence: `src/app/(dashboard)/dashboard/page.tsx`)
- Session & identity → Supabase client: verifies session (evidence: `src/lib/auth.ts`)
- Session & identity → Role permissions: resolves access (evidence: `src/lib/auth.ts`)
- Dashboard shell → Workforce user: frames workspace
- Workforce user → Plantilla staffing: manages staffing
- Workforce user → Vacancy pipeline: runs hiring
- Workforce user → HR employee records: manages records
- Workforce user → Cencom operations: reviews deployment
- Plantilla staffing → Staffing data operations: loads staffing (evidence: `src/app/(dashboard)/plantilla/page.tsx`)
- Plantilla staffing → Vacancy data operations: loads vacancies (evidence: `src/app/(dashboard)/plantilla/page.tsx`)
- Vacancy pipeline → Applicant pipeline UI: renders table (evidence: `src/app/(dashboard)/vacancy/page.tsx`)
- Vacancy pipeline → Vacancy data operations: loads and updates (evidence: `src/app/(dashboard)/vacancy/page.tsx`)
- Applicant pipeline UI → Vacancy data operations: updates pipeline
- HR employee records → Employee data operations: loads records (evidence: `src/app/(dashboard)/hr-emploc/page.tsx`)
- Approval queues → Queue review pane: presents queues
- Queue review pane → Operational requests: loads approvals (evidence: `src/components/approvals/ActiveQueueReviewPane.tsx`)
- My requests → Operational requests: tracks requests
- Admin & imports → Governance operations: administers controls (evidence: `src/app/(dashboard)/more/page.tsx`)
- Reports & integrity → Supabase client: reads reports
- Users & access → Role permissions: manages access
- Operational requests → Supabase client: reads and writes (evidence: `src/lib/queries/requests.ts`)
- Staffing data operations → Supabase client: reads and writes (evidence: `src/lib/queries/plantilla.ts`)
- Employee data operations → Supabase client: reads and writes (evidence: `src/lib/queries/hr_emploc.ts`)
- Governance operations → Supabase client: loads controls
- Scoped API client → Supabase client: creates scoped client (evidence: `src/lib/supabase/server.ts`)
- Ohmni API route → Scoped API client: validates bearer (evidence: `src/app/api/ohmni/route.ts`)
