# motolani/tradecropng architecture

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

- Interactive diagram: https://gitdiagram.com/motolani/tradecropng
- Repository: https://github.com/motolani/tradecropng

## Overview

This is a Laravel crop marketplace: sellers publish crop listings, buyers browse and add produce to a cart, check out, and receive a recorded payment outcome; sellers can review pending orders and order history. Authentication and account registration support both user roles. The graph follows the request and domain actions visible in the excerpts and route index. Source excerpts do not establish a payment-gateway integration or the database configuration in use, so neither is represented as a connected external service.

Main entry points: [`routes/web.php`](https://github.com/motolani/tradecropng/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/CartController.php`](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/CartController.php) (Cart and checkout), [`app/Http/Controllers/CropController.php`](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/CropController.php) (Crop listings), [`app/Http/Controllers/Auth/RegisterController.php`](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/RegisterController.php) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Web request"]
  node_entry["HTTP entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_httpkernel["HTTP kernel<br/>[Kernel.php]"]
  node_routes["Web routes<br/>[web.php]"]
  node_routeprovider["Route provider"]
end

subgraph group_accounts["Accounts"]
  node_register["Registration"]
  node_login["Login"]
  node_verification["Email verification"]
  node_users["User model<br/>[User.php]"]
end

subgraph group_market["Crop marketplace"]
  node_home["Home browsing<br/>[HomeController.php]"]
  node_crops["Crop listings<br/>[CropController.php]"]
  node_cropmodel["Crop records<br/>[Crop.php]"]
  node_categories["Crop categories<br/>[CropCategory.php]"]
end

subgraph group_commerce["Cart and orders"]
  node_cartcontroller["Cart and checkout<br/>[CartController.php]"]
  node_cartmodel["Cart records<br/>[Cart.php]"]
  node_transaction["Transactions<br/>[Transaction.php]"]
  node_orders["Orders<br/>[Order.php]"]
  node_sellerorders["Seller order views"]
end

subgraph group_presentation["Views"]
  node_homeview["Marketplace pages<br/>[homepage.blade.php]"]
  node_cropview["Seller crop pages<br/>[index.blade.php]"]
  node_cartview["Cart and checkout pages<br/>[cart.blade.php]"]
  node_paymentview["Payment status page"]
  node_orderpages["Seller order pages<br/>[pending.blade.php]"]
  node_authpages["Account pages<br/>[register.blade.php]"]
end

node_visitor(("Visitor / user"))

node_visitor -->|"requests pages"| node_entry
node_entry -->|"loads app"| node_bootstrap
node_bootstrap -->|"binds kernel"| node_httpkernel
node_httpkernel -.->|"routes requests"| node_routes
node_routeprovider -->|"loads web routes"| node_routes
node_routes -->|"dispatches"| node_register
node_routes -->|"dispatches"| node_login
node_routes -->|"dispatches"| node_verification
node_routes -->|"dispatches"| node_home
node_routes -->|"dispatches"| node_crops
node_routes -->|"dispatches"| node_cartcontroller
node_routes -->|"dispatches"| node_sellerorders
node_register -->|"creates account"| node_users
node_register -.->|"renders"| node_authpages
node_home -.->|"renders"| node_homeview
node_crops -->|"reads and writes"| node_cropmodel
node_crops -->|"reads categories"| node_categories
node_crops -->|"renders"| node_cropview
node_cartcontroller -->|"reads and writes"| node_cartmodel
node_cartcontroller -->|"reads and updates"| node_cropmodel
node_cartcontroller -->|"reads buyer"| node_users
node_cartcontroller -->|"records payment result"| node_transaction
node_cartcontroller -->|"creates successful orders"| node_orders
node_cartcontroller -->|"renders cart and checkout"| node_cartview
node_cartcontroller -->|"renders status"| node_paymentview
node_sellerorders -->|"reads seller orders"| node_orders
node_sellerorders -->|"renders order pages"| node_orderpages

click node_entry "https://github.com/motolani/tradecropng/blob/master/public/index.php"
click node_bootstrap "https://github.com/motolani/tradecropng/blob/master/bootstrap/app.php"
click node_httpkernel "https://github.com/motolani/tradecropng/blob/master/app/Http/Kernel.php"
click node_routes "https://github.com/motolani/tradecropng/blob/master/routes/web.php"
click node_routeprovider "https://github.com/motolani/tradecropng/blob/master/app/Providers/RouteServiceProvider.php"
click node_register "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/RegisterController.php"
click node_login "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/LoginController.php"
click node_verification "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/VerificationController.php"
click node_users "https://github.com/motolani/tradecropng/blob/master/app/Models/User.php"
click node_home "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/HomeController.php"
click node_crops "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/CropController.php"
click node_cropmodel "https://github.com/motolani/tradecropng/blob/master/app/Models/Crop.php"
click node_categories "https://github.com/motolani/tradecropng/blob/master/app/Models/CropCategory.php"
click node_cartcontroller "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/CartController.php"
click node_cartmodel "https://github.com/motolani/tradecropng/blob/master/app/Models/Cart.php"
click node_transaction "https://github.com/motolani/tradecropng/blob/master/app/Models/Transaction.php"
click node_orders "https://github.com/motolani/tradecropng/blob/master/app/Models/Order.php"
click node_sellerorders "https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/SellersController.php"
click node_homeview "https://github.com/motolani/tradecropng/blob/master/resources/views/homepage.blade.php"
click node_cropview "https://github.com/motolani/tradecropng/blob/master/resources/views/sellers/crop/index.blade.php"
click node_cartview "https://github.com/motolani/tradecropng/blob/master/resources/views/cart.blade.php"
click node_paymentview "https://github.com/motolani/tradecropng/blob/master/resources/views/paymentStatus.blade.php"
click node_orderpages "https://github.com/motolani/tradecropng/blob/master/resources/views/sellers/orders/pending.blade.php"
click node_authpages "https://github.com/motolani/tradecropng/blob/master/resources/views/auth/register.blade.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_entry,node_bootstrap,node_httpkernel,node_routes,node_routeprovider,node_visitor toneBlue
class node_register,node_login,node_verification,node_users toneAmber
class node_home,node_crops,node_cropmodel,node_categories toneMint
class node_cartcontroller,node_cartmodel,node_transaction,node_orders,node_sellerorders toneRose
class node_homeview,node_cropview,node_cartview,node_paymentview,node_orderpages,node_authpages toneIndigo
```

## Components

### Web request

- [HTTP entry](https://github.com/motolani/tradecropng/blob/master/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/motolani/tradecropng/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [HTTP kernel](https://github.com/motolani/tradecropng/blob/master/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Web routes](https://github.com/motolani/tradecropng/blob/master/routes/web.php): `routes/web.php`
- [Route provider](https://github.com/motolani/tradecropng/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`

### Accounts

- [Registration](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/RegisterController.php): `app/Http/Controllers/Auth/RegisterController.php`
- [Login](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Email verification](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/Auth/VerificationController.php): `app/Http/Controllers/Auth/VerificationController.php`
- [User model](https://github.com/motolani/tradecropng/blob/master/app/Models/User.php): `app/Models/User.php`

### Crop marketplace

- [Home browsing](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`
- [Crop listings](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/CropController.php): `app/Http/Controllers/CropController.php`
- [Crop records](https://github.com/motolani/tradecropng/blob/master/app/Models/Crop.php): `app/Models/Crop.php`
- [Crop categories](https://github.com/motolani/tradecropng/blob/master/app/Models/CropCategory.php): `app/Models/CropCategory.php`

### Cart and orders

- [Cart and checkout](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/CartController.php): `app/Http/Controllers/CartController.php`
- [Cart records](https://github.com/motolani/tradecropng/blob/master/app/Models/Cart.php): `app/Models/Cart.php`
- [Transactions](https://github.com/motolani/tradecropng/blob/master/app/Models/Transaction.php): `app/Models/Transaction.php`
- [Orders](https://github.com/motolani/tradecropng/blob/master/app/Models/Order.php): `app/Models/Order.php`
- [Seller order views](https://github.com/motolani/tradecropng/blob/master/app/Http/Controllers/SellersController.php): `app/Http/Controllers/SellersController.php`

### Views

- [Marketplace pages](https://github.com/motolani/tradecropng/blob/master/resources/views/homepage.blade.php): `resources/views/homepage.blade.php`
- [Seller crop pages](https://github.com/motolani/tradecropng/blob/master/resources/views/sellers/crop/index.blade.php): `resources/views/sellers/crop/index.blade.php`
- [Cart and checkout pages](https://github.com/motolani/tradecropng/blob/master/resources/views/cart.blade.php): `resources/views/cart.blade.php`
- [Payment status page](https://github.com/motolani/tradecropng/blob/master/resources/views/paymentStatus.blade.php): `resources/views/paymentStatus.blade.php`
- [Seller order pages](https://github.com/motolani/tradecropng/blob/master/resources/views/sellers/orders/pending.blade.php): `resources/views/sellers/orders/pending.blade.php`
- [Account pages](https://github.com/motolani/tradecropng/blob/master/resources/views/auth/register.blade.php): `resources/views/auth/register.blade.php`

### Other components

- **Visitor / user**

## Connections

- Visitor / user → HTTP entry: requests pages (evidence: `public/index.php`)
- HTTP entry → App bootstrap: loads app (evidence: `public/index.php`)
- App bootstrap → HTTP kernel: binds kernel (evidence: `bootstrap/app.php`)
- HTTP kernel → Web routes: routes requests
- Route provider → Web routes: loads web routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Web routes → Registration: dispatches (evidence: `routes/web.php`)
- Web routes → Login: dispatches (evidence: `routes/web.php`)
- Web routes → Email verification: dispatches (evidence: `routes/web.php`)
- Web routes → Home browsing: dispatches (evidence: `routes/web.php`)
- Web routes → Crop listings: dispatches (evidence: `routes/web.php`)
- Web routes → Cart and checkout: dispatches (evidence: `routes/web.php`)
- Web routes → Seller order views: dispatches (evidence: `routes/web.php`)
- Registration → User model: creates account (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
- Registration → Account pages: renders
- Home browsing → Marketplace pages: renders
- Crop listings → Crop records: reads and writes (evidence: `app/Http/Controllers/CropController.php`)
- Crop listings → Crop categories: reads categories (evidence: `app/Http/Controllers/CropController.php`)
- Crop listings → Seller crop pages: renders (evidence: `app/Http/Controllers/CropController.php`)
- Cart and checkout → Cart records: reads and writes (evidence: `app/Http/Controllers/CartController.php`)
- Cart and checkout → Crop records: reads and updates (evidence: `app/Http/Controllers/CartController.php`)
- Cart and checkout → User model: reads buyer (evidence: `app/Http/Controllers/CartController.php`)
- Cart and checkout → Transactions: records payment result (evidence: `app/Http/Controllers/CartController.php`)
- Cart and checkout → Orders: creates successful orders (evidence: `app/Http/Controllers/CartController.php`)
- Cart and checkout → Cart and checkout pages: renders cart and checkout (evidence: `app/Http/Controllers/CartController.php`)
- Cart and checkout → Payment status page: renders status (evidence: `app/Http/Controllers/CartController.php`)
- Seller order views → Orders: reads seller orders (evidence: `app/Http/Controllers/SellersController.php`)
- Seller order views → Seller order pages: renders order pages (evidence: `app/Http/Controllers/SellersController.php`)
