# razin24/go-barishal-crm architecture

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

- Interactive diagram: https://gitdiagram.com/razin24/go-barishal-crm
- Repository: https://github.com/razin24/go-barishal-crm

## Overview

Go Barishal CRM is a browser-based administrative CRM for managing ride-service operations. An administrator uses its tabbed interface; tab selection dispatches refreshes to operational views, which load or update Supabase data. The app also includes fleet mapping, promotions and advertising, reports, settings, and a hybrid marketing workspace. The README gives no capability detail, and app.js is only partially excerpted, so edges are limited to visible dispatches and integrations; the marketing-to-Sheets connection is shown as unverified.

Main entry points: [`app.js`](https://github.com/razin24/go-barishal-crm/blob/main/app.js) (CRM interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Admin interface"]
  node_crm["CRM interface<br/>[app.js]"]
end

subgraph group_operations["Ride operations"]
  node_dashboard["Dashboard<br/>[app.js]"]
  node_fleetmap["Fleet map<br/>[app.js]"]
  node_drivers["Driver management<br/>[app.js]"]
  node_rides["Ride management<br/>[app.js]"]
  node_payments["Payments<br/>[app.js]"]
  node_passengers["Passengers and reports<br/>[app.js]"]
end

subgraph group_business["Business tools"]
  node_promotions["Promotions and ads<br/>[app.js]"]
  node_settings["Service settings<br/>[app.js]"]
  node_marketing["Marketing hub<br/>[app.js]"]
end

node_admin(("Administrator"))
node_supabase[("Supabase")]
node_osrm["OSRM routing"]
node_osm["OpenStreetMap tiles"]
node_sheets["Google Sheets API"]

node_admin -->|"uses"| node_crm
node_crm -->|"refreshes"| node_dashboard
node_crm -->|"refreshes"| node_fleetmap
node_crm -->|"refreshes"| node_drivers
node_crm -->|"refreshes"| node_rides
node_crm -->|"refreshes"| node_payments
node_crm -->|"refreshes"| node_passengers
node_crm -->|"refreshes"| node_promotions
node_crm -->|"refreshes"| node_settings
node_crm -->|"dispatches"| node_marketing
node_drivers -->|"reads and writes"| node_supabase
node_fleetmap -->|"reads"| node_supabase
node_fleetmap -->|"requests routes"| node_osrm
node_fleetmap -->|"loads tiles"| node_osm
node_promotions -->|"reads and writes"| node_supabase
node_settings -->|"reads"| node_supabase
node_marketing -.->|"integrates"| node_sheets

click node_crm "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_dashboard "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_fleetmap "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_drivers "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_rides "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_payments "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_passengers "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_promotions "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_settings "https://github.com/razin24/go-barishal-crm/blob/main/app.js"
click node_marketing "https://github.com/razin24/go-barishal-crm/blob/main/app.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_crm toneBlue
class node_dashboard,node_fleetmap,node_drivers,node_rides,node_payments,node_passengers,node_supabase toneAmber
class node_promotions,node_settings,node_marketing,node_sheets toneMint
class node_admin,node_osrm,node_osm toneIndigo
```

## Components

### Admin interface

- [CRM interface](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`

### Ride operations

- [Dashboard](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Fleet map](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Driver management](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Ride management](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Payments](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Passengers and reports](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`

### Business tools

- [Promotions and ads](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Service settings](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`
- [Marketing hub](https://github.com/razin24/go-barishal-crm/blob/main/app.js): `app.js`

### Other components

- **Administrator**
- **Supabase**
- **OSRM routing**
- **OpenStreetMap tiles**
- **Google Sheets API**

## Connections

- Administrator → CRM interface: uses
- CRM interface → Dashboard: refreshes (evidence: `app.js`)
- CRM interface → Fleet map: refreshes (evidence: `app.js`)
- CRM interface → Driver management: refreshes (evidence: `app.js`)
- CRM interface → Ride management: refreshes (evidence: `app.js`)
- CRM interface → Payments: refreshes (evidence: `app.js`)
- CRM interface → Passengers and reports: refreshes (evidence: `app.js`)
- CRM interface → Promotions and ads: refreshes (evidence: `app.js`)
- CRM interface → Service settings: refreshes (evidence: `app.js`)
- CRM interface → Marketing hub: dispatches (evidence: `app.js`)
- Driver management → Supabase: reads and writes (evidence: `app.js`)
- Fleet map → Supabase: reads (evidence: `app.js`)
- Fleet map → OSRM routing: requests routes (evidence: `app.js`)
- Fleet map → OpenStreetMap tiles: loads tiles (evidence: `app.js`)
- Promotions and ads → Supabase: reads and writes (evidence: `app.js`)
- Service settings → Supabase: reads (evidence: `app.js`)
- Marketing hub → Google Sheets API: integrates
