# skwatsonoff/vimo-ranch-management architecture

> Architecture diagram of the GitHub repository skwatsonoff/vimo-ranch-management, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/skwatsonoff/vimo-ranch-management
- Repository: https://github.com/skwatsonoff/vimo-ranch-management

## Overview

VIMO is an offline-first ranch and vendor management app, with social features and optional Firebase sharing. The principal workflow is choosing a workspace, recording ranch or vendor activity, and retaining records locally before optional sharing or export. The README documents the product stages and capabilities; the sampled source does not include the Flutter runtime modules, so implementation-level call relationships are not verifiable here.

Main entry points: [`lib/device_workspaces.dart`](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/device_workspaces.dart) (Workspaces), [`lib/business.dart`](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart) (Ranch Records), [`lib/vendor_ride.dart`](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_ride.dart) (Milk Delivery Ride), [`lib/main.dart`](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/main.dart) (App Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Workspaces"]
  node_app_entry["App Entry<br/>[main.dart]"]
  node_workspace["Workspaces"]
  node_interface["Workspace Interface<br/>[interface.dart]"]
end

subgraph group_ranch["Ranch Operations"]
  node_ranch_ops["Ranch Records<br/>[business.dart]"]
  node_animal_roles["Animal Roles<br/>[animal_roles.dart]"]
  node_inventory["Ranch Inventory"]
  node_reports["Ranch Reports<br/>[business.dart]"]
end

subgraph group_vendor["Vendor Operations"]
  node_vendor_ride["Milk Delivery Ride<br/>[vendor_ride.dart]"]
  node_milk_shop["Milk Shop<br/>[milk_shop.dart]"]
  node_vendor_stock["Vendor Stock"]
  node_vendor_routes["Delivery Orders<br/>[vendor_routes.dart]"]
end

subgraph group_community["Community and Sharing"]
  node_social_feed["Social Feed<br/>[social_feed.dart]"]
  node_social_profile["Social Profiles"]
  node_community["Ranch Membership<br/>[community.dart]"]
  node_sharing["Member Sync<br/>[sync_support.dart]"]
end

subgraph group_data["Storage and Account"]
  node_account["Accounts<br/>[account.dart]"]
  node_local_store[("On-device Store<br/>[business.dart]")]
  node_backup["Backup and Export<br/>[share.dart]"]
end

node_user(("Ranch User"))
node_firebase[("Firebase Services")]

node_user -->|"uses"| node_app_entry
node_app_entry -.->|"opens"| node_workspace
node_workspace -->|"selects tabs"| node_interface
node_workspace -->|"opens Ranch"| node_ranch_ops
node_workspace -->|"opens Vendor"| node_vendor_ride
node_ranch_ops -->|"manages animals"| node_animal_roles
node_ranch_ops -->|"tracks stock"| node_inventory
node_ranch_ops -->|"reports activity"| node_reports
node_vendor_ride -->|"records deliveries"| node_milk_shop
node_vendor_ride -->|"deducts deliveries"| node_vendor_stock
node_vendor_ride -->|"uses delivery order"| node_vendor_routes
node_workspace -->|"opens Social"| node_social_feed
node_social_feed -->|"uses usernames"| node_social_profile
node_community -->|"approves members"| node_sharing
node_sharing -->|"relays records"| node_firebase
node_account -->|"scopes records"| node_local_store
node_ranch_ops -->|"saves locally"| node_local_store
node_vendor_ride -->|"saves locally"| node_local_store
node_local_store -->|"exports records"| node_backup

click node_app_entry "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/main.dart"
click node_workspace "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/device_workspaces.dart"
click node_interface "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/interface.dart"
click node_ranch_ops "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart"
click node_animal_roles "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/animal_roles.dart"
click node_inventory "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/ranch_inventory.dart"
click node_reports "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart"
click node_vendor_ride "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_ride.dart"
click node_milk_shop "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/milk_shop.dart"
click node_vendor_stock "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_stock_separation.dart"
click node_vendor_routes "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_routes.dart"
click node_social_feed "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/social_feed.dart"
click node_social_profile "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/social_profile.dart"
click node_community "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/community.dart"
click node_sharing "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/sync_support.dart"
click node_account "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/account.dart"
click node_local_store "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart"
click node_backup "https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/share.dart"

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_entry,node_workspace,node_interface,node_user toneBlue
class node_ranch_ops,node_animal_roles,node_inventory,node_reports,node_firebase toneAmber
class node_vendor_ride,node_milk_shop,node_vendor_stock,node_vendor_routes toneMint
class node_social_feed,node_social_profile,node_community,node_sharing toneRose
class node_account,node_local_store,node_backup toneIndigo
```

## Components

### App and Workspaces

- [App Entry](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/main.dart): `lib/main.dart`
- [Workspaces](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/device_workspaces.dart): `lib/device_workspaces.dart`
- [Workspace Interface](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/interface.dart): `lib/interface.dart`

### Ranch Operations

- [Ranch Records](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart): `lib/business.dart`
- [Animal Roles](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/animal_roles.dart): `lib/animal_roles.dart`
- [Ranch Inventory](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/ranch_inventory.dart): `lib/ranch_inventory.dart`
- [Ranch Reports](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart): `lib/business.dart`

### Vendor Operations

- [Milk Delivery Ride](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_ride.dart): `lib/vendor_ride.dart`
- [Milk Shop](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/milk_shop.dart): `lib/milk_shop.dart`
- [Vendor Stock](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_stock_separation.dart): `lib/vendor_stock_separation.dart`
- [Delivery Orders](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/vendor_routes.dart): `lib/vendor_routes.dart`

### Community and Sharing

- [Social Feed](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/social_feed.dart): `lib/social_feed.dart`
- [Social Profiles](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/social_profile.dart): `lib/social_profile.dart`
- [Ranch Membership](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/community.dart): `lib/community.dart`
- [Member Sync](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/sync_support.dart): `lib/sync_support.dart`

### Storage and Account

- [Accounts](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/account.dart): `lib/account.dart`
- [On-device Store](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/business.dart): `lib/business.dart`
- [Backup and Export](https://github.com/skwatsonoff/vimo-ranch-management/blob/main/lib/share.dart): `lib/share.dart`

### Other components

- **Ranch User**
- **Firebase Services**

## Connections

- Ranch User → App Entry: uses (evidence: `README.md`)
- App Entry → Workspaces: opens
- Workspaces → Workspace Interface: selects tabs (evidence: `README.md`)
- Workspaces → Ranch Records: opens Ranch (evidence: `README.md`)
- Workspaces → Milk Delivery Ride: opens Vendor (evidence: `README.md`)
- Ranch Records → Animal Roles: manages animals (evidence: `README.md`)
- Ranch Records → Ranch Inventory: tracks stock (evidence: `README.md`)
- Ranch Records → Ranch Reports: reports activity (evidence: `README.md`)
- Milk Delivery Ride → Milk Shop: records deliveries (evidence: `README.md`)
- Milk Delivery Ride → Vendor Stock: deducts deliveries (evidence: `README.md`)
- Milk Delivery Ride → Delivery Orders: uses delivery order (evidence: `README.md`)
- Workspaces → Social Feed: opens Social (evidence: `README.md`)
- Social Feed → Social Profiles: uses usernames (evidence: `README.md`)
- Ranch Membership → Member Sync: approves members (evidence: `README.md`)
- Member Sync → Firebase Services: relays records (evidence: `README.md`)
- Accounts → On-device Store: scopes records (evidence: `README.md`)
- Ranch Records → On-device Store: saves locally (evidence: `README.md`)
- Milk Delivery Ride → On-device Store: saves locally (evidence: `README.md`)
- On-device Store → Backup and Export: exports records (evidence: `README.md`)
