# majingamo/ebulodccis architecture

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

- Interactive diagram: https://gitdiagram.com/majingamo/ebulodccis
- Repository: https://github.com/majingamo/ebulodccis

## Overview

E-Bulod is a web-based CCIS equipment-borrowing system. Borrowers sign in, browse equipment, submit and track requests, and view notifications and trust points; admins manage inventory and requests, process returns, and review analytics and history. The browser client communicates with serverless API endpoints, which share authentication, validation, trust-point logic, and Supabase data helpers. The README documents additional frontend capabilities not visible in the sampled source. Browser-to-endpoint wiring is not established by the excerpts, so those links are dashed.

Main entry points: [`js/api.js`](https://github.com/majingamo/ebulodccis/blob/main/js/api.js) (API client), [`api/config.js`](https://github.com/majingamo/ebulodccis/blob/main/api/config.js) (API and trust helpers), [`api/requests.js`](https://github.com/majingamo/ebulodccis/blob/main/api/requests.js) (Borrowing requests), [`api/equipment.js`](https://github.com/majingamo/ebulodccis/blob/main/api/equipment.js) (Equipment inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser experience"]
  node_login["Login page<br/>[index.html]"]
  node_borrower_ui["Borrower dashboard"]
  node_admin_ui["Admin dashboard<br/>[admin_dboard.html]"]
  node_account_ui["Account creation"]
  node_api_client["API client<br/>[api.js]"]
  node_auth_ui["Unified login<br/>[auth_unified.js]"]
  node_upload["Image upload<br/>[cloudinary.js]"]
end

subgraph group_workflow["Borrowing operations"]
  node_equipment["Equipment inventory<br/>[equipment.js]"]
  node_requests["Borrowing requests<br/>[requests.js]"]
  node_borrowers["Borrower accounts<br/>[borrowers.js]"]
  node_bulk["Bulk operations<br/>[bulk_operations.js]"]
  node_notifications["Notifications<br/>[notifications.js]"]
end

subgraph group_admin["Admin oversight"]
  node_dashboard["Dashboard analytics<br/>[dashboard.js]"]
  node_history["Equipment history<br/>[history.js]"]
  node_export["Data export<br/>[export.js]"]
end

subgraph group_shared["Shared API services"]
  node_auth_api["Authentication<br/>[auth.js]"]
  node_config["API and trust helpers<br/>[config.js]"]
end

subgraph group_integrations["External services"]
  node_supabase[("Supabase tables")]
  node_cloudinary["Cloudinary"]
end

node_borrower(("Borrower"))
node_admin_actor(("Admin"))

node_borrower -.->|"signs in"| node_login
node_admin_actor -.->|"signs in"| node_login
node_login -.->|"handles login"| node_auth_ui
node_auth_ui -.->|"posts credentials"| node_auth_api
node_borrower -.->|"uses"| node_borrower_ui
node_admin_actor -.->|"uses"| node_admin_ui
node_borrower_ui -.->|"requests data"| node_api_client
node_admin_ui -.->|"requests data"| node_api_client
node_account_ui -.->|"creates accounts"| node_api_client
node_api_client -.->|"calls endpoints"| node_auth_api
node_api_client -.->|"calls endpoints"| node_equipment
node_api_client -.->|"calls endpoints"| node_requests
node_api_client -.->|"calls endpoints"| node_borrowers
node_api_client -.->|"calls endpoints"| node_bulk
node_api_client -.->|"calls endpoints"| node_notifications
node_api_client -.->|"calls endpoints"| node_dashboard
node_api_client -.->|"calls endpoints"| node_history
node_api_client -.->|"calls endpoints"| node_export
node_equipment -->|"uses helpers"| node_config
node_requests -->|"uses helpers"| node_config
node_bulk -->|"uses helpers"| node_config
node_auth_api -->|"uses helpers"| node_config
node_borrowers -->|"uses helpers"| node_config
node_notifications -->|"uses helpers"| node_config
node_dashboard -->|"uses helpers"| node_config
node_history -->|"uses helpers"| node_config
node_export -->|"uses helpers"| node_config
node_config -->|"reads and writes"| node_supabase
node_upload -.->|"uploads images"| node_cloudinary
node_equipment -.->|"tracks borrowing"| node_requests
node_requests -.->|"records returns"| node_history
node_requests -.->|"updates borrowers"| node_notifications
node_borrowers -.->|"provides borrower data"| node_requests
node_dashboard -.->|"exports reports"| node_export

click node_login "https://github.com/majingamo/ebulodccis/blob/main/index.html"
click node_borrower_ui "https://github.com/majingamo/ebulodccis/blob/main/borrower_dashboard.html"
click node_admin_ui "https://github.com/majingamo/ebulodccis/blob/main/admin_dboard.html"
click node_account_ui "https://github.com/majingamo/ebulodccis/blob/main/create_account.html"
click node_api_client "https://github.com/majingamo/ebulodccis/blob/main/js/api.js"
click node_auth_ui "https://github.com/majingamo/ebulodccis/blob/main/js/auth_unified.js"
click node_upload "https://github.com/majingamo/ebulodccis/blob/main/js/cloudinary.js"
click node_auth_api "https://github.com/majingamo/ebulodccis/blob/main/api/auth.js"
click node_config "https://github.com/majingamo/ebulodccis/blob/main/api/config.js"
click node_equipment "https://github.com/majingamo/ebulodccis/blob/main/api/equipment.js"
click node_requests "https://github.com/majingamo/ebulodccis/blob/main/api/requests.js"
click node_borrowers "https://github.com/majingamo/ebulodccis/blob/main/api/borrowers.js"
click node_bulk "https://github.com/majingamo/ebulodccis/blob/main/api/bulk_operations.js"
click node_notifications "https://github.com/majingamo/ebulodccis/blob/main/api/notifications.js"
click node_dashboard "https://github.com/majingamo/ebulodccis/blob/main/api/dashboard.js"
click node_history "https://github.com/majingamo/ebulodccis/blob/main/api/history.js"
click node_export "https://github.com/majingamo/ebulodccis/blob/main/api/export.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_login,node_borrower_ui,node_admin_ui,node_account_ui,node_api_client,node_auth_ui,node_upload toneBlue
class node_equipment,node_requests,node_borrowers,node_bulk,node_notifications toneAmber
class node_dashboard,node_history,node_export toneMint
class node_auth_api,node_config toneRose
class node_supabase,node_cloudinary,node_borrower,node_admin_actor toneIndigo
```

## Components

### Browser experience

- [Login page](https://github.com/majingamo/ebulodccis/blob/main/index.html): `index.html`
- [Borrower dashboard](https://github.com/majingamo/ebulodccis/blob/main/borrower_dashboard.html): `borrower_dashboard.html`
- [Admin dashboard](https://github.com/majingamo/ebulodccis/blob/main/admin_dboard.html): `admin_dboard.html`
- [Account creation](https://github.com/majingamo/ebulodccis/blob/main/create_account.html): `create_account.html`
- [API client](https://github.com/majingamo/ebulodccis/blob/main/js/api.js): `js/api.js`
- [Unified login](https://github.com/majingamo/ebulodccis/blob/main/js/auth_unified.js): `js/auth_unified.js`
- [Image upload](https://github.com/majingamo/ebulodccis/blob/main/js/cloudinary.js): `js/cloudinary.js`

### Borrowing operations

- [Equipment inventory](https://github.com/majingamo/ebulodccis/blob/main/api/equipment.js): `api/equipment.js`
- [Borrowing requests](https://github.com/majingamo/ebulodccis/blob/main/api/requests.js): `api/requests.js`
- [Borrower accounts](https://github.com/majingamo/ebulodccis/blob/main/api/borrowers.js): `api/borrowers.js`
- [Bulk operations](https://github.com/majingamo/ebulodccis/blob/main/api/bulk_operations.js): `api/bulk_operations.js`
- [Notifications](https://github.com/majingamo/ebulodccis/blob/main/api/notifications.js): `api/notifications.js`

### Admin oversight

- [Dashboard analytics](https://github.com/majingamo/ebulodccis/blob/main/api/dashboard.js): `api/dashboard.js`
- [Equipment history](https://github.com/majingamo/ebulodccis/blob/main/api/history.js): `api/history.js`
- [Data export](https://github.com/majingamo/ebulodccis/blob/main/api/export.js): `api/export.js`

### Shared API services

- [Authentication](https://github.com/majingamo/ebulodccis/blob/main/api/auth.js): `api/auth.js`
- [API and trust helpers](https://github.com/majingamo/ebulodccis/blob/main/api/config.js): `api/config.js`

### External services

- **Supabase tables**
- **Cloudinary**

### Other components

- **Borrower**
- **Admin**

## Connections

- Borrower → Login page: signs in
- Admin → Login page: signs in
- Login page → Unified login: handles login
- Unified login → Authentication: posts credentials
- Borrower → Borrower dashboard: uses
- Admin → Admin dashboard: uses
- Borrower dashboard → API client: requests data
- Admin dashboard → API client: requests data
- Account creation → API client: creates accounts
- API client → Authentication: calls endpoints
- API client → Equipment inventory: calls endpoints
- API client → Borrowing requests: calls endpoints
- API client → Borrower accounts: calls endpoints
- API client → Bulk operations: calls endpoints
- API client → Notifications: calls endpoints
- API client → Dashboard analytics: calls endpoints
- API client → Equipment history: calls endpoints
- API client → Data export: calls endpoints
- Equipment inventory → API and trust helpers: uses helpers (evidence: `api/equipment.js`)
- Borrowing requests → API and trust helpers: uses helpers (evidence: `api/requests.js`)
- Bulk operations → API and trust helpers: uses helpers (evidence: `api/bulk_operations.js`)
- Authentication → API and trust helpers: uses helpers (evidence: `api/auth.js`)
- Borrower accounts → API and trust helpers: uses helpers (evidence: `api/borrowers.js`)
- Notifications → API and trust helpers: uses helpers (evidence: `api/notifications.js`)
- Dashboard analytics → API and trust helpers: uses helpers (evidence: `api/dashboard.js`)
- Equipment history → API and trust helpers: uses helpers (evidence: `api/history.js`)
- Data export → API and trust helpers: uses helpers (evidence: `api/export.js`)
- API and trust helpers → Supabase tables: reads and writes (evidence: `api/config.js`)
- Image upload → Cloudinary: uploads images
- Equipment inventory → Borrowing requests: tracks borrowing
- Borrowing requests → Equipment history: records returns
- Borrowing requests → Notifications: updates borrowers
- Borrower accounts → Borrowing requests: provides borrower data
- Dashboard analytics → Data export: exports reports
