# ilhamsetiawanz/gramedia_in_out architecture

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

- Interactive diagram: https://gitdiagram.com/ilhamsetiawanz/gramedia_in_out
- Repository: https://github.com/ilhamsetiawanz/gramedia_in_out

## Overview

Gramedia In-Out is an administrator web app for employee attendance and movement tracking. The main workflow is admin login, then managing employee records and daily shift check-ins, recording employees leaving and returning, monitoring duration and break-limit warnings, and reviewing or exporting reports. Supabase is configurable, with local/offline fallback behavior in authentication and data services. The graph follows sampled imports, calls, and README capability descriptions; unsampled implementation details are not treated as verified connections.

Main entry points: [`src/App.tsx`](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/App.tsx) (App Shell), [`src/services/dataService.ts`](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/dataService.ts) (Attendance Data Service), [`src/lib/supabase.ts`](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/lib/supabase.ts) (Supabase Client Config), [`src/context/AuthContext.tsx`](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/context/AuthContext.tsx) (Auth Context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_app_shell["App Shell<br/>[App.tsx]"]
  node_login["Admin Login<br/>[LoginPage.tsx]"]
  node_settings["Supabase Settings"]
end

subgraph group_attendance["Attendance Operations"]
  node_dashboard["Dashboard Overview"]
  node_working_list["Daily Working List"]
  node_clock_modal["Clock-In Modal<br/>[ClockInModal.tsx]"]
  node_employees["Employee Management"]
  node_employee_modal["Employee Modal<br/>[EmployeeModal.tsx]"]
  node_inout_tracker["In-Out Tracker<br/>[InOutTracker.tsx]"]
  node_time_out["Record Time Out"]
  node_time_in["Record Time In"]
  node_delete_log["Delete Log Confirmation"]
end

subgraph group_reporting["Reports"]
  node_daily_report["Daily Report View"]
  node_pdf_report["PDF Report Generator"]
  node_excel_report["Excel Report Generator"]
end

subgraph group_services["Services and Storage"]
  node_auth_context["Auth Context<br/>[AuthContext.tsx]"]
  node_data_service["Attendance Data Service<br/>[dataService.ts]"]
  node_auth_service["Authentication Service<br/>[authService.ts]"]
  node_supabase_client["Supabase Client Config<br/>[supabase.ts]"]
  node_mock_data["Offline Seed Data<br/>[mockData.ts]"]
end

node_admin(("Administrator"))
node_supabase[("Supabase")]
node_local_storage[("Browser Local Storage")]

node_admin -->|"submits credentials"| node_login
node_login -->|"requests login"| node_auth_context
node_app_shell -->|"uses auth state"| node_auth_context
node_app_shell -->|"renders"| node_dashboard
node_app_shell -->|"renders"| node_inout_tracker
node_app_shell -->|"renders"| node_employees
node_app_shell -->|"renders"| node_daily_report
node_app_shell -->|"renders"| node_time_out
node_app_shell -->|"renders"| node_time_in
node_app_shell -->|"renders"| node_settings
node_app_shell -->|"records and refreshes"| node_data_service
node_dashboard -->|"renders"| node_working_list
node_working_list -->|"uses"| node_clock_modal
node_employees -->|"uses"| node_employee_modal
node_inout_tracker -->|"uses"| node_delete_log
node_daily_report -->|"generates PDF"| node_pdf_report
node_daily_report -->|"exports monthly Excel"| node_excel_report
node_auth_context -->|"delegates authentication"| node_auth_service
node_auth_context -->|"reads session"| node_supabase_client
node_auth_service -->|"authenticates through"| node_supabase_client
node_auth_service -->|"stores admin"| node_local_storage
node_settings -->|"configures"| node_supabase_client
node_data_service -->|"uses client"| node_supabase_client
node_data_service -->|"seeds offline data"| node_mock_data
node_data_service -->|"reads and writes"| node_supabase
node_supabase_client -.->|"creates client"| node_supabase
node_data_service -->|"stores fallback data"| node_local_storage

click node_app_shell "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/App.tsx"
click node_login "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/auth/LoginPage.tsx"
click node_auth_context "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/context/AuthContext.tsx"
click node_settings "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/common/SupabaseSettingsModal.tsx"
click node_dashboard "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/dashboard/DashboardOverview.tsx"
click node_working_list "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/dashboard/TodayWorkingList.tsx"
click node_clock_modal "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/dashboard/ClockInModal.tsx"
click node_employees "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/employees/EmployeeManagement.tsx"
click node_employee_modal "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/employees/EmployeeModal.tsx"
click node_inout_tracker "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/InOutTracker.tsx"
click node_time_out "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/RecordTimeOutModal.tsx"
click node_time_in "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/RecordTimeInModal.tsx"
click node_delete_log "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/ConfirmDeleteLogModal.tsx"
click node_daily_report "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/reports/DailyReportView.tsx"
click node_pdf_report "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/pdfReportService.ts"
click node_excel_report "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/excelReportService.ts"
click node_data_service "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/dataService.ts"
click node_auth_service "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/authService.ts"
click node_supabase_client "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/lib/supabase.ts"
click node_mock_data "https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/mockData.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_shell,node_login,node_settings toneBlue
class node_dashboard,node_working_list,node_clock_modal,node_employees,node_employee_modal,node_inout_tracker,node_time_out,node_time_in,node_delete_log,node_supabase,node_local_storage toneAmber
class node_daily_report,node_pdf_report,node_excel_report toneMint
class node_auth_context,node_data_service,node_auth_service,node_supabase_client,node_mock_data toneRose
class node_admin toneIndigo
```

## Components

### Application UI

- [App Shell](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/App.tsx): `src/App.tsx`
- [Admin Login](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/auth/LoginPage.tsx): `src/components/auth/LoginPage.tsx`
- [Supabase Settings](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/common/SupabaseSettingsModal.tsx): `src/components/common/SupabaseSettingsModal.tsx`

### Attendance Operations

- [Dashboard Overview](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/dashboard/DashboardOverview.tsx): `src/components/dashboard/DashboardOverview.tsx`
- [Daily Working List](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/dashboard/TodayWorkingList.tsx): `src/components/dashboard/TodayWorkingList.tsx`
- [Clock-In Modal](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/dashboard/ClockInModal.tsx): `src/components/dashboard/ClockInModal.tsx`
- [Employee Management](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/employees/EmployeeManagement.tsx): `src/components/employees/EmployeeManagement.tsx`
- [Employee Modal](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/employees/EmployeeModal.tsx): `src/components/employees/EmployeeModal.tsx`
- [In-Out Tracker](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/InOutTracker.tsx): `src/components/inout/InOutTracker.tsx`
- [Record Time Out](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/RecordTimeOutModal.tsx): `src/components/inout/RecordTimeOutModal.tsx`
- [Record Time In](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/RecordTimeInModal.tsx): `src/components/inout/RecordTimeInModal.tsx`
- [Delete Log Confirmation](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/inout/ConfirmDeleteLogModal.tsx): `src/components/inout/ConfirmDeleteLogModal.tsx`

### Reports

- [Daily Report View](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/components/reports/DailyReportView.tsx): `src/components/reports/DailyReportView.tsx`
- [PDF Report Generator](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/pdfReportService.ts): `src/services/pdfReportService.ts`
- [Excel Report Generator](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/excelReportService.ts): `src/services/excelReportService.ts`

### Services and Storage

- [Auth Context](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Attendance Data Service](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/dataService.ts): `src/services/dataService.ts`
- [Authentication Service](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [Supabase Client Config](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Offline Seed Data](https://github.com/ilhamsetiawanz/gramedia_in_out/blob/main/src/services/mockData.ts): `src/services/mockData.ts`

### Other components

- **Administrator**
- **Supabase**
- **Browser Local Storage**

## Connections

- Administrator → Admin Login: submits credentials (evidence: `README.md`)
- Admin Login → Auth Context: requests login (evidence: `src/components/auth/LoginPage.tsx`)
- App Shell → Auth Context: uses auth state (evidence: `src/App.tsx`)
- App Shell → Dashboard Overview: renders (evidence: `src/App.tsx`)
- App Shell → In-Out Tracker: renders (evidence: `src/App.tsx`)
- App Shell → Employee Management: renders (evidence: `src/App.tsx`)
- App Shell → Daily Report View: renders (evidence: `src/App.tsx`)
- App Shell → Record Time Out: renders (evidence: `src/App.tsx`)
- App Shell → Record Time In: renders (evidence: `src/App.tsx`)
- App Shell → Supabase Settings: renders (evidence: `src/App.tsx`)
- App Shell → Attendance Data Service: records and refreshes (evidence: `src/App.tsx`)
- Dashboard Overview → Daily Working List: renders (evidence: `src/components/dashboard/DashboardOverview.tsx`)
- Daily Working List → Clock-In Modal: uses (evidence: `src/components/dashboard/TodayWorkingList.tsx`)
- Employee Management → Employee Modal: uses (evidence: `src/App.tsx`)
- In-Out Tracker → Delete Log Confirmation: uses (evidence: `src/components/inout/InOutTracker.tsx`)
- Daily Report View → PDF Report Generator: generates PDF (evidence: `src/components/reports/DailyReportView.tsx`)
- Daily Report View → Excel Report Generator: exports monthly Excel (evidence: `src/components/reports/DailyReportView.tsx`)
- Auth Context → Authentication Service: delegates authentication (evidence: `src/context/AuthContext.tsx`)
- Auth Context → Supabase Client Config: reads session (evidence: `src/context/AuthContext.tsx`)
- Authentication Service → Supabase Client Config: authenticates through (evidence: `src/services/authService.ts`)
- Authentication Service → Browser Local Storage: stores admin (evidence: `src/services/authService.ts`)
- Supabase Settings → Supabase Client Config: configures (evidence: `src/components/common/SupabaseSettingsModal.tsx`)
- Attendance Data Service → Supabase Client Config: uses client (evidence: `src/services/dataService.ts`)
- Attendance Data Service → Offline Seed Data: seeds offline data (evidence: `src/services/dataService.ts`)
- Attendance Data Service → Supabase: reads and writes (evidence: `src/services/dataService.ts`)
- Supabase Client Config → Supabase: creates client
- Attendance Data Service → Browser Local Storage: stores fallback data (evidence: `src/services/dataService.ts`)
