# ankit0514/real_estate-web3 architecture

> Architecture diagram of the GitHub repository ankit0514/real_estate-web3, 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/ankit0514/real_estate-web3
- Repository: https://github.com/ankit0514/real_estate-web3

## Overview

This is a real-estate dApp: users browse property listings and maps, inspect property details, and access marketplace, dashboard, and wallet views. The backend exposes property, marketplace, escrow, rent, document, and wallet APIs; sampled controllers read blockchain state and format results. The README describes only a minimal Hardhat setup, so the application architecture is drawn from the tree and sampled source. Several feature controllers and frontend data wiring were not sampled; their internal behavior and connections are therefore left unspecified.

Main entry points: [`frontend/src/App.jsx`](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/App.jsx) (Web app), [`backend/server.cjs`](https://github.com/ankit0514/real_estate-web3/blob/main/backend/server.cjs) (Express server), [`backend/utils/blockchain.cjs`](https://github.com/ankit0514/real_estate-web3/blob/main/backend/utils/blockchain.cjs) (Blockchain access), [`backend/controllers/property.controller.cjs`](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/property.controller.cjs) (Property service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["Web app<br/>[App.jsx]"]
  node_propertyviews["Property views<br/>[Properties.jsx]"]
  node_detailview["Property detail<br/>[PropertyDetail.jsx]"]
  node_marketview["Marketplace view<br/>[Marketplace.jsx]"]
  node_mapview["India map<br/>[IndiaMap.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_walletstate["Wallet context<br/>[WalletContext.jsx]"]
  node_httpclient["API client<br/>[api.js]"]
end

subgraph group_api["API routing"]
  node_server["Express server<br/>[server.cjs]"]
  node_propertyroutes["Property routes"]
  node_marketroutes["Marketplace routes"]
  node_escrowroutes["Escrow routes<br/>[escrow.routes.cjs]"]
  node_rentroutes["Rent routes<br/>[rent.routes.cjs]"]
  node_docroutes["Document routes"]
  node_walletroutes["Wallet routes<br/>[wallet.routes.cjs]"]
end

subgraph group_property["Property services"]
  node_propertysvc["Property service"]
  node_marketsvc["Marketplace service"]
  node_chainutil["Blockchain access<br/>[blockchain.cjs]"]
end

subgraph group_transactions["Transactions and tenancy"]
  node_escrowsvc["Escrow service"]
  node_rentsvc["Rent service"]
end

subgraph group_walletdocs["Wallet and documents"]
  node_docsvc["Document service"]
  node_walletsvc["Wallet service"]
end

node_visitor(("User"))
node_httpcaller(("HTTP client"))
node_chain[("Blockchain")]
node_metadata(("Metadata gateway"))

node_visitor -->|"uses"| node_webapp
node_webapp -->|"routes"| node_propertyviews
node_webapp -->|"routes"| node_detailview
node_webapp -->|"routes"| node_marketview
node_webapp -->|"routes"| node_mapview
node_webapp -->|"routes"| node_dashboard
node_webapp -->|"provides"| node_walletstate
node_httpcaller -->|"requests"| node_server
node_server -->|"mounts"| node_propertyroutes
node_server -->|"mounts"| node_marketroutes
node_server -->|"mounts"| node_escrowroutes
node_server -->|"mounts"| node_rentroutes
node_server -->|"mounts"| node_docroutes
node_server -->|"mounts"| node_walletroutes
node_propertyroutes -->|"dispatches"| node_propertysvc
node_marketroutes -->|"dispatches"| node_marketsvc
node_escrowroutes -->|"dispatches"| node_escrowsvc
node_rentroutes -->|"dispatches"| node_rentsvc
node_docroutes -->|"dispatches"| node_docsvc
node_walletroutes -->|"dispatches"| node_walletsvc
node_propertysvc -->|"reads"| node_chainutil
node_marketsvc -->|"reads"| node_chainutil
node_rentsvc -->|"reads"| node_chainutil
node_walletsvc -->|"reads"| node_chainutil
node_chainutil -->|"queries"| node_chain
node_propertysvc -.->|"fetches metadata"| node_metadata
node_marketsvc -.->|"fetches metadata"| node_metadata

click node_webapp "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/App.jsx"
click node_propertyviews "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/Properties.jsx"
click node_detailview "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/PropertyDetail.jsx"
click node_marketview "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/Marketplace.jsx"
click node_mapview "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/IndiaMap.jsx"
click node_dashboard "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/Dashboard.jsx"
click node_walletstate "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/context/WalletContext.jsx"
click node_httpclient "https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/utils/api.js"
click node_server "https://github.com/ankit0514/real_estate-web3/blob/main/backend/server.cjs"
click node_propertyroutes "https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/property.routes.cjs"
click node_marketroutes "https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/marketplace.routes.cjs"
click node_escrowroutes "https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/escrow.routes.cjs"
click node_rentroutes "https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/rent.routes.cjs"
click node_docroutes "https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/document.routes.cjs"
click node_walletroutes "https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/wallet.routes.cjs"
click node_propertysvc "https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/property.controller.cjs"
click node_marketsvc "https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/marketplace.controller.cjs"
click node_escrowsvc "https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/escrow.controller.cjs"
click node_rentsvc "https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/rent.controller.cjs"
click node_docsvc "https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/document.controller.cjs"
click node_walletsvc "https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/wallet.controller.cjs"
click node_chainutil "https://github.com/ankit0514/real_estate-web3/blob/main/backend/utils/blockchain.cjs"

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_webapp,node_propertyviews,node_detailview,node_marketview,node_mapview,node_dashboard,node_walletstate,node_httpclient,node_visitor,node_httpcaller toneBlue
class node_server,node_propertyroutes,node_marketroutes,node_escrowroutes,node_rentroutes,node_docroutes,node_walletroutes,node_chain toneAmber
class node_propertysvc,node_marketsvc,node_chainutil toneMint
class node_escrowsvc,node_rentsvc toneRose
class node_docsvc,node_walletsvc,node_metadata toneIndigo
```

## Components

### Web application

- [Web app](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Property views](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/Properties.jsx): `frontend/src/pages/Properties.jsx`
- [Property detail](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/PropertyDetail.jsx): `frontend/src/pages/PropertyDetail.jsx`
- [Marketplace view](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/Marketplace.jsx): `frontend/src/pages/Marketplace.jsx`
- [India map](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/IndiaMap.jsx): `frontend/src/pages/IndiaMap.jsx`
- [Dashboard](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Wallet context](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/context/WalletContext.jsx): `frontend/src/context/WalletContext.jsx`
- [API client](https://github.com/ankit0514/real_estate-web3/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`

### API routing

- [Express server](https://github.com/ankit0514/real_estate-web3/blob/main/backend/server.cjs): `backend/server.cjs`
- [Property routes](https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/property.routes.cjs): `backend/routes/property.routes.cjs`
- [Marketplace routes](https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/marketplace.routes.cjs): `backend/routes/marketplace.routes.cjs`
- [Escrow routes](https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/escrow.routes.cjs): `backend/routes/escrow.routes.cjs`
- [Rent routes](https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/rent.routes.cjs): `backend/routes/rent.routes.cjs`
- [Document routes](https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/document.routes.cjs): `backend/routes/document.routes.cjs`
- [Wallet routes](https://github.com/ankit0514/real_estate-web3/blob/main/backend/routes/wallet.routes.cjs): `backend/routes/wallet.routes.cjs`

### Property services

- [Property service](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/property.controller.cjs): `backend/controllers/property.controller.cjs`
- [Marketplace service](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/marketplace.controller.cjs): `backend/controllers/marketplace.controller.cjs`
- [Blockchain access](https://github.com/ankit0514/real_estate-web3/blob/main/backend/utils/blockchain.cjs): `backend/utils/blockchain.cjs`

### Transactions and tenancy

- [Escrow service](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/escrow.controller.cjs): `backend/controllers/escrow.controller.cjs`
- [Rent service](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/rent.controller.cjs): `backend/controllers/rent.controller.cjs`

### Wallet and documents

- [Document service](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/document.controller.cjs): `backend/controllers/document.controller.cjs`
- [Wallet service](https://github.com/ankit0514/real_estate-web3/blob/main/backend/controllers/wallet.controller.cjs): `backend/controllers/wallet.controller.cjs`

### Other components

- **User**
- **HTTP client**
- **Blockchain**
- **Metadata gateway**

## Connections

- User → Web app: uses
- Web app → Property views: routes
- Web app → Property detail: routes
- Web app → Marketplace view: routes
- Web app → India map: routes
- Web app → Dashboard: routes
- Web app → Wallet context: provides
- HTTP client → Express server: requests
- Express server → Property routes: mounts
- Express server → Marketplace routes: mounts
- Express server → Escrow routes: mounts
- Express server → Rent routes: mounts
- Express server → Document routes: mounts
- Express server → Wallet routes: mounts
- Property routes → Property service: dispatches
- Marketplace routes → Marketplace service: dispatches
- Escrow routes → Escrow service: dispatches
- Rent routes → Rent service: dispatches
- Document routes → Document service: dispatches
- Wallet routes → Wallet service: dispatches
- Property service → Blockchain access: reads
- Marketplace service → Blockchain access: reads
- Rent service → Blockchain access: reads
- Wallet service → Blockchain access: reads
- Blockchain access → Blockchain: queries
- Property service → Metadata gateway: fetches metadata
- Marketplace service → Metadata gateway: fetches metadata
