# katragadda-bharath/exacker architecture

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

- Interactive diagram: https://gitdiagram.com/katragadda-bharath/exacker
- Repository: https://github.com/katragadda-bharath/exacker

## Overview

Exacker is a farm-management API backed by SQL Server, with a browser-facing entry point and endpoints for groups, lands, workers, expenses, and payments, plus custom-query execution. The evidenced request flow is HTTP routing through controllers and services to repositories and SQL Server; sampled code confirms the query and payment data paths. Other entity modules appear in the tree, but their internal calls were not sampled, so those links are omitted.

Main entry points: [`Documents/Database`](https://github.com/katragadda-bharath/exacker/tree/main/Documents/Database) (SQL Server), [`backend/src/config/database.js`](https://github.com/katragadda-bharath/exacker/blob/main/backend/src/config/database.js) (DB connection), [`backend/src/server.js`](https://github.com/katragadda-bharath/exacker/blob/main/backend/src/server.js) (Express server), [`backend/src/services`](https://github.com/katragadda-bharath/exacker/tree/main/backend/src/services) (Services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_web["Web page<br/>[index.html]"]
  node_server["Express server<br/>[server.js]"]
end

subgraph group_api["API layers"]
  node_routes["API routes"]
  node_controllers["Controllers"]
  node_services["Services"]
  node_queryrepo["Query repository"]
  node_paymentrepo["Payment repository"]
  node_farmrepos["Farm repositories"]
end

subgraph group_data["Farm data"]
  node_groups[("Groups")]
  node_lands[("Lands")]
  node_workers[("Workers")]
  node_expenses[("Expenses")]
  node_payments[("Payments")]
end

subgraph group_infra["Persistence"]
  node_dbconfig["DB connection<br/>[database.js]"]
  node_sqlserver[("SQL Server")]
end

node_user(("Farm user"))

node_user -->|"uses"| node_web
node_user -->|"sends requests"| node_server
node_server -->|"dispatches"| node_routes
node_server -->|"checks connection"| node_dbconfig
node_routes -->|"dispatches"| node_controllers
node_controllers -->|"calls"| node_services
node_services -->|"calls"| node_queryrepo
node_queryrepo -->|"gets pool"| node_dbconfig
node_queryrepo -->|"executes query"| node_sqlserver
node_services -->|"calls"| node_paymentrepo
node_paymentrepo -->|"gets pool"| node_dbconfig
node_paymentrepo -->|"executes procedures"| node_sqlserver
node_dbconfig -->|"connects"| node_sqlserver
node_sqlserver -->|"stores"| node_groups
node_sqlserver -->|"stores"| node_lands
node_sqlserver -->|"stores"| node_workers
node_sqlserver -->|"stores"| node_expenses
node_sqlserver -->|"stores"| node_payments

click node_web "https://github.com/katragadda-bharath/exacker/blob/main/frontend/pages/index.html"
click node_server "https://github.com/katragadda-bharath/exacker/blob/main/backend/src/server.js"
click node_routes "https://github.com/katragadda-bharath/exacker/tree/main/backend/src/routes"
click node_controllers "https://github.com/katragadda-bharath/exacker/tree/main/backend/src/controllers"
click node_services "https://github.com/katragadda-bharath/exacker/tree/main/backend/src/services"
click node_queryrepo "https://github.com/katragadda-bharath/exacker/blob/main/backend/src/repositories/query.repository.js"
click node_paymentrepo "https://github.com/katragadda-bharath/exacker/blob/main/backend/src/repositories/payment.repository.js"
click node_farmrepos "https://github.com/katragadda-bharath/exacker/tree/main/backend/src/repositories"
click node_dbconfig "https://github.com/katragadda-bharath/exacker/blob/main/backend/src/config/database.js"
click node_sqlserver "https://github.com/katragadda-bharath/exacker/tree/main/Documents/Database"
click node_groups "https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Groups.Table.sql"
click node_lands "https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Lands.Table.sql"
click node_workers "https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Workers.Table.sql"
click node_expenses "https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Expenses.Table.sql"
click node_payments "https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Payments.Table.sql"

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_web,node_server,node_user toneBlue
class node_routes,node_controllers,node_services,node_queryrepo,node_paymentrepo,node_farmrepos toneAmber
class node_groups,node_lands,node_workers,node_expenses,node_payments toneMint
class node_dbconfig,node_sqlserver toneRose
```

## Components

### Entry points

- [Web page](https://github.com/katragadda-bharath/exacker/blob/main/frontend/pages/index.html): `frontend/pages/index.html`
- [Express server](https://github.com/katragadda-bharath/exacker/blob/main/backend/src/server.js): `backend/src/server.js`

### API layers

- [API routes](https://github.com/katragadda-bharath/exacker/tree/main/backend/src/routes): `backend/src/routes`
- [Controllers](https://github.com/katragadda-bharath/exacker/tree/main/backend/src/controllers): `backend/src/controllers`
- [Services](https://github.com/katragadda-bharath/exacker/tree/main/backend/src/services): `backend/src/services`
- [Query repository](https://github.com/katragadda-bharath/exacker/blob/main/backend/src/repositories/query.repository.js): `backend/src/repositories/query.repository.js`
- [Payment repository](https://github.com/katragadda-bharath/exacker/blob/main/backend/src/repositories/payment.repository.js): `backend/src/repositories/payment.repository.js`
- [Farm repositories](https://github.com/katragadda-bharath/exacker/tree/main/backend/src/repositories): `backend/src/repositories`

### Farm data

- [Groups](https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Groups.Table.sql): `Documents/Database/dbo.Groups.Table.sql`
- [Lands](https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Lands.Table.sql): `Documents/Database/dbo.Lands.Table.sql`
- [Workers](https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Workers.Table.sql): `Documents/Database/dbo.Workers.Table.sql`
- [Expenses](https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Expenses.Table.sql): `Documents/Database/dbo.Expenses.Table.sql`
- [Payments](https://github.com/katragadda-bharath/exacker/blob/main/Documents/Database/dbo.Payments.Table.sql): `Documents/Database/dbo.Payments.Table.sql`

### Persistence

- [DB connection](https://github.com/katragadda-bharath/exacker/blob/main/backend/src/config/database.js): `backend/src/config/database.js`
- [SQL Server](https://github.com/katragadda-bharath/exacker/tree/main/Documents/Database): `Documents/Database`

### Other components

- **Farm user**

## Connections

- Farm user → Web page: uses
- Farm user → Express server: sends requests
- Express server → API routes: dispatches
- Express server → DB connection: checks connection
- API routes → Controllers: dispatches
- Controllers → Services: calls
- Services → Query repository: calls
- Query repository → DB connection: gets pool
- Query repository → SQL Server: executes query
- Services → Payment repository: calls
- Payment repository → DB connection: gets pool
- Payment repository → SQL Server: executes procedures
- DB connection → SQL Server: connects
- SQL Server → Groups: stores
- SQL Server → Lands: stores
- SQL Server → Workers: stores
- SQL Server → Expenses: stores
- SQL Server → Payments: stores
