# sasidhar-51/bhoomi architecture

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

- Interactive diagram: https://gitdiagram.com/sasidhar-51/bhoomi
- Repository: https://github.com/sasidhar-51/bhoomi

## Overview

BHOOMI is described as an agricultural marketplace backend. Its visible runtime entry point configures an Express API, mounts domain routes, and attaches Socket.IO; the listed route and socket implementations are absent from the supplied tree, so their internal workflows and links to persistence cannot be verified. The database module provides JSON-file storage, and the seed script creates demo users and listings. The graph shows only relationships evidenced by the supplied source; it does not infer connections between routes and storage.

Main entry points: [`index.js`](https://github.com/sasidhar-51/bhoomi/blob/main/index.js) (HTTP server), [`seed.js`](https://github.com/sasidhar-51/bhoomi/blob/main/seed.js) (Demo seeding), [`db.js`](https://github.com/sasidhar-51/bhoomi/blob/main/db.js) (JSON store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and realtime"]
  node_server["HTTP server<br/>[index.js]"]
  node_domain_routes["Domain API mounts<br/>[index.js]"]
  node_socket_attach["Socket attachment<br/>[index.js]"]
end

subgraph group_storage["Persistence"]
  node_json_store[("JSON store<br/>[db.js]")]
end

subgraph group_setup["Demo setup"]
  node_demo_seed["Demo seeding<br/>[seed.js]"]
  node_grading_agent["Produce grading"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_server
node_server -->|"mounts routes"| node_domain_routes
node_server -->|"attaches sockets"| node_socket_attach
node_demo_seed -->|"writes records"| node_json_store
node_demo_seed -->|"grades produce"| node_grading_agent

click node_server "https://github.com/sasidhar-51/bhoomi/blob/main/index.js"
click node_domain_routes "https://github.com/sasidhar-51/bhoomi/blob/main/index.js"
click node_socket_attach "https://github.com/sasidhar-51/bhoomi/blob/main/index.js"
click node_json_store "https://github.com/sasidhar-51/bhoomi/blob/main/db.js"
click node_demo_seed "https://github.com/sasidhar-51/bhoomi/blob/main/seed.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_server,node_domain_routes,node_socket_attach,node_client toneBlue
class node_json_store toneAmber
class node_demo_seed,node_grading_agent toneMint
```

## Components

### API and realtime

- [HTTP server](https://github.com/sasidhar-51/bhoomi/blob/main/index.js): `index.js`
- [Domain API mounts](https://github.com/sasidhar-51/bhoomi/blob/main/index.js): `index.js`
- [Socket attachment](https://github.com/sasidhar-51/bhoomi/blob/main/index.js): `index.js`

### Persistence

- [JSON store](https://github.com/sasidhar-51/bhoomi/blob/main/db.js): `db.js`

### Demo setup

- [Demo seeding](https://github.com/sasidhar-51/bhoomi/blob/main/seed.js): `seed.js`
- **Produce grading**

### Other components

- **API client**

## Connections

- API client → HTTP server: sends requests (evidence: `index.js`)
- HTTP server → Domain API mounts: mounts routes (evidence: `index.js`)
- HTTP server → Socket attachment: attaches sockets (evidence: `index.js`)
- Demo seeding → JSON store: writes records (evidence: `seed.js`)
- Demo seeding → Produce grading: grades produce (evidence: `seed.js`)
