# reyharold/feedt architecture

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

- Interactive diagram: https://gitdiagram.com/reyharold/feedt
- Repository: https://github.com/reyharold/feedt

## Overview

FeedTrack is a farm inventory and operations web application. Users sign in, then access role-permitted modules for stock, production, orders, suppliers, reporting, activity, and user administration. Production consumes recipe ingredients and adds finished goods to inventory; orders reserve finished stock and can restore it when cancelled or deleted. The sampled modules use shared layout and authentication code. The README provides little architectural detail, and source excerpts are limited, so links for unsampled modules are not inferred.

Main entry points: [`app/includes/layout.php`](https://github.com/reyharold/feedt/blob/master/app/includes/layout.php) (Page layout), [`app/index.php`](https://github.com/reyharold/feedt/blob/master/app/index.php) (Sign in), [`app/includes/auth.php`](https://github.com/reyharold/feedt/blob/master/app/includes/auth.php) (Authentication), [`app/production.php`](https://github.com/reyharold/feedt/blob/master/app/production.php) (Production)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_signin["Sign in<br/>[index.php]"]
  node_login["Login handler<br/>[login.php]"]
end

subgraph group_operations["Farm operations"]
  node_inventory["Inventory<br/>[inventory.php]"]
  node_production["Production<br/>[production.php]"]
  node_orders["Orders<br/>[orders.php]"]
  node_suppliers["Suppliers<br/>[suppliers.php]"]
end

subgraph group_management["Management"]
  node_dashboard["Dashboard<br/>[dashboard.php]"]
  node_reports["Reports<br/>[reports.php]"]
  node_activity["Activity log<br/>[activity.php]"]
  node_users["User management<br/>[users.php]"]
end

subgraph group_shared["Shared services"]
  node_auth["Authentication<br/>[auth.php]"]
  node_layout["Page layout<br/>[layout.php]"]
  node_database[("MySQL database")]
end

node_user(("Farm user"))

node_user -->|"signs in"| node_signin
node_signin -->|"checks session"| node_auth
node_signin -->|"submits credentials"| node_login
node_auth -->|"loads user"| node_database
node_signin -->|"redirects when signed in"| node_dashboard
node_dashboard -->|"renders through"| node_layout
node_inventory -->|"renders through"| node_layout
node_production -->|"renders through"| node_layout
node_orders -->|"renders through"| node_layout
node_suppliers -->|"renders through"| node_layout
node_reports -->|"renders through"| node_layout
node_activity -->|"renders through"| node_layout
node_users -->|"renders through"| node_layout
node_layout -->|"loads authentication"| node_auth
node_production -->|"reads and updates"| node_database
node_orders -->|"reads and updates"| node_database

click node_signin "https://github.com/reyharold/feedt/blob/master/app/index.php"
click node_login "https://github.com/reyharold/feedt/blob/master/app/login.php"
click node_auth "https://github.com/reyharold/feedt/blob/master/app/includes/auth.php"
click node_dashboard "https://github.com/reyharold/feedt/blob/master/app/dashboard.php"
click node_inventory "https://github.com/reyharold/feedt/blob/master/app/inventory.php"
click node_production "https://github.com/reyharold/feedt/blob/master/app/production.php"
click node_orders "https://github.com/reyharold/feedt/blob/master/app/orders.php"
click node_suppliers "https://github.com/reyharold/feedt/blob/master/app/suppliers.php"
click node_reports "https://github.com/reyharold/feedt/blob/master/app/reports.php"
click node_activity "https://github.com/reyharold/feedt/blob/master/app/activity.php"
click node_users "https://github.com/reyharold/feedt/blob/master/app/users.php"
click node_layout "https://github.com/reyharold/feedt/blob/master/app/includes/layout.php"

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_signin,node_login,node_user toneBlue
class node_inventory,node_production,node_orders,node_suppliers toneAmber
class node_dashboard,node_reports,node_activity,node_users toneMint
class node_auth,node_layout,node_database toneRose
```

## Components

### Access

- [Sign in](https://github.com/reyharold/feedt/blob/master/app/index.php): `app/index.php`
- [Login handler](https://github.com/reyharold/feedt/blob/master/app/login.php): `app/login.php`

### Farm operations

- [Inventory](https://github.com/reyharold/feedt/blob/master/app/inventory.php): `app/inventory.php`
- [Production](https://github.com/reyharold/feedt/blob/master/app/production.php): `app/production.php`
- [Orders](https://github.com/reyharold/feedt/blob/master/app/orders.php): `app/orders.php`
- [Suppliers](https://github.com/reyharold/feedt/blob/master/app/suppliers.php): `app/suppliers.php`

### Management

- [Dashboard](https://github.com/reyharold/feedt/blob/master/app/dashboard.php): `app/dashboard.php`
- [Reports](https://github.com/reyharold/feedt/blob/master/app/reports.php): `app/reports.php`
- [Activity log](https://github.com/reyharold/feedt/blob/master/app/activity.php): `app/activity.php`
- [User management](https://github.com/reyharold/feedt/blob/master/app/users.php): `app/users.php`

### Shared services

- [Authentication](https://github.com/reyharold/feedt/blob/master/app/includes/auth.php): `app/includes/auth.php`
- [Page layout](https://github.com/reyharold/feedt/blob/master/app/includes/layout.php): `app/includes/layout.php`
- **MySQL database**

### Other components

- **Farm user**

## Connections

- Farm user → Sign in: signs in
- Sign in → Authentication: checks session
- Sign in → Login handler: submits credentials
- Authentication → MySQL database: loads user
- Sign in → Dashboard: redirects when signed in
- Dashboard → Page layout: renders through
- Inventory → Page layout: renders through
- Production → Page layout: renders through
- Orders → Page layout: renders through
- Suppliers → Page layout: renders through
- Reports → Page layout: renders through
- Activity log → Page layout: renders through
- User management → Page layout: renders through
- Page layout → Authentication: loads authentication
- Production → MySQL database: reads and updates
- Orders → MySQL database: reads and updates
