# zekieeyee/farmsync architecture

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

- Interactive diagram: https://gitdiagram.com/zekieeyee/farmsync
- Repository: https://github.com/zekieeyee/farmsync

## Overview

FarmSync is a farm attendance and payroll web application. Staff and managers use its browser pages and routes for employee management, QR-based attendance, payroll, job postings and applications, reports, and farm settings. The Flask application handles requests, renders role-specific pages, and accesses Supabase for persisted data. The excerpts confirm these broad responsibilities but omit much of the route implementation, so the graph does not infer detailed interactions between domain areas.

Main entry points: [`app.py`](https://github.com/zekieeyee/farmsync/blob/main/app.py) (Flask application), [`templates`](https://github.com/zekieeyee/farmsync/tree/main/templates) (Web pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Web access"]
  node_flask_app["Flask application<br/>[app.py]"]
  node_web_pages["Web pages"]
  node_auth["Accounts and roles<br/>[app.py]"]
end

subgraph group_workforce["Workforce operations"]
  node_employees["Employee management<br/>[app.py]"]
  node_attendance["QR attendance<br/>[app.py]"]
  node_attendance_photos["Attendance photos<br/>[app.py]"]
end

subgraph group_payroll["Payroll"]
  node_payroll["Payroll generation<br/>[app.py]"]
  node_payroll_pages["Payroll pages"]
end

subgraph group_farm_admin["Farm administration"]
  node_jobs["Jobs and applications<br/>[app.py]"]
  node_reports["Reports<br/>[app.py]"]
  node_settings["Farm settings<br/>[app.py]"]
end

node_user(("Farm user"))
node_supabase[("Supabase")]

node_user -->|"sends requests"| node_flask_app
node_flask_app -->|"dispatches routes"| node_auth
node_flask_app -->|"dispatches routes"| node_employees
node_flask_app -->|"dispatches routes"| node_attendance
node_flask_app -->|"dispatches routes"| node_attendance_photos
node_flask_app -->|"dispatches routes"| node_payroll
node_flask_app -->|"dispatches routes"| node_jobs
node_flask_app -->|"dispatches routes"| node_reports
node_flask_app -->|"dispatches routes"| node_settings
node_flask_app -->|"renders"| node_web_pages
node_flask_app -->|"renders"| node_payroll_pages
node_auth -->|"queries accounts"| node_supabase
node_employees -->|"reads and writes"| node_supabase
node_attendance -->|"reads and writes"| node_supabase
node_attendance_photos -->|"queries records"| node_supabase
node_payroll -->|"reads and writes"| node_supabase
node_jobs -->|"queries applications"| node_supabase
node_reports -->|"queries data"| node_supabase
node_settings -->|"reads and writes"| node_supabase

click node_flask_app "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_web_pages "https://github.com/zekieeyee/farmsync/tree/main/templates"
click node_auth "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_employees "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_attendance "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_attendance_photos "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_payroll "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_payroll_pages "https://github.com/zekieeyee/farmsync/tree/main/templates"
click node_jobs "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_reports "https://github.com/zekieeyee/farmsync/blob/main/app.py"
click node_settings "https://github.com/zekieeyee/farmsync/blob/main/app.py"

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_flask_app,node_web_pages,node_auth,node_user toneBlue
class node_employees,node_attendance,node_attendance_photos,node_supabase toneAmber
class node_payroll,node_payroll_pages toneMint
class node_jobs,node_reports,node_settings toneRose
```

## Components

### Web access

- [Flask application](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`
- [Web pages](https://github.com/zekieeyee/farmsync/tree/main/templates): `templates`
- [Accounts and roles](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`

### Workforce operations

- [Employee management](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`
- [QR attendance](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`
- [Attendance photos](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`

### Payroll

- [Payroll generation](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`
- [Payroll pages](https://github.com/zekieeyee/farmsync/tree/main/templates): `templates`

### Farm administration

- [Jobs and applications](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`
- [Reports](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`
- [Farm settings](https://github.com/zekieeyee/farmsync/blob/main/app.py): `app.py`

### Other components

- **Farm user**
- **Supabase**

## Connections

- Farm user → Flask application: sends requests
- Flask application → Accounts and roles: dispatches routes
- Flask application → Employee management: dispatches routes
- Flask application → QR attendance: dispatches routes
- Flask application → Attendance photos: dispatches routes
- Flask application → Payroll generation: dispatches routes
- Flask application → Jobs and applications: dispatches routes
- Flask application → Reports: dispatches routes
- Flask application → Farm settings: dispatches routes
- Flask application → Web pages: renders
- Flask application → Payroll pages: renders
- Accounts and roles → Supabase: queries accounts
- Employee management → Supabase: reads and writes
- QR attendance → Supabase: reads and writes
- Attendance photos → Supabase: queries records
- Payroll generation → Supabase: reads and writes
- Jobs and applications → Supabase: queries applications
- Reports → Supabase: queries data
- Farm settings → Supabase: reads and writes
