# sethtra/gdt-organiztional-chart architecture

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

- Interactive diagram: https://gitdiagram.com/sethtra/gdt-organiztional-chart
- Repository: https://github.com/sethtra/gdt-organiztional-chart

## Overview

GDT Organizational Chart combines individually owned, shareable organization-chart editing with a separate HR directory and position-management system. The main workflow is chart creation and editing through access-controlled routes, with local recovery and cloud persistence; HR administrators separately maintain staff, organizational structure, assignments, job titles, and skills, which support workforce reporting. The graph preserves these documented capabilities. Some page and service internals were not sampled, so those connections are limited to README or SOURCE INDEX evidence.

Main entry points: [`src/App.jsx`](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/App.jsx) (Routes and guards), [`src/supabaseClient.ts`](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/supabaseClient.ts) (Supabase), [`src/components/editor/FlowApp.jsx`](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/editor/FlowApp.jsx) (Chart editor), [`src/pages/JobArchitecturePage.tsx`](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/JobArchitecturePage.tsx) (Jobs and skills)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application access"]
  node_routes["Routes and guards<br/>[App.jsx]"]
  node_auth["Authentication<br/>[useAuth.js]"]
end

subgraph group_charts["Chart workspace"]
  node_chart_home["Chart dashboard"]
  node_editor["Chart editor<br/>[FlowApp.jsx]"]
  node_editor_shell["Editor shell<br/>[EditorShell.jsx]"]
  node_chart_state["Chart persistence"]
  node_recovery["Backup and restore<br/>[chartBackup.ts]"]
end

subgraph group_hr["HR operations"]
  node_directory["Staff directory"]
  node_staff_ops["Staff records<br/>[staffService.ts]"]
  node_assignments["Position assignments"]
  node_org_page["Organization structure"]
  node_org_data["Organization data<br/>[useOrgStructure.ts]"]
  node_job_arch["Jobs and skills"]
  node_job_service["Job architecture services"]
  node_skill_service["Skill catalog service<br/>[skillService.ts]"]
  node_admin_dashboard["HR dashboard"]
  node_coverage["Department coverage"]
  node_coverage_data["Coverage calculation"]
end

subgraph group_data["Services and data"]
  node_supabase[("Supabase<br/>[supabaseClient.ts]")]
end

node_person(("Chart users"))
node_hr_admin(("HR administrators"))

node_person -->|"opens app"| node_routes
node_hr_admin -->|"opens app"| node_routes
node_routes -->|"provides session"| node_auth
node_routes -->|"routes to"| node_chart_home
node_routes -->|"mounts editor"| node_editor_shell
node_routes -->|"guards route"| node_org_page
node_routes -->|"guards route"| node_job_arch
node_editor_shell -->|"renders"| node_editor
node_person -->|"manages charts"| node_chart_home
node_chart_home -->|"opens chart"| node_editor
node_editor -->|"saves edits"| node_chart_state
node_editor -->|"backs up or restores"| node_recovery
node_hr_admin -->|"maintains staff"| node_directory
node_directory -->|"manages records"| node_staff_ops
node_org_page -->|"loads structure"| node_org_data
node_hr_admin -->|"maintains hierarchy"| node_org_page
node_hr_admin -->|"maintains catalog"| node_job_arch
node_job_arch -->|"saves job titles"| node_job_service
node_job_arch -->|"saves skills"| node_skill_service
node_hr_admin -->|"views workforce"| node_admin_dashboard
node_admin_dashboard -->|"renders panel"| node_coverage
node_coverage -->|"displays results"| node_coverage_data
node_coverage_data -->|"loads staff"| node_staff_ops
node_auth -->|"authenticates"| node_supabase
node_chart_state -->|"persists charts"| node_supabase
node_staff_ops -->|"calls RPCs"| node_supabase
node_org_data -->|"loads organization"| node_supabase
node_job_service -->|"calls RPCs"| node_supabase
node_skill_service -->|"calls RPCs"| node_supabase
node_assignments -->|"assigns positions"| node_supabase
node_person -->|"views shared charts"| node_editor

click node_routes "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/App.jsx"
click node_auth "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useAuth.js"
click node_chart_home "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/DashboardTestPage.jsx"
click node_editor "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/editor/FlowApp.jsx"
click node_editor_shell "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/editor/EditorShell.jsx"
click node_chart_state "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useChartPersistence.ts"
click node_recovery "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/utils/chartBackup.ts"
click node_directory "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/StaffDirectoryPage.tsx"
click node_staff_ops "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/staffService.ts"
click node_assignments "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/positionAssignmentService.ts"
click node_org_page "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/AdminOrgStructureTestPage.tsx"
click node_org_data "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useOrgStructure.ts"
click node_job_arch "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/JobArchitecturePage.tsx"
click node_job_service "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/jobArchitectureService.ts"
click node_skill_service "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/skillService.ts"
click node_admin_dashboard "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/AdminDashboardPage.tsx"
click node_coverage "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/admin/dashboard/DepartmentCoveragePanel.tsx"
click node_coverage_data "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useDepartmentCoverage.ts"
click node_supabase "https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/supabaseClient.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_routes,node_auth,node_person toneBlue
class node_chart_home,node_editor,node_editor_shell,node_chart_state,node_recovery toneAmber
class node_directory,node_staff_ops,node_assignments,node_org_page,node_org_data,node_job_arch,node_job_service,node_skill_service,node_admin_dashboard,node_coverage,node_coverage_data toneMint
class node_supabase toneRose
class node_hr_admin toneIndigo
```

## Components

### Application access

- [Routes and guards](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/App.jsx): `src/App.jsx`
- [Authentication](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useAuth.js): `src/hooks/useAuth.js`

### Chart workspace

- [Chart dashboard](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/DashboardTestPage.jsx): `src/pages/DashboardTestPage.jsx`
- [Chart editor](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/editor/FlowApp.jsx): `src/components/editor/FlowApp.jsx`
- [Editor shell](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/editor/EditorShell.jsx): `src/components/editor/EditorShell.jsx`
- [Chart persistence](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useChartPersistence.ts): `src/hooks/useChartPersistence.ts`
- [Backup and restore](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/utils/chartBackup.ts): `src/utils/chartBackup.ts`

### HR operations

- [Staff directory](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/StaffDirectoryPage.tsx): `src/pages/StaffDirectoryPage.tsx`
- [Staff records](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/staffService.ts): `src/services/staffService.ts`
- [Position assignments](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/positionAssignmentService.ts): `src/services/positionAssignmentService.ts`
- [Organization structure](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/AdminOrgStructureTestPage.tsx): `src/pages/AdminOrgStructureTestPage.tsx`
- [Organization data](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useOrgStructure.ts): `src/hooks/useOrgStructure.ts`
- [Jobs and skills](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/JobArchitecturePage.tsx): `src/pages/JobArchitecturePage.tsx`
- [Job architecture services](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/jobArchitectureService.ts): `src/services/jobArchitectureService.ts`
- [Skill catalog service](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/services/skillService.ts): `src/services/skillService.ts`
- [HR dashboard](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/pages/AdminDashboardPage.tsx): `src/pages/AdminDashboardPage.tsx`
- [Department coverage](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/components/admin/dashboard/DepartmentCoveragePanel.tsx): `src/components/admin/dashboard/DepartmentCoveragePanel.tsx`
- [Coverage calculation](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/hooks/useDepartmentCoverage.ts): `src/hooks/useDepartmentCoverage.ts`

### Services and data

- [Supabase](https://github.com/sethtra/gdt-organiztional-chart/blob/main/src/supabaseClient.ts): `src/supabaseClient.ts`

### Other components

- **Chart users**
- **HR administrators**

## Connections

- Chart users → Routes and guards: opens app (evidence: `README.md`)
- HR administrators → Routes and guards: opens app (evidence: `README.md`)
- Routes and guards → Authentication: provides session (evidence: `src/App.jsx`)
- Routes and guards → Chart dashboard: routes to (evidence: `src/App.jsx`)
- Routes and guards → Editor shell: mounts editor (evidence: `src/App.jsx`)
- Routes and guards → Organization structure: guards route (evidence: `src/App.jsx`)
- Routes and guards → Jobs and skills: guards route (evidence: `src/App.jsx`)
- Editor shell → Chart editor: renders (evidence: `src/components/editor/EditorShell.jsx`)
- Chart users → Chart dashboard: manages charts (evidence: `README.md`)
- Chart dashboard → Chart editor: opens chart (evidence: `README.md`)
- Chart editor → Chart persistence: saves edits (evidence: `README.md`)
- Chart editor → Backup and restore: backs up or restores (evidence: `README.md`)
- HR administrators → Staff directory: maintains staff (evidence: `README.md`)
- Staff directory → Staff records: manages records
- Organization structure → Organization data: loads structure
- HR administrators → Organization structure: maintains hierarchy (evidence: `README.md`)
- HR administrators → Jobs and skills: maintains catalog (evidence: `README.md`)
- Jobs and skills → Job architecture services: saves job titles (evidence: `src/pages/JobArchitecturePage.tsx`)
- Jobs and skills → Skill catalog service: saves skills (evidence: `src/pages/JobArchitecturePage.tsx`)
- HR administrators → HR dashboard: views workforce (evidence: `README.md`)
- HR dashboard → Department coverage: renders panel (evidence: `src/pages/AdminDashboardPage.tsx`)
- Department coverage → Coverage calculation: displays results (evidence: `src/components/admin/dashboard/DepartmentCoveragePanel.tsx`)
- Coverage calculation → Staff records: loads staff (evidence: `src/hooks/useDepartmentCoverage.ts`)
- Authentication → Supabase: authenticates (evidence: `src/hooks/useAuth.js`)
- Chart persistence → Supabase: persists charts (evidence: `src/hooks/useChartPersistence.ts`)
- Staff records → Supabase: calls RPCs (evidence: `src/services/staffService.ts`)
- Organization data → Supabase: loads organization (evidence: `src/hooks/useOrgStructure.ts`)
- Job architecture services → Supabase: calls RPCs (evidence: `src/services/jobArchitectureService.ts`)
- Skill catalog service → Supabase: calls RPCs
- Position assignments → Supabase: assigns positions (evidence: `src/services/positionAssignmentService.ts`)
- Chart users → Chart editor: views shared charts (evidence: `README.md`)
