# yossipoli/splitips architecture

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

- Interactive diagram: https://gitdiagram.com/yossipoli/splitips
- Repository: https://github.com/yossipoli/splitips

## Overview

Splitips is a React app for restaurant tip-based payroll: staff enter a work date, tip totals and employee shifts; the app calculates hours, minimum pay and tip allocation, then authenticated users can save the day and review payroll over a date range. The README also documents account recovery and registration. The API client shows requests to an external server, but its implementation is not present in this repository; unsampled form and history behavior is represented only where documented or indexed.

Main entry points: [`src/DAL/API.js`](https://github.com/yossipoli/splitips/blob/main/src/DAL/API.js) (HTTP API client), [`src/Components/Splitter/index.js`](https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/index.js) (Daily calculator), [`src/App.js`](https://github.com/yossipoli/splitips/blob/main/src/App.js) (Routes and shell), [`src/Components/Form/Login.js`](https://github.com/yossipoli/splitips/blob/main/src/Components/Form/Login.js) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_app["Routes and shell<br/>[App.js]"]
  node_nav["Navigation and logout<br/>[Navbar.js]"]
end

subgraph group_payroll["Shift payroll"]
  node_calculator["Daily calculator<br/>[index.js]"]
  node_shift_editor["Employee shift editor<br/>[Employee.js]"]
  node_tip_inputs["Salary inputs<br/>[Salaries.js]"]
  node_shift_controls["Add and reset<br/>[Add.js]"]
  node_save_day["Save calculated day<br/>[Save.js]"]
end

subgraph group_accounts["Account access"]
  node_login["Login<br/>[Login.js]"]
  node_register["Registration<br/>[Register.js]"]
  node_form_input["Form input<br/>[FormInput.js]"]
  node_forgot["Password recovery<br/>[ForgotPassword.js]"]
  node_reset["Password reset<br/>[ResetPassword.js]"]
end

subgraph group_history["Payroll history"]
  node_history["Period payroll report<br/>[Paycheck.js]"]
  node_history_row["Employee payroll row<br/>[Employee.js]"]
end

subgraph group_api["Server access"]
  node_api["HTTP API client<br/>[API.js]"]
end

node_operator(("Restaurant operator"))
node_server["Payroll server"]

node_operator -->|"opens app"| node_app
node_app -->|"routes to"| node_calculator
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_forgot
node_app -->|"routes to"| node_reset
node_app -->|"routes to"| node_history
node_app -->|"renders"| node_nav
node_calculator -->|"renders"| node_shift_editor
node_calculator -->|"renders"| node_tip_inputs
node_calculator -->|"renders"| node_shift_controls
node_calculator -->|"renders"| node_save_day
node_shift_editor -->|"updates shifts"| node_calculator
node_tip_inputs -->|"updates salary inputs"| node_calculator
node_shift_controls -->|"invokes controls"| node_calculator
node_calculator -->|"loads saved day"| node_api
node_save_day -->|"writes payroll"| node_api
node_login -->|"renders"| node_form_input
node_register -->|"renders"| node_form_input
node_login -->|"authenticates"| node_api
node_register -->|"registers account"| node_api
node_forgot -.->|"requests recovery"| node_api
node_reset -.->|"resets password"| node_api
node_nav -->|"checks session"| node_api
node_history -->|"loads date range"| node_api
node_history -->|"renders rows"| node_history_row
node_history_row -->|"updates tip status"| node_api
node_api -->|"sends requests"| node_server

click node_app "https://github.com/yossipoli/splitips/blob/main/src/App.js"
click node_calculator "https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/index.js"
click node_shift_editor "https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Employee/Employee.js"
click node_tip_inputs "https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Salaries/Salaries.js"
click node_shift_controls "https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Add/Add.js"
click node_save_day "https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Save/Save.js"
click node_login "https://github.com/yossipoli/splitips/blob/main/src/Components/Form/Login.js"
click node_register "https://github.com/yossipoli/splitips/blob/main/src/Components/Form/Register.js"
click node_form_input "https://github.com/yossipoli/splitips/blob/main/src/Components/Form/InnerComponents/FormInput.js"
click node_forgot "https://github.com/yossipoli/splitips/blob/main/src/Components/Form/ForgotPassword.js"
click node_reset "https://github.com/yossipoli/splitips/blob/main/src/Components/Form/ResetPassword.js"
click node_nav "https://github.com/yossipoli/splitips/blob/main/src/Components/Navbar/Navbar.js"
click node_history "https://github.com/yossipoli/splitips/blob/main/src/Components/Paycheck/Paycheck.js"
click node_history_row "https://github.com/yossipoli/splitips/blob/main/src/Components/Paycheck/PaycheckComponents/Employee.js"
click node_api "https://github.com/yossipoli/splitips/blob/main/src/DAL/API.js"

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_nav toneBlue
class node_calculator,node_shift_editor,node_tip_inputs,node_shift_controls,node_save_day toneAmber
class node_login,node_register,node_form_input,node_forgot,node_reset,node_server toneMint
class node_history,node_history_row toneRose
class node_api,node_operator toneIndigo
```

## Components

### App navigation

- [Routes and shell](https://github.com/yossipoli/splitips/blob/main/src/App.js): `src/App.js`
- [Navigation and logout](https://github.com/yossipoli/splitips/blob/main/src/Components/Navbar/Navbar.js): `src/Components/Navbar/Navbar.js`

### Shift payroll

- [Daily calculator](https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/index.js): `src/Components/Splitter/index.js`
- [Employee shift editor](https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Employee/Employee.js): `src/Components/Splitter/InnerComponents/Employee/Employee.js`
- [Salary inputs](https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Salaries/Salaries.js): `src/Components/Splitter/InnerComponents/Salaries/Salaries.js`
- [Add and reset](https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Add/Add.js): `src/Components/Splitter/InnerComponents/Add/Add.js`
- [Save calculated day](https://github.com/yossipoli/splitips/blob/main/src/Components/Splitter/InnerComponents/Save/Save.js): `src/Components/Splitter/InnerComponents/Save/Save.js`

### Account access

- [Login](https://github.com/yossipoli/splitips/blob/main/src/Components/Form/Login.js): `src/Components/Form/Login.js`
- [Registration](https://github.com/yossipoli/splitips/blob/main/src/Components/Form/Register.js): `src/Components/Form/Register.js`
- [Form input](https://github.com/yossipoli/splitips/blob/main/src/Components/Form/InnerComponents/FormInput.js): `src/Components/Form/InnerComponents/FormInput.js`
- [Password recovery](https://github.com/yossipoli/splitips/blob/main/src/Components/Form/ForgotPassword.js): `src/Components/Form/ForgotPassword.js`
- [Password reset](https://github.com/yossipoli/splitips/blob/main/src/Components/Form/ResetPassword.js): `src/Components/Form/ResetPassword.js`

### Payroll history

- [Period payroll report](https://github.com/yossipoli/splitips/blob/main/src/Components/Paycheck/Paycheck.js): `src/Components/Paycheck/Paycheck.js`
- [Employee payroll row](https://github.com/yossipoli/splitips/blob/main/src/Components/Paycheck/PaycheckComponents/Employee.js): `src/Components/Paycheck/PaycheckComponents/Employee.js`

### Server access

- [HTTP API client](https://github.com/yossipoli/splitips/blob/main/src/DAL/API.js): `src/DAL/API.js`

### Other components

- **Restaurant operator**
- **Payroll server**

## Connections

- Restaurant operator → Routes and shell: opens app
- Routes and shell → Daily calculator: routes to (evidence: `src/App.js`)
- Routes and shell → Login: routes to (evidence: `src/App.js`)
- Routes and shell → Registration: routes to (evidence: `src/App.js`)
- Routes and shell → Password recovery: routes to (evidence: `src/App.js`)
- Routes and shell → Password reset: routes to (evidence: `src/App.js`)
- Routes and shell → Period payroll report: routes to (evidence: `src/App.js`)
- Routes and shell → Navigation and logout: renders (evidence: `src/App.js`)
- Daily calculator → Employee shift editor: renders (evidence: `src/Components/Splitter/index.js`)
- Daily calculator → Salary inputs: renders (evidence: `src/Components/Splitter/index.js`)
- Daily calculator → Add and reset: renders (evidence: `src/Components/Splitter/index.js`)
- Daily calculator → Save calculated day: renders (evidence: `src/Components/Splitter/index.js`)
- Employee shift editor → Daily calculator: updates shifts (evidence: `src/Components/Splitter/index.js`)
- Salary inputs → Daily calculator: updates salary inputs (evidence: `src/Components/Splitter/index.js`)
- Add and reset → Daily calculator: invokes controls (evidence: `src/Components/Splitter/index.js`)
- Daily calculator → HTTP API client: loads saved day (evidence: `src/Components/Splitter/index.js`)
- Save calculated day → HTTP API client: writes payroll (evidence: `src/Components/Splitter/InnerComponents/Save/Save.js`)
- Login → Form input: renders (evidence: `src/Components/Form/Login.js`)
- Registration → Form input: renders (evidence: `src/Components/Form/Register.js`)
- Login → HTTP API client: authenticates (evidence: `src/Components/Form/Login.js`)
- Registration → HTTP API client: registers account (evidence: `src/Components/Form/Register.js`)
- Password recovery → HTTP API client: requests recovery
- Password reset → HTTP API client: resets password
- Navigation and logout → HTTP API client: checks session (evidence: `src/Components/Navbar/Navbar.js`)
- Period payroll report → HTTP API client: loads date range (evidence: `src/Components/Paycheck/Paycheck.js`)
- Period payroll report → Employee payroll row: renders rows (evidence: `src/Components/Paycheck/Paycheck.js`)
- Employee payroll row → HTTP API client: updates tip status (evidence: `src/Components/Paycheck/PaycheckComponents/Employee.js`)
- HTTP API client → Payroll server: sends requests (evidence: `src/DAL/API.js`)
