# marcusgeorgievski/sprout-spot architecture

> Architecture diagram of the GitHub repository marcusgeorgievski/sprout-spot, 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/marcusgeorgievski/sprout-spot
- Repository: https://github.com/marcusgeorgievski/sprout-spot

## Overview

Sprout Spot is a local-farm marketplace frontend. Buyers browse and search nearby shops, inspect shop offerings, save shops or add products to a cart, then access cart and account views from the dashboard. The sampled code uses local sample data and client-side user state; it does not show checkout, persistence, authentication, or backend integrations. Several dashboard destinations are present in the tree but their behavior is not sampled, so their connections are limited to the dashboard navigation.

Main entry points: [`src/app/dashboard/page.js`](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/page.js) (Dashboard menu), [`src/app/marketplace/page.js`](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/page.js) (Shop search), [`src/state/state.js`](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/state/state.js) (Buyer state), [`src/app/marketplace/[shopId]/shop-page.jsx`](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/%5BshopId%5D/shop-page.jsx) (Shop detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Marketplace discovery"]
  node_home["Home page<br/>[page.js]"]
  node_market["Shop search<br/>[page.js]"]
  node_shopdata[("Shop and product data<br/>[data.js]")]
  node_storecard["Shop cards<br/>[store-card.jsx]"]
end

subgraph group_shopping["Shop and shopping"]
  node_shopdetail["Shop detail<br/>[shop-page.jsx]"]
  node_cartitem["Product item<br/>[shop-page.jsx]"]
  node_userstate["Buyer state<br/>[state.js]"]
  node_cartpage["Cart view<br/>[page.js]"]
end

subgraph group_account["Buyer dashboard"]
  node_dashboard["Dashboard menu<br/>[page.js]"]
  node_favorites["Favorite shops<br/>[page.js]"]
  node_orderhistory["Order history<br/>[page.js]"]
  node_wallet["Wallet view<br/>[page.js]"]
  node_friends["Invite friends<br/>[page.js]"]
  node_business["Business account<br/>[page.js]"]
  node_signout["Sign-out view<br/>[page.js]"]
end

subgraph group_shared["Shared frontend"]
  node_header["Site navigation<br/>[header.jsx]"]
end

node_buyer(("Local buyer"))

node_buyer -->|"opens"| node_home
node_buyer -->|"browses"| node_market
node_buyer -->|"opens"| node_dashboard
node_market -->|"filters"| node_shopdata
node_market -->|"renders"| node_storecard
node_shopdetail -->|"reads products"| node_shopdata
node_shopdetail -->|"updates favorites"| node_userstate
node_shopdetail -->|"renders"| node_cartitem
node_cartitem -->|"updates cart"| node_userstate
node_cartpage -->|"reads cart"| node_userstate
node_cartpage -->|"renders"| node_cartitem
node_favorites -->|"reads favorites"| node_userstate
node_favorites -->|"renders"| node_storecard
node_dashboard -->|"links to"| node_cartpage
node_dashboard -->|"links to"| node_favorites
node_dashboard -->|"links to"| node_orderhistory
node_dashboard -->|"links to"| node_wallet
node_dashboard -->|"links to"| node_friends
node_dashboard -->|"links to"| node_business
node_dashboard -->|"links to"| node_signout
node_header -->|"links to"| node_home
node_header -->|"links to"| node_market
node_header -->|"links to"| node_dashboard

click node_home "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/page.js"
click node_market "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/page.js"
click node_shopdata "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/state/data.js"
click node_storecard "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/components/store-card.jsx"
click node_shopdetail "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/%5BshopId%5D/shop-page.jsx"
click node_cartitem "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/%5BshopId%5D/shop-page.jsx"
click node_userstate "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/state/state.js"
click node_cartpage "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/cart/page.js"
click node_dashboard "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/page.js"
click node_favorites "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/fav/page.js"
click node_orderhistory "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/orderHist/page.js"
click node_wallet "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/wallet/page.js"
click node_friends "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/friends/page.js"
click node_business "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/bus/page.js"
click node_signout "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/signOut/page.js"
click node_header "https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/components/header.jsx"

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_home,node_market,node_shopdata,node_storecard toneBlue
class node_shopdetail,node_cartitem,node_userstate,node_cartpage toneAmber
class node_dashboard,node_favorites,node_orderhistory,node_wallet,node_friends,node_business,node_signout toneMint
class node_header toneRose
class node_buyer toneIndigo
```

## Components

### Marketplace discovery

- [Home page](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/page.js): `src/app/page.js`
- [Shop search](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/page.js): `src/app/marketplace/page.js`
- [Shop and product data](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/state/data.js): `src/state/data.js`
- [Shop cards](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/components/store-card.jsx): `src/components/store-card.jsx`

### Shop and shopping

- [Shop detail](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/%5BshopId%5D/shop-page.jsx): `src/app/marketplace/[shopId]/shop-page.jsx`
- [Product item](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/marketplace/%5BshopId%5D/shop-page.jsx): `src/app/marketplace/[shopId]/shop-page.jsx`
- [Buyer state](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/state/state.js): `src/state/state.js`
- [Cart view](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/cart/page.js): `src/app/dashboard/cart/page.js`

### Buyer dashboard

- [Dashboard menu](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/page.js): `src/app/dashboard/page.js`
- [Favorite shops](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/fav/page.js): `src/app/dashboard/fav/page.js`
- [Order history](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/orderHist/page.js): `src/app/dashboard/orderHist/page.js`
- [Wallet view](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/wallet/page.js): `src/app/dashboard/wallet/page.js`
- [Invite friends](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/friends/page.js): `src/app/dashboard/friends/page.js`
- [Business account](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/bus/page.js): `src/app/dashboard/bus/page.js`
- [Sign-out view](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/app/dashboard/signOut/page.js): `src/app/dashboard/signOut/page.js`

### Shared frontend

- [Site navigation](https://github.com/marcusgeorgievski/sprout-spot/blob/main/src/components/header.jsx): `src/components/header.jsx`

### Other components

- **Local buyer**

## Connections

- Local buyer → Home page: opens
- Local buyer → Shop search: browses
- Local buyer → Dashboard menu: opens
- Shop search → Shop and product data: filters
- Shop search → Shop cards: renders
- Shop detail → Shop and product data: reads products
- Shop detail → Buyer state: updates favorites
- Shop detail → Product item: renders
- Product item → Buyer state: updates cart
- Cart view → Buyer state: reads cart
- Cart view → Product item: renders
- Favorite shops → Buyer state: reads favorites
- Favorite shops → Shop cards: renders
- Dashboard menu → Cart view: links to
- Dashboard menu → Favorite shops: links to
- Dashboard menu → Order history: links to
- Dashboard menu → Wallet view: links to
- Dashboard menu → Invite friends: links to
- Dashboard menu → Business account: links to
- Dashboard menu → Sign-out view: links to
- Site navigation → Home page: links to
- Site navigation → Shop search: links to
- Site navigation → Dashboard menu: links to
