# fionixyes/agm-360 architecture

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

- Interactive diagram: https://gitdiagram.com/fionixyes/agm-360
- Repository: https://github.com/fionixyes/agm-360

## Overview

AGM 360 is an internal account-management and operations suite for representatives, supervisors, and HR. Users enter through the authenticated workspace; the app presents representative tools or restricted administrative workflows, with operational records and communications handled through Google services. The major branches include refund and account utilities, scheduling and escalation, supervisor administration, and HR workflows. Evidence is limited to the README, source index, and supplied excerpts; unsampled feature details and some runtime connections are therefore not expanded.

Main entry points: [`src/App.tsx`](https://github.com/fionixyes/agm-360/blob/main/src/App.tsx) (Workspace App), [`src/components/AdminDashboard.tsx`](https://github.com/fionixyes/agm-360/blob/main/src/components/AdminDashboard.tsx) (Admin Dashboard), [`src/components/HRToolsDashboard.tsx`](https://github.com/fionixyes/agm-360/blob/main/src/components/HRToolsDashboard.tsx) (HR Tools), [`src/services/googleService.ts`](https://github.com/fionixyes/agm-360/blob/main/src/services/googleService.ts) (Google Services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace"]
  node_app["Workspace App<br/>[App.tsx]"]
end

subgraph group_rep_tools["Representative Tools"]
  node_rep_tools["Representative Tools<br/>[App.tsx]"]
  node_refund_calc["Refund Calculator"]
  node_billing_calc["Extension Calculator"]
  node_status["Status Checker<br/>[StatusChecker.tsx]"]
  node_phone["Phone Formatter<br/>[PhoneFormatter.tsx]"]
  node_schedule["CS Schedule<br/>[CSSchedule2026.tsx]"]
  node_escalations["CS Escalations"]
  node_recent["Calculation History"]
end

subgraph group_admin_ops["Administration"]
  node_admin["Admin Dashboard<br/>[AdminDashboard.tsx]"]
  node_approval["Approval Emails"]
  node_inbound["Inbound Saves"]
  node_roster["Roster Board<br/>[RosterBoard.tsx]"]
  node_supervisors["Supervisor Management"]
  node_announcements["Announcements"]
end

subgraph group_hr_ops["HR Operations"]
  node_hr["HR Tools"]
  node_payslip["Payslip Generator"]
  node_csat["CSAT Bonus"]
  node_qc["QC Disputes"]
  node_templates["HR Templates<br/>[hrTemplates.ts]"]
end

subgraph group_integrations["Integrations"]
  node_auth["Google Sign-In<br/>[firebaseAuth.ts]"]
  node_google["Google Services<br/>[googleService.ts]"]
end

node_user(("Workspace User"))
node_google_sheets[("Google Sheets")]
node_gmail["Gmail"]
node_recent_store[("Local History")]

node_user -->|"uses"| node_app
node_app -->|"authenticates"| node_auth
node_app -->|"loads reps"| node_google
node_app -->|"presents"| node_rep_tools
node_app -.->|"opens admin"| node_admin
node_app -->|"renders"| node_status
node_app -->|"renders"| node_phone
node_app -->|"renders"| node_announcements
node_rep_tools -.->|"offers"| node_refund_calc
node_rep_tools -.->|"offers"| node_billing_calc
node_rep_tools -.->|"offers"| node_schedule
node_rep_tools -.->|"offers"| node_escalations
node_rep_tools -.->|"shows"| node_recent
node_admin -->|"renders"| node_approval
node_admin -->|"renders"| node_hr
node_admin -->|"renders"| node_supervisors
node_admin -->|"manages"| node_inbound
node_admin -.->|"manages"| node_roster
node_admin -->|"saves"| node_announcements
node_hr -->|"renders"| node_payslip
node_hr -->|"renders"| node_csat
node_hr -->|"renders"| node_qc
node_hr -->|"uses"| node_templates
node_admin -->|"updates records"| node_google
node_hr -->|"reads and sends"| node_google
node_payslip -->|"loads and emails"| node_google
node_google -->|"reads and writes"| node_google_sheets
node_google -.->|"sends mail"| node_gmail
node_refund_calc -.->|"saves calculation"| node_recent
node_billing_calc -->|"saves calculation"| node_recent
node_recent -->|"persists locally"| node_recent_store
node_auth -->|"returns session"| node_user

click node_app "https://github.com/fionixyes/agm-360/blob/main/src/App.tsx"
click node_auth "https://github.com/fionixyes/agm-360/blob/main/src/services/firebaseAuth.ts"
click node_rep_tools "https://github.com/fionixyes/agm-360/blob/main/src/App.tsx"
click node_refund_calc "https://github.com/fionixyes/agm-360/blob/main/src/components/RefundCalculator.tsx"
click node_billing_calc "https://github.com/fionixyes/agm-360/blob/main/src/components/ExtAndDiscountCalculator.tsx"
click node_status "https://github.com/fionixyes/agm-360/blob/main/src/components/StatusChecker.tsx"
click node_phone "https://github.com/fionixyes/agm-360/blob/main/src/components/PhoneFormatter.tsx"
click node_schedule "https://github.com/fionixyes/agm-360/blob/main/src/components/CSSchedule2026.tsx"
click node_escalations "https://github.com/fionixyes/agm-360/blob/main/src/components/EscalationsForm.tsx"
click node_recent "https://github.com/fionixyes/agm-360/blob/main/src/components/RecentCalculationsDrawer.tsx"
click node_admin "https://github.com/fionixyes/agm-360/blob/main/src/components/AdminDashboard.tsx"
click node_approval "https://github.com/fionixyes/agm-360/blob/main/src/components/ApprovalEmailForm.tsx"
click node_inbound "https://github.com/fionixyes/agm-360/blob/main/src/components/InboundSavesPanel.tsx"
click node_roster "https://github.com/fionixyes/agm-360/blob/main/src/components/RosterBoard.tsx"
click node_supervisors "https://github.com/fionixyes/agm-360/blob/main/src/components/SupervisorsManagement.tsx"
click node_announcements "https://github.com/fionixyes/agm-360/blob/main/src/components/ScrollingAnnouncements.tsx"
click node_hr "https://github.com/fionixyes/agm-360/blob/main/src/components/HRToolsDashboard.tsx"
click node_payslip "https://github.com/fionixyes/agm-360/blob/main/src/components/PayslipGenerator.tsx"
click node_csat "https://github.com/fionixyes/agm-360/blob/main/src/components/CSATBonusDashboard.tsx"
click node_qc "https://github.com/fionixyes/agm-360/blob/main/src/components/QCDisputeCenter.tsx"
click node_templates "https://github.com/fionixyes/agm-360/blob/main/src/utils/hrTemplates.ts"
click node_google "https://github.com/fionixyes/agm-360/blob/main/src/services/googleService.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_user toneBlue
class node_rep_tools,node_refund_calc,node_billing_calc,node_status,node_phone,node_schedule,node_escalations,node_recent,node_google_sheets,node_recent_store toneAmber
class node_admin,node_approval,node_inbound,node_roster,node_supervisors,node_announcements toneMint
class node_hr,node_payslip,node_csat,node_qc,node_templates toneRose
class node_auth,node_google,node_gmail toneIndigo
```

## Components

### Workspace

- [Workspace App](https://github.com/fionixyes/agm-360/blob/main/src/App.tsx): `src/App.tsx`

### Representative Tools

- [Representative Tools](https://github.com/fionixyes/agm-360/blob/main/src/App.tsx): `src/App.tsx`
- [Refund Calculator](https://github.com/fionixyes/agm-360/blob/main/src/components/RefundCalculator.tsx): `src/components/RefundCalculator.tsx`
- [Extension Calculator](https://github.com/fionixyes/agm-360/blob/main/src/components/ExtAndDiscountCalculator.tsx): `src/components/ExtAndDiscountCalculator.tsx`
- [Status Checker](https://github.com/fionixyes/agm-360/blob/main/src/components/StatusChecker.tsx): `src/components/StatusChecker.tsx`
- [Phone Formatter](https://github.com/fionixyes/agm-360/blob/main/src/components/PhoneFormatter.tsx): `src/components/PhoneFormatter.tsx`
- [CS Schedule](https://github.com/fionixyes/agm-360/blob/main/src/components/CSSchedule2026.tsx): `src/components/CSSchedule2026.tsx`
- [CS Escalations](https://github.com/fionixyes/agm-360/blob/main/src/components/EscalationsForm.tsx): `src/components/EscalationsForm.tsx`
- [Calculation History](https://github.com/fionixyes/agm-360/blob/main/src/components/RecentCalculationsDrawer.tsx): `src/components/RecentCalculationsDrawer.tsx`

### Administration

- [Admin Dashboard](https://github.com/fionixyes/agm-360/blob/main/src/components/AdminDashboard.tsx): `src/components/AdminDashboard.tsx`
- [Approval Emails](https://github.com/fionixyes/agm-360/blob/main/src/components/ApprovalEmailForm.tsx): `src/components/ApprovalEmailForm.tsx`
- [Inbound Saves](https://github.com/fionixyes/agm-360/blob/main/src/components/InboundSavesPanel.tsx): `src/components/InboundSavesPanel.tsx`
- [Roster Board](https://github.com/fionixyes/agm-360/blob/main/src/components/RosterBoard.tsx): `src/components/RosterBoard.tsx`
- [Supervisor Management](https://github.com/fionixyes/agm-360/blob/main/src/components/SupervisorsManagement.tsx): `src/components/SupervisorsManagement.tsx`
- [Announcements](https://github.com/fionixyes/agm-360/blob/main/src/components/ScrollingAnnouncements.tsx): `src/components/ScrollingAnnouncements.tsx`

### HR Operations

- [HR Tools](https://github.com/fionixyes/agm-360/blob/main/src/components/HRToolsDashboard.tsx): `src/components/HRToolsDashboard.tsx`
- [Payslip Generator](https://github.com/fionixyes/agm-360/blob/main/src/components/PayslipGenerator.tsx): `src/components/PayslipGenerator.tsx`
- [CSAT Bonus](https://github.com/fionixyes/agm-360/blob/main/src/components/CSATBonusDashboard.tsx): `src/components/CSATBonusDashboard.tsx`
- [QC Disputes](https://github.com/fionixyes/agm-360/blob/main/src/components/QCDisputeCenter.tsx): `src/components/QCDisputeCenter.tsx`
- [HR Templates](https://github.com/fionixyes/agm-360/blob/main/src/utils/hrTemplates.ts): `src/utils/hrTemplates.ts`

### Integrations

- [Google Sign-In](https://github.com/fionixyes/agm-360/blob/main/src/services/firebaseAuth.ts): `src/services/firebaseAuth.ts`
- [Google Services](https://github.com/fionixyes/agm-360/blob/main/src/services/googleService.ts): `src/services/googleService.ts`

### Other components

- **Workspace User**
- **Google Sheets**
- **Gmail**
- **Local History**

## Connections

- Workspace User → Workspace App: uses (evidence: `README.md`)
- Workspace App → Google Sign-In: authenticates (evidence: `src/App.tsx`)
- Workspace App → Google Services: loads reps (evidence: `src/App.tsx`)
- Workspace App → Representative Tools: presents (evidence: `src/App.tsx`)
- Workspace App → Admin Dashboard: opens admin (evidence: `src/App.tsx`)
- Workspace App → Status Checker: renders (evidence: `src/App.tsx`)
- Workspace App → Phone Formatter: renders (evidence: `src/App.tsx`)
- Workspace App → Announcements: renders (evidence: `src/App.tsx`)
- Representative Tools → Refund Calculator: offers (evidence: `src/App.tsx`)
- Representative Tools → Extension Calculator: offers (evidence: `src/App.tsx`)
- Representative Tools → CS Schedule: offers (evidence: `src/App.tsx`)
- Representative Tools → CS Escalations: offers (evidence: `src/App.tsx`)
- Representative Tools → Calculation History: shows (evidence: `src/App.tsx`)
- Admin Dashboard → Approval Emails: renders (evidence: `src/components/AdminDashboard.tsx`)
- Admin Dashboard → HR Tools: renders (evidence: `src/components/AdminDashboard.tsx`)
- Admin Dashboard → Supervisor Management: renders (evidence: `src/components/AdminDashboard.tsx`)
- Admin Dashboard → Inbound Saves: manages (evidence: `src/components/AdminDashboard.tsx`)
- Admin Dashboard → Roster Board: manages (evidence: `src/components/AdminDashboard.tsx`)
- Admin Dashboard → Announcements: saves (evidence: `src/components/AdminDashboard.tsx`)
- HR Tools → Payslip Generator: renders (evidence: `src/components/HRToolsDashboard.tsx`)
- HR Tools → CSAT Bonus: renders (evidence: `src/components/HRToolsDashboard.tsx`)
- HR Tools → QC Disputes: renders (evidence: `src/components/HRToolsDashboard.tsx`)
- HR Tools → HR Templates: uses (evidence: `src/components/HRToolsDashboard.tsx`)
- Admin Dashboard → Google Services: updates records (evidence: `src/components/AdminDashboard.tsx`)
- HR Tools → Google Services: reads and sends (evidence: `src/components/HRToolsDashboard.tsx`)
- Payslip Generator → Google Services: loads and emails (evidence: `src/components/PayslipGenerator.tsx`)
- Google Services → Google Sheets: reads and writes (evidence: `src/services/googleService.ts`)
- Google Services → Gmail: sends mail
- Refund Calculator → Calculation History: saves calculation (evidence: `src/components/RefundCalculator.tsx`)
- Extension Calculator → Calculation History: saves calculation (evidence: `src/components/ExtAndDiscountCalculator.tsx`)
- Calculation History → Local History: persists locally (evidence: `src/components/RecentCalculationsDrawer.tsx`)
- Google Sign-In → Workspace User: returns session (evidence: `src/services/firebaseAuth.ts`)
