# kapulularachel-bit/agriwomenvoice_platform architecture

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

- Interactive diagram: https://gitdiagram.com/kapulularachel-bit/agriwomenvoice_platform
- Repository: https://github.com/kapulularachel-bit/agriwomenvoice_platform

## Overview

AgriWomen Voice Platform is a web app for agricultural and financial services aimed at women farmers in Malawi. The user-facing workflow is served through the website and its API, which provides market, loan, land-registration, and produce-listing operations backed by in-memory data; AI endpoints offer agricultural advice and loan evaluation through Gemini. The package description also names weather and training resources, but their implementation was not shown. The source excerpts do not establish which pages call which API endpoints, so those links are omitted.

Main entry points: [`server.js`](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js) (Express server), [`index.html`](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/index.html) (Home page), [`landingPage.html`](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/landingPage.html) (Landing page), [`auth.html`](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/auth.html) (Authentication page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_home["Home page<br/>[index.html]"]
  node_landing["Landing page<br/>[landingPage.html]"]
  node_auth["Authentication page<br/>[auth.html]"]
  node_styles["Page styling<br/>[Landingstyles.css]"]
end

subgraph group_services["Platform services"]
  node_server["Express server<br/>[server.js]"]
  node_state[("In-memory data<br/>[server.js]")]
end

subgraph group_domain["Farmer services"]
  node_market["Market prices<br/>[server.js]"]
  node_loans["Loan applications<br/>[server.js]"]
  node_land["Land registration<br/>[server.js]"]
  node_listings["Produce listings<br/>[server.js]"]
  node_weather["Weather updates<br/>[server.js]"]
  node_training["Training resources<br/>[server.js]"]
end

subgraph group_ai["AI services"]
  node_advisor["Voice advisor<br/>[server.js]"]
  node_evaluation["Credit evaluation<br/>[server.js]"]
end

node_farmer(("Farmer or visitor"))
node_gemini["Google Gemini"]

node_farmer -->|"visits"| node_home
node_server -->|"serves root"| node_home
node_server -->|"serves static files"| node_landing
node_server -->|"serves static files"| node_auth
node_server -->|"serves static files"| node_styles
node_market -->|"reads and writes"| node_state
node_loans -->|"reads and writes"| node_state
node_land -->|"reads and writes"| node_state
node_listings -->|"reads and writes"| node_state
node_advisor -->|"requests advice"| node_gemini
node_evaluation -->|"requests evaluation"| node_gemini

click node_home "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/index.html"
click node_landing "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/landingPage.html"
click node_auth "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/auth.html"
click node_styles "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/Landingstyles.css"
click node_server "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_state "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_market "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_loans "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_land "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_listings "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_weather "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_training "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_advisor "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js"
click node_evaluation "https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.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_home,node_landing,node_auth,node_styles toneBlue
class node_server,node_state toneAmber
class node_market,node_loans,node_land,node_listings,node_weather,node_training toneMint
class node_advisor,node_evaluation toneRose
class node_farmer,node_gemini toneIndigo
```

## Components

### Web interface

- [Home page](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/index.html): `index.html`
- [Landing page](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/landingPage.html): `landingPage.html`
- [Authentication page](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/auth.html): `auth.html`
- [Page styling](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/Landingstyles.css): `Landingstyles.css`

### Platform services

- [Express server](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [In-memory data](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`

### Farmer services

- [Market prices](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [Loan applications](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [Land registration](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [Produce listings](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [Weather updates](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [Training resources](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`

### AI services

- [Voice advisor](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`
- [Credit evaluation](https://github.com/kapulularachel-bit/agriwomenvoice_platform/blob/main/server.js): `server.js`

### Other components

- **Farmer or visitor**
- **Google Gemini**

## Connections

- Farmer or visitor → Home page: visits
- Express server → Home page: serves root (evidence: `server.js`)
- Express server → Landing page: serves static files (evidence: `server.js`)
- Express server → Authentication page: serves static files (evidence: `server.js`)
- Express server → Page styling: serves static files (evidence: `server.js`)
- Market prices → In-memory data: reads and writes (evidence: `server.js`)
- Loan applications → In-memory data: reads and writes (evidence: `server.js`)
- Land registration → In-memory data: reads and writes (evidence: `server.js`)
- Produce listings → In-memory data: reads and writes (evidence: `server.js`)
- Voice advisor → Google Gemini: requests advice (evidence: `server.js`)
- Credit evaluation → Google Gemini: requests evaluation (evidence: `server.js`)
