# soumyajitd1307-hash/fasalsethu architecture

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

- Interactive diagram: https://gitdiagram.com/soumyajitd1307-hash/fasalsethu
- Repository: https://github.com/soumyajitd1307-hash/fasalsethu

## Overview

AgriBridge is a farmer–buyer agricultural marketplace. The visible product structure supports a farmer inventory and buyer-connection workflow, alongside buyer discovery, geo-radar, and net-price comparison capabilities. Sampled code confirms dashboard-to-service calls, service backend/mock fallback behavior, and the map SDK loader; unsampled page wiring is not inferred.

Main entry points: [`src/App.jsx`](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/App.jsx) (App router), [`src/services/marketplaceService.js`](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/marketplaceService.js) (Marketplace service), [`src/services/apiClient.js`](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/apiClient.js) (API client), [`src/components/FarmerDashboard.jsx`](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/FarmerDashboard.jsx) (Farmer dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Marketplace experience"]
  node_app["App router<br/>[App.jsx]"]
  node_home["Marketplace home<br/>[Home.jsx]"]
  node_seller["Farmer portal<br/>[Seller.jsx]"]
  node_buyerpage["Buyer portal<br/>[Buyer.jsx]"]
  node_logins["Login pages<br/>[LoginHub.jsx]"]
end

subgraph group_transactions["Listings and deals"]
  node_dashboard["Farmer dashboard"]
  node_radar["Nearby buyer radar"]
  node_map["Buyer map"]
  node_comparison["Price comparison"]
  node_request["Connection requests"]
  node_tracker["Connection tracking"]
end

subgraph group_services["Data and calculations"]
  node_marketplace["Marketplace service"]
  node_api["API client<br/>[apiClient.js]"]
  node_mock[("Mock marketplace data")]
  node_pricing["Net-return engine<br/>[pricingEngine.js]"]
  node_contracts["Marketplace contracts<br/>[contracts.js]"]
end

subgraph group_integrations["External integrations"]
  node_maps_hook["Maps SDK loader<br/>[useGoogleMaps.js]"]
  node_backend{{"Marketplace backend"}}
  node_googlemaps{{"Google Maps SDK"}}
end

node_farmer(("Farmer"))
node_buyer(("Buyer"))

node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_seller
node_app -->|"routes to"| node_buyerpage
node_app -->|"routes to"| node_logins
node_farmer -->|"opens marketplace"| node_app
node_buyer -->|"opens marketplace"| node_app
node_dashboard -->|"loads and updates"| node_marketplace
node_radar -->|"renders map"| node_map
node_marketplace -->|"requests backend data"| node_api
node_api -->|"sends HTTP requests"| node_backend
node_marketplace -->|"loads fallback data"| node_mock
node_marketplace -->|"uses calculations"| node_pricing
node_maps_hook -.->|"loads SDK"| node_googlemaps

click node_app "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/App.jsx"
click node_home "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/Home.jsx"
click node_seller "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/Seller.jsx"
click node_buyerpage "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/Buyer.jsx"
click node_logins "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/LoginHub.jsx"
click node_dashboard "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/FarmerDashboard.jsx"
click node_radar "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/NearbyMapInterface.jsx"
click node_map "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/GoogleMapBuyerRadar.jsx"
click node_comparison "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/PriceComparisonMatrix.jsx"
click node_request "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/ConnectionRequestModal.jsx"
click node_tracker "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/ConnectionStatusTracker.jsx"
click node_marketplace "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/marketplaceService.js"
click node_api "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/apiClient.js"
click node_mock "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/mockMarketplaceData.js"
click node_pricing "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/utils/pricingEngine.js"
click node_contracts "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/types/contracts.js"
click node_maps_hook "https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/hooks/useGoogleMaps.js"

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,node_home,node_seller,node_buyerpage,node_logins toneBlue
class node_dashboard,node_radar,node_map,node_comparison,node_request,node_tracker toneAmber
class node_marketplace,node_api,node_mock,node_pricing,node_contracts toneMint
class node_maps_hook,node_backend,node_googlemaps toneRose
class node_farmer,node_buyer toneIndigo
```

## Components

### Marketplace experience

- [App router](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/App.jsx): `src/App.jsx`
- [Marketplace home](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Farmer portal](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/Seller.jsx): `src/pages/Seller.jsx`
- [Buyer portal](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/Buyer.jsx): `src/pages/Buyer.jsx`
- [Login pages](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/pages/LoginHub.jsx): `src/pages/LoginHub.jsx`

### Listings and deals

- [Farmer dashboard](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/FarmerDashboard.jsx): `src/components/FarmerDashboard.jsx`
- [Nearby buyer radar](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/NearbyMapInterface.jsx): `src/components/NearbyMapInterface.jsx`
- [Buyer map](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/GoogleMapBuyerRadar.jsx): `src/components/GoogleMapBuyerRadar.jsx`
- [Price comparison](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/PriceComparisonMatrix.jsx): `src/components/PriceComparisonMatrix.jsx`
- [Connection requests](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/ConnectionRequestModal.jsx): `src/components/ConnectionRequestModal.jsx`
- [Connection tracking](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/components/ConnectionStatusTracker.jsx): `src/components/ConnectionStatusTracker.jsx`

### Data and calculations

- [Marketplace service](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/marketplaceService.js): `src/services/marketplaceService.js`
- [API client](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/apiClient.js): `src/services/apiClient.js`
- [Mock marketplace data](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/services/mockMarketplaceData.js): `src/services/mockMarketplaceData.js`
- [Net-return engine](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/utils/pricingEngine.js): `src/utils/pricingEngine.js`
- [Marketplace contracts](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/types/contracts.js): `src/types/contracts.js`

### External integrations

- [Maps SDK loader](https://github.com/soumyajitd1307-hash/fasalsethu/blob/main/src/hooks/useGoogleMaps.js): `src/hooks/useGoogleMaps.js`
- **Marketplace backend**
- **Google Maps SDK**

### Other components

- **Farmer**
- **Buyer**

## Connections

- App router → Marketplace home: routes to
- App router → Farmer portal: routes to
- App router → Buyer portal: routes to
- App router → Login pages: routes to
- Farmer → App router: opens marketplace
- Buyer → App router: opens marketplace
- Farmer dashboard → Marketplace service: loads and updates
- Nearby buyer radar → Buyer map: renders map
- Marketplace service → API client: requests backend data
- API client → Marketplace backend: sends HTTP requests
- Marketplace service → Mock marketplace data: loads fallback data
- Marketplace service → Net-return engine: uses calculations
- Maps SDK loader → Google Maps SDK: loads SDK
