# thatsuperdev/es-helpers architecture

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

- Interactive diagram: https://gitdiagram.com/thatsuperdev/es-helpers
- Repository: https://github.com/thatsuperdev/es-helpers

## Overview

es-helpers is a CommonJS library of independently loadable Node.js helpers, not a single application workflow. Consumers import a subpath or access a lazily loaded helper from the package root, then use that helper for database access, file and Git operations, application utilities, password/token support, or IP geolocation. PostgreSQL also exposes query, table CRUD/upsert, and transaction behavior in one runtime module. The graph preserves the README’s capabilities; arrows are limited to documented imports, visible calls, and integrations shown in excerpts.

Main entry points: [`index.js`](https://github.com/thatsuperdev/es-helpers/blob/main/index.js) (Lazy package root), [`postgres/index.js`](https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js) (PostgreSQL client), [`file/index.js`](https://github.com/thatsuperdev/es-helpers/blob/main/file/index.js) (File utilities), [`git/index.js`](https://github.com/thatsuperdev/es-helpers/blob/main/git/index.js) (Git operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Package entry"]
  node_root["Lazy package root<br/>[index.js]"]
end

subgraph group_data["Database access"]
  node_mysql["MySQL helpers<br/>[index.js]"]
  node_mysql_db[("MySQL database")]
  node_postgres["PostgreSQL client<br/>[index.js]"]
  node_postgres_db[("PostgreSQL database")]
  node_pg_tables["Table CRUD and upsert<br/>[index.js]"]
  node_pg_tx["Transactions<br/>[index.js]"]
  node_firestore["Firestore instances<br/>[index.js]"]
  node_firestore_db[("Firestore service")]
end

subgraph group_app["Application helpers"]
  node_app_utils["Globals and transforms<br/>[index.js]"]
  node_encrypt["Password and random helpers<br/>[index.js]"]
  node_tokens["User token creation<br/>[index.js]"]
  node_location["IP geolocation clients<br/>[index.js]"]
  node_geo_services{{"Geolocation providers"}}
end

subgraph group_ops["File and Git operations"]
  node_file["File utilities<br/>[index.js]"]
  node_filesystem[("Node filesystem")]
  node_git["Git operations<br/>[index.js]"]
  node_git_remote{{"Git remote"}}
end

node_consumer(("Library consumer"))
node_jwt_service{{"JWT signing library"}}

node_consumer -->|"loads root"| node_root
node_consumer -->|"imports subpath"| node_mysql
node_consumer -->|"imports subpath"| node_postgres
node_consumer -->|"imports subpath"| node_firestore
node_consumer -->|"imports subpath"| node_app_utils
node_consumer -->|"imports subpath"| node_encrypt
node_consumer -->|"imports subpath"| node_file
node_consumer -->|"imports subpath"| node_git
node_consumer -->|"imports subpath"| node_location
node_root -->|"loads on access"| node_app_utils
node_root -->|"loads on access"| node_encrypt
node_root -->|"loads on access"| node_file
node_root -->|"loads on access"| node_firestore
node_root -->|"loads on access"| node_git
node_root -->|"loads on access"| node_location
node_root -->|"loads on access"| node_mysql
node_root -->|"loads on access"| node_postgres
node_mysql -->|"connects and queries"| node_mysql_db
node_postgres -->|"queries"| node_postgres_db
node_postgres -->|"creates table helpers"| node_pg_tables
node_postgres -->|"runs transaction callback"| node_pg_tx
node_pg_tables -->|"executes queries"| node_postgres
node_pg_tx -->|"begins and ends transaction"| node_postgres_db
node_firestore -->|"gets Firestore"| node_firestore_db
node_app_utils -->|"creates tokens"| node_tokens
node_tokens -->|"signs with"| node_jwt_service
node_location -->|"requests IP data"| node_geo_services
node_file -->|"reads and writes"| node_filesystem
node_file -->|"delegates Git actions"| node_git
node_git -->|"clones and pushes"| node_git_remote

click node_root "https://github.com/thatsuperdev/es-helpers/blob/main/index.js"
click node_mysql "https://github.com/thatsuperdev/es-helpers/blob/main/mysql/index.js"
click node_postgres "https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js"
click node_pg_tables "https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js"
click node_pg_tx "https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js"
click node_firestore "https://github.com/thatsuperdev/es-helpers/blob/main/firestore/index.js"
click node_app_utils "https://github.com/thatsuperdev/es-helpers/blob/main/app-utils/index.js"
click node_encrypt "https://github.com/thatsuperdev/es-helpers/blob/main/encrypt/index.js"
click node_tokens "https://github.com/thatsuperdev/es-helpers/blob/main/app-utils/index.js"
click node_location "https://github.com/thatsuperdev/es-helpers/blob/main/location/index.js"
click node_file "https://github.com/thatsuperdev/es-helpers/blob/main/file/index.js"
click node_git "https://github.com/thatsuperdev/es-helpers/blob/main/git/index.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_root toneBlue
class node_mysql,node_mysql_db,node_postgres,node_postgres_db,node_pg_tables,node_pg_tx,node_firestore,node_firestore_db toneAmber
class node_app_utils,node_encrypt,node_tokens,node_location,node_geo_services toneMint
class node_file,node_filesystem,node_git,node_git_remote toneRose
class node_consumer,node_jwt_service toneIndigo
```

## Components

### Package entry

- [Lazy package root](https://github.com/thatsuperdev/es-helpers/blob/main/index.js): `index.js`

### Database access

- [MySQL helpers](https://github.com/thatsuperdev/es-helpers/blob/main/mysql/index.js): `mysql/index.js`
- **MySQL database**
- [PostgreSQL client](https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js): `postgres/index.js`
- **PostgreSQL database**
- [Table CRUD and upsert](https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js): `postgres/index.js`
- [Transactions](https://github.com/thatsuperdev/es-helpers/blob/main/postgres/index.js): `postgres/index.js`
- [Firestore instances](https://github.com/thatsuperdev/es-helpers/blob/main/firestore/index.js): `firestore/index.js`
- **Firestore service**

### Application helpers

- [Globals and transforms](https://github.com/thatsuperdev/es-helpers/blob/main/app-utils/index.js): `app-utils/index.js`
- [Password and random helpers](https://github.com/thatsuperdev/es-helpers/blob/main/encrypt/index.js): `encrypt/index.js`
- [User token creation](https://github.com/thatsuperdev/es-helpers/blob/main/app-utils/index.js): `app-utils/index.js`
- [IP geolocation clients](https://github.com/thatsuperdev/es-helpers/blob/main/location/index.js): `location/index.js`
- **Geolocation providers**

### File and Git operations

- [File utilities](https://github.com/thatsuperdev/es-helpers/blob/main/file/index.js): `file/index.js`
- **Node filesystem**
- [Git operations](https://github.com/thatsuperdev/es-helpers/blob/main/git/index.js): `git/index.js`
- **Git remote**

### Other components

- **Library consumer**
- **JWT signing library**: library

## Connections

- Library consumer → Lazy package root: loads root (evidence: `README.md`)
- Library consumer → MySQL helpers: imports subpath (evidence: `README.md`)
- Library consumer → PostgreSQL client: imports subpath (evidence: `README.md`)
- Library consumer → Firestore instances: imports subpath (evidence: `README.md`)
- Library consumer → Globals and transforms: imports subpath (evidence: `README.md`)
- Library consumer → Password and random helpers: imports subpath (evidence: `README.md`)
- Library consumer → File utilities: imports subpath (evidence: `README.md`)
- Library consumer → Git operations: imports subpath (evidence: `README.md`)
- Library consumer → IP geolocation clients: imports subpath (evidence: `README.md`)
- Lazy package root → Globals and transforms: loads on access (evidence: `index.js`)
- Lazy package root → Password and random helpers: loads on access (evidence: `index.js`)
- Lazy package root → File utilities: loads on access (evidence: `index.js`)
- Lazy package root → Firestore instances: loads on access (evidence: `index.js`)
- Lazy package root → Git operations: loads on access (evidence: `index.js`)
- Lazy package root → IP geolocation clients: loads on access (evidence: `index.js`)
- Lazy package root → MySQL helpers: loads on access (evidence: `index.js`)
- Lazy package root → PostgreSQL client: loads on access (evidence: `index.js`)
- MySQL helpers → MySQL database: connects and queries (evidence: `mysql/index.js`)
- PostgreSQL client → PostgreSQL database: queries (evidence: `postgres/index.js`)
- PostgreSQL client → Table CRUD and upsert: creates table helpers (evidence: `postgres/index.js`)
- PostgreSQL client → Transactions: runs transaction callback (evidence: `postgres/index.js`)
- Table CRUD and upsert → PostgreSQL client: executes queries (evidence: `postgres/index.js`)
- Transactions → PostgreSQL database: begins and ends transaction (evidence: `postgres/index.js`)
- Firestore instances → Firestore service: gets Firestore (evidence: `firestore/index.js`)
- Globals and transforms → User token creation: creates tokens (evidence: `app-utils/index.js`)
- User token creation → JWT signing library: signs with (evidence: `app-utils/index.js`)
- IP geolocation clients → Geolocation providers: requests IP data (evidence: `location/index.js`)
- File utilities → Node filesystem: reads and writes (evidence: `file/index.js`)
- File utilities → Git operations: delegates Git actions (evidence: `file/index.js`)
- Git operations → Git remote: clones and pushes (evidence: `git/index.js`)
