# krishna-velamuri/vfarms architecture

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

- Interactive diagram: https://gitdiagram.com/krishna-velamuri/vfarms
- Repository: https://github.com/krishna-velamuri/vfarms

## Overview

Velamuri Farms combines a farm-information and booking-oriented website with a product shop, checkout, and administration UI, backed by a FastAPI service and MongoDB. The visible domain areas include farm storytelling, produce, stays, training, and a journal, alongside shopping and admin pages. The sampled backend confirms inquiry and blog/product operations; sampled frontend evidence confirms navigation, cart display, and bilingual context. Most page-to-API wiring is unsampled, so those relationships are not asserted.

Main entry points: [`frontend/src/components/site/Navbar.jsx`](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Navbar.jsx) (Navigation), [`frontend/src/i18n/context.jsx`](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/context.jsx) (Language Context), [`backend/server.py`](https://github.com/krishna-velamuri/vfarms/blob/main/backend/server.py) (Farm API), [`frontend/src/store/cart.jsx`](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/store/cart.jsx) (Cart State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Farm Website"]
  node_app["Application<br/>[App.js]"]
  node_home["Farm Landing<br/>[Home.jsx]"]
  node_about["Farm Story<br/>[About.jsx]"]
  node_hero["Landing Hero<br/>[Hero.jsx]"]
  node_products["Produce Showcase<br/>[Products.jsx]"]
  node_farmstay["Farm Stay<br/>[FarmStay.jsx]"]
  node_training["Training<br/>[Training.jsx]"]
  node_blog["Journal<br/>[Blog.jsx]"]
  node_farmmap["Farm Map<br/>[FarmMap.jsx]"]
  node_testimonials["Testimonials<br/>[Testimonials.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
  node_whatsapp["WhatsApp Contact<br/>[WhatsAppButton.jsx]"]
end

subgraph group_commerce["Shop and Admin"]
  node_shop["Shop<br/>[Shop.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_adminauth["Admin Sign-in<br/>[AdminAuth.jsx]"]
  node_admindashboard["Admin Dashboard<br/>[AdminDashboard.jsx]"]
end

subgraph group_platform["Localization and State"]
  node_cart["Cart State<br/>[cart.jsx]"]
  node_language["Language Toggle<br/>[LanguageToggle.jsx]"]
  node_i18n["Language Context<br/>[context.jsx]"]
  node_english["English Text<br/>[en.js]"]
  node_telugu["Telugu Text<br/>[te.js]"]
end

subgraph group_service["API and Persistence"]
  node_api["Farm API<br/>[server.py]"]
  node_mongo[("MongoDB")]
end

node_visitor(("Visitor"))

node_navbar -->|"renders"| node_language
node_navbar -->|"reads count"| node_cart
node_navbar -->|"reads translations"| node_i18n
node_i18n -->|"loads"| node_english
node_i18n -->|"loads"| node_telugu
node_api -->|"reads and writes"| node_mongo

click node_app "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/App.js"
click node_home "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/Home.jsx"
click node_about "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/About.jsx"
click node_hero "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Hero.jsx"
click node_products "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Products.jsx"
click node_farmstay "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/FarmStay.jsx"
click node_training "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Training.jsx"
click node_blog "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Blog.jsx"
click node_farmmap "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/FarmMap.jsx"
click node_testimonials "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Testimonials.jsx"
click node_navbar "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Navbar.jsx"
click node_footer "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Footer.jsx"
click node_whatsapp "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/WhatsAppButton.jsx"
click node_shop "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/Shop.jsx"
click node_checkout "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/Checkout.jsx"
click node_adminauth "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/admin/AdminAuth.jsx"
click node_admindashboard "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/admin/AdminDashboard.jsx"
click node_cart "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/store/cart.jsx"
click node_language "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/LanguageToggle.jsx"
click node_i18n "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/context.jsx"
click node_english "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/en.js"
click node_telugu "https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/te.js"
click node_api "https://github.com/krishna-velamuri/vfarms/blob/main/backend/server.py"

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_about,node_hero,node_products,node_farmstay,node_training,node_blog,node_farmmap,node_testimonials,node_navbar,node_footer,node_whatsapp toneBlue
class node_shop,node_checkout,node_adminauth,node_admindashboard toneAmber
class node_cart,node_language,node_i18n,node_english,node_telugu toneMint
class node_api,node_mongo toneRose
class node_visitor toneIndigo
```

## Components

### Farm Website

- [Application](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Farm Landing](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Farm Story](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/About.jsx): `frontend/src/components/site/About.jsx`
- [Landing Hero](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Hero.jsx): `frontend/src/components/site/Hero.jsx`
- [Produce Showcase](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Products.jsx): `frontend/src/components/site/Products.jsx`
- [Farm Stay](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/FarmStay.jsx): `frontend/src/components/site/FarmStay.jsx`
- [Training](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Training.jsx): `frontend/src/components/site/Training.jsx`
- [Journal](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Blog.jsx): `frontend/src/components/site/Blog.jsx`
- [Farm Map](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/FarmMap.jsx): `frontend/src/components/site/FarmMap.jsx`
- [Testimonials](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Testimonials.jsx): `frontend/src/components/site/Testimonials.jsx`
- [Navigation](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Navbar.jsx): `frontend/src/components/site/Navbar.jsx`
- [Footer](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/Footer.jsx): `frontend/src/components/site/Footer.jsx`
- [WhatsApp Contact](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/WhatsAppButton.jsx): `frontend/src/components/site/WhatsAppButton.jsx`

### Shop and Admin

- [Shop](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/Shop.jsx): `frontend/src/pages/Shop.jsx`
- [Checkout](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/Checkout.jsx): `frontend/src/pages/Checkout.jsx`
- [Admin Sign-in](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/admin/AdminAuth.jsx): `frontend/src/pages/admin/AdminAuth.jsx`
- [Admin Dashboard](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/pages/admin/AdminDashboard.jsx): `frontend/src/pages/admin/AdminDashboard.jsx`

### Localization and State

- [Cart State](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/store/cart.jsx): `frontend/src/store/cart.jsx`
- [Language Toggle](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/components/site/LanguageToggle.jsx): `frontend/src/components/site/LanguageToggle.jsx`
- [Language Context](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/context.jsx): `frontend/src/i18n/context.jsx`
- [English Text](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/en.js): `frontend/src/i18n/en.js`
- [Telugu Text](https://github.com/krishna-velamuri/vfarms/blob/main/frontend/src/i18n/te.js): `frontend/src/i18n/te.js`

### API and Persistence

- [Farm API](https://github.com/krishna-velamuri/vfarms/blob/main/backend/server.py): `backend/server.py`
- **MongoDB**

### Other components

- **Visitor**

## Connections

- Navigation → Language Toggle: renders (evidence: `frontend/src/components/site/Navbar.jsx`)
- Navigation → Cart State: reads count (evidence: `frontend/src/components/site/Navbar.jsx`)
- Navigation → Language Context: reads translations (evidence: `frontend/src/components/site/Navbar.jsx`)
- Language Context → English Text: loads (evidence: `frontend/src/i18n/context.jsx`)
- Language Context → Telugu Text: loads (evidence: `frontend/src/i18n/context.jsx`)
- Farm API → MongoDB: reads and writes (evidence: `backend/server.py`)
