# pendeks/sokotani architecture

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

- Interactive diagram: https://gitdiagram.com/pendeks/sokotani
- Repository: https://github.com/pendeks/sokotani

## Overview

SokoTani is a Laravel agricultural marketplace. Buyers and farmers register or sign in, browse searchable listings and farmer profiles, then submit and negotiate bulk offers through acceptance or completion; admins verify farmer accounts. The diagram follows the shown route registration, marketplace queries and offer mutations, while preserving profile verification, notification and role-based branches documented by the README. Some controller links are visible in the route index, but unsampled implementation details are not inferred.

Main entry points: [`routes/web.php`](https://github.com/pendeks/sokotani/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/OfferController.php`](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/OfferController.php) (Offer negotiation), [`app/Models/User.php`](https://github.com/pendeks/sokotani/blob/master/app/Models/User.php) (User accounts and roles), [`app/Http/Controllers/MarketplaceController.php`](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/MarketplaceController.php) (Catalog and listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_route_provider["Route registration"]
  node_routes["Web routes<br/>[web.php]"]
end

subgraph group_market["Marketplace"]
  node_marketplace["Catalog and listings"]
  node_product_view["Catalog screens<br/>[index.blade.php]"]
  node_product[("Product records<br/>[Product.php]")]
end

subgraph group_trade["Offers and activity"]
  node_offers["Offer negotiation"]
  node_offer_views["Offer screens<br/>[index.blade.php]"]
  node_offer_model[("Offer records<br/>[Offer.php]")]
  node_notification["Offer notifications"]
  node_notification_center["Notification center"]
end

subgraph group_identity["Accounts and trust"]
  node_auth["Sign-in and registration<br/>[AuthController.php]"]
  node_farmer_profile["Farmer profiles"]
  node_profile_views["Public and edit profiles<br/>[show.blade.php]"]
  node_admin_verify["Farmer verification"]
  node_user[("User accounts and roles<br/>[User.php]")]
end

node_visitors(("Buyers, farmers, admins"))

node_visitors -->|"send requests"| node_route_provider
node_route_provider -->|"loads routes"| node_routes
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_marketplace
node_routes -->|"routes to"| node_farmer_profile
node_routes -->|"routes to"| node_admin_verify
node_routes -->|"routes to"| node_offers
node_routes -->|"routes to"| node_notification_center
node_marketplace -->|"queries and updates"| node_product
node_marketplace -->|"renders"| node_product_view
node_offers -->|"locks and updates"| node_product
node_offers -->|"creates and updates"| node_offer_model
node_offers -->|"dispatches"| node_notification
node_offers -.->|"renders"| node_offer_views
node_auth -->|"creates account"| node_user
node_farmer_profile -->|"updates profile"| node_user
node_farmer_profile -->|"renders"| node_profile_views
node_admin_verify -->|"verifies farmer"| node_user
node_notification_center -.->|"reads activity"| node_user

click node_route_provider "https://github.com/pendeks/sokotani/blob/master/app/Providers/RouteServiceProvider.php"
click node_routes "https://github.com/pendeks/sokotani/blob/master/routes/web.php"
click node_auth "https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/AuthController.php"
click node_marketplace "https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/MarketplaceController.php"
click node_product_view "https://github.com/pendeks/sokotani/blob/master/resources/views/marketplace/index.blade.php"
click node_product "https://github.com/pendeks/sokotani/blob/master/app/Models/Product.php"
click node_farmer_profile "https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/FarmerProfileController.php"
click node_profile_views "https://github.com/pendeks/sokotani/blob/master/resources/views/farmers/show.blade.php"
click node_admin_verify "https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/AdminFarmerController.php"
click node_user "https://github.com/pendeks/sokotani/blob/master/app/Models/User.php"
click node_offers "https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/OfferController.php"
click node_offer_views "https://github.com/pendeks/sokotani/blob/master/resources/views/offers/index.blade.php"
click node_offer_model "https://github.com/pendeks/sokotani/blob/master/app/Models/Offer.php"
click node_notification "https://github.com/pendeks/sokotani/blob/master/app/Notifications/OfferActivityNotification.php"
click node_notification_center "https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/NotificationController.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_route_provider,node_routes toneBlue
class node_marketplace,node_product_view,node_product toneAmber
class node_offers,node_offer_views,node_offer_model,node_notification,node_notification_center toneMint
class node_auth,node_farmer_profile,node_profile_views,node_admin_verify,node_user toneRose
class node_visitors toneIndigo
```

## Components

### Web entry

- [Route registration](https://github.com/pendeks/sokotani/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/pendeks/sokotani/blob/master/routes/web.php): `routes/web.php`

### Marketplace

- [Catalog and listings](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/MarketplaceController.php): `app/Http/Controllers/MarketplaceController.php`
- [Catalog screens](https://github.com/pendeks/sokotani/blob/master/resources/views/marketplace/index.blade.php): `resources/views/marketplace/index.blade.php`
- [Product records](https://github.com/pendeks/sokotani/blob/master/app/Models/Product.php): `app/Models/Product.php`

### Offers and activity

- [Offer negotiation](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/OfferController.php): `app/Http/Controllers/OfferController.php`
- [Offer screens](https://github.com/pendeks/sokotani/blob/master/resources/views/offers/index.blade.php): `resources/views/offers/index.blade.php`
- [Offer records](https://github.com/pendeks/sokotani/blob/master/app/Models/Offer.php): `app/Models/Offer.php`
- [Offer notifications](https://github.com/pendeks/sokotani/blob/master/app/Notifications/OfferActivityNotification.php): `app/Notifications/OfferActivityNotification.php`
- [Notification center](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/NotificationController.php): `app/Http/Controllers/NotificationController.php`

### Accounts and trust

- [Sign-in and registration](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Farmer profiles](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/FarmerProfileController.php): `app/Http/Controllers/FarmerProfileController.php`
- [Public and edit profiles](https://github.com/pendeks/sokotani/blob/master/resources/views/farmers/show.blade.php): `resources/views/farmers/show.blade.php`
- [Farmer verification](https://github.com/pendeks/sokotani/blob/master/app/Http/Controllers/AdminFarmerController.php): `app/Http/Controllers/AdminFarmerController.php`
- [User accounts and roles](https://github.com/pendeks/sokotani/blob/master/app/Models/User.php): `app/Models/User.php`

### Other components

- **Buyers, farmers, admins**

## Connections

- Buyers, farmers, admins → Route registration: send requests
- Route registration → Web routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Web routes → Sign-in and registration: routes to (evidence: `routes/web.php`)
- Web routes → Catalog and listings: routes to (evidence: `routes/web.php`)
- Web routes → Farmer profiles: routes to (evidence: `routes/web.php`)
- Web routes → Farmer verification: routes to (evidence: `routes/web.php`)
- Web routes → Offer negotiation: routes to (evidence: `routes/web.php`)
- Web routes → Notification center: routes to (evidence: `routes/web.php`)
- Catalog and listings → Product records: queries and updates (evidence: `app/Http/Controllers/MarketplaceController.php`)
- Catalog and listings → Catalog screens: renders (evidence: `app/Http/Controllers/MarketplaceController.php`)
- Offer negotiation → Product records: locks and updates (evidence: `app/Http/Controllers/OfferController.php`)
- Offer negotiation → Offer records: creates and updates (evidence: `app/Http/Controllers/OfferController.php`)
- Offer negotiation → Offer notifications: dispatches (evidence: `app/Http/Controllers/OfferController.php`)
- Offer negotiation → Offer screens: renders
- Sign-in and registration → User accounts and roles: creates account (evidence: `app/Http/Controllers/AuthController.php`)
- Farmer profiles → User accounts and roles: updates profile (evidence: `app/Http/Controllers/FarmerProfileController.php`)
- Farmer profiles → Public and edit profiles: renders (evidence: `app/Http/Controllers/FarmerProfileController.php`)
- Farmer verification → User accounts and roles: verifies farmer (evidence: `app/Http/Controllers/AdminFarmerController.php`)
- Notification center → User accounts and roles: reads activity
