# korie93/sumbanganqueryrahmah architecture

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

- Interactive diagram: https://gitdiagram.com/korie93/sumbanganqueryrahmah
- Repository: https://github.com/korie93/sumbanganqueryrahmah

## Overview

SQR is a role-based contribution-management platform. Users enter through the React client, authenticate, then manage collection records and receipts, imports, searches, and reports; administrators also manage accounts and operational settings. The client communicates with the Express API, whose services and repositories persist domain data in PostgreSQL. AI search and real-time notifications are additional capabilities. The supplied excerpts show portions of search, import, receipt handling, and WebSocket runtime; several other feature links are documented only at a high level in the README, so those relationships are cited there.

Main entry points: [`server/internal/local-http-pipeline.ts`](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/internal/local-http-pipeline.ts) (Express API), [`client/src/main.tsx`](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/main.tsx) (React application), [`server/storage/postgres/postgres-storage-core.ts`](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/storage/postgres/postgres-storage-core.ts) (PostgreSQL storage), [`client/src/pages/AuthEntry.tsx`](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/AuthEntry.tsx) (Authentication UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_client["React application<br/>[main.tsx]"]
  node_authui["Authentication UI<br/>[AuthEntry.tsx]"]
  node_collectionui["Collection records"]
  node_importui["Import workflows<br/>[Import.tsx]"]
  node_searchui["Search and saved<br/>[GeneralSearch.tsx]"]
  node_reportsui["Analytics and reports<br/>[Analysis.tsx]"]
  node_aiui["AI search experience"]
  node_adminui["Account administration<br/>[Settings.tsx]"]
end

subgraph group_api["API and domain"]
  node_api["Express API"]
  node_auth["Authentication services"]
  node_imports["Import processing"]
  node_search["Search service<br/>[search.service.ts]"]
  node_collection["Collection services"]
  node_analytics["Analytics and reporting"]
end

subgraph group_data["Persistence"]
  node_repo["Search repository"]
  node_storage["PostgreSQL storage"]
  node_schema["Domain schema<br/>[schema-postgres.ts]"]
end

subgraph group_operations["Operations and intelligence"]
  node_monitor["System monitoring<br/>[Monitor.tsx]"]
  node_websocket["Live notifications<br/>[runtime-manager.ts]"]
  node_ai["AI search service"]
end

node_user(("Platform user"))
node_postgres[("PostgreSQL")]
node_ollama{{"Ollama"}}

node_user -->|"uses"| node_client
node_client -->|"presents"| node_authui
node_client -->|"presents"| node_collectionui
node_client -->|"presents"| node_importui
node_client -->|"presents"| node_searchui
node_client -->|"presents"| node_reportsui
node_client -->|"presents"| node_aiui
node_client -->|"presents"| node_adminui
node_client -->|"presents"| node_monitor
node_authui -.->|"authenticates via"| node_api
node_collectionui -.->|"requests records"| node_api
node_importui -.->|"uploads data"| node_api
node_searchui -.->|"queries"| node_api
node_reportsui -.->|"requests reports"| node_api
node_aiui -.->|"submits questions"| node_api
node_adminui -.->|"manages accounts"| node_api
node_api -.->|"routes imports"| node_imports
node_api -.->|"routes authentication"| node_auth
node_api -.->|"routes collection"| node_collection
node_api -.->|"routes search"| node_search
node_api -.->|"serves analytics"| node_analytics
node_imports -.->|"persists imports"| node_storage
node_collection -.->|"persists records"| node_storage
node_search -->|"queries"| node_repo
node_repo -->|"reads data"| node_postgres
node_storage -.->|"persists domain data"| node_postgres
node_storage -.->|"uses schema"| node_schema
node_ai -.->|"uses model"| node_ollama
node_client -.->|"receives notifications"| node_websocket

click node_client "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/main.tsx"
click node_authui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/AuthEntry.tsx"
click node_collectionui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/collection-records/useCollectionRecordsController.ts"
click node_importui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Import.tsx"
click node_searchui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/GeneralSearch.tsx"
click node_reportsui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Analysis.tsx"
click node_aiui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/ai/useAIPageController.ts"
click node_adminui "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Settings.tsx"
click node_api "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/internal/local-http-pipeline.ts"
click node_auth "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/auth-account.service.ts"
click node_imports "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/controllers/imports.controller.ts"
click node_search "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/search.service.ts"
click node_collection "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/collection/collection-record.service.ts"
click node_monitor "https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Monitor.tsx"
click node_websocket "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/ws/runtime-manager.ts"
click node_ai "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/ai-search.service.ts"
click node_repo "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/repositories/search.repository.ts"
click node_storage "https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/storage/postgres/postgres-storage-core.ts"
click node_schema "https://github.com/korie93/sumbanganqueryrahmah/blob/main/shared/schema-postgres.ts"

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_client,node_authui,node_collectionui,node_importui,node_searchui,node_reportsui,node_aiui,node_adminui,node_user toneBlue
class node_api,node_auth,node_imports,node_search,node_collection,node_analytics,node_postgres toneAmber
class node_repo,node_storage,node_schema toneMint
class node_monitor,node_websocket,node_ai toneRose
class node_ollama toneIndigo
```

## Components

### Client experience

- [React application](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/main.tsx): `client/src/main.tsx`
- [Authentication UI](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/AuthEntry.tsx): `client/src/pages/AuthEntry.tsx`
- [Collection records](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/collection-records/useCollectionRecordsController.ts): `client/src/pages/collection-records/useCollectionRecordsController.ts`
- [Import workflows](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Import.tsx): `client/src/pages/Import.tsx`
- [Search and saved](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/GeneralSearch.tsx): `client/src/pages/GeneralSearch.tsx`
- [Analytics and reports](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Analysis.tsx): `client/src/pages/Analysis.tsx`
- [AI search experience](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/ai/useAIPageController.ts): `client/src/pages/ai/useAIPageController.ts`
- [Account administration](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Settings.tsx): `client/src/pages/Settings.tsx`

### API and domain

- [Express API](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/internal/local-http-pipeline.ts): `server/internal/local-http-pipeline.ts`
- [Authentication services](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/auth-account.service.ts): `server/services/auth-account.service.ts`
- [Import processing](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/controllers/imports.controller.ts): `server/controllers/imports.controller.ts`
- [Search service](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/search.service.ts): `server/services/search.service.ts`
- [Collection services](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/collection/collection-record.service.ts): `server/services/collection/collection-record.service.ts`
- **Analytics and reporting**

### Persistence

- [Search repository](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/repositories/search.repository.ts): `server/repositories/search.repository.ts`
- [PostgreSQL storage](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/storage/postgres/postgres-storage-core.ts): `server/storage/postgres/postgres-storage-core.ts`
- [Domain schema](https://github.com/korie93/sumbanganqueryrahmah/blob/main/shared/schema-postgres.ts): `shared/schema-postgres.ts`

### Operations and intelligence

- [System monitoring](https://github.com/korie93/sumbanganqueryrahmah/blob/main/client/src/pages/Monitor.tsx): `client/src/pages/Monitor.tsx`
- [Live notifications](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/ws/runtime-manager.ts): `server/ws/runtime-manager.ts`
- [AI search service](https://github.com/korie93/sumbanganqueryrahmah/blob/main/server/services/ai-search.service.ts): `server/services/ai-search.service.ts`

### Other components

- **Platform user**
- **PostgreSQL**
- **Ollama**

## Connections

- Platform user → React application: uses (evidence: `README.md`)
- React application → Authentication UI: presents (evidence: `README.md`)
- React application → Collection records: presents (evidence: `README.md`)
- React application → Import workflows: presents (evidence: `README.md`)
- React application → Search and saved: presents (evidence: `README.md`)
- React application → Analytics and reports: presents (evidence: `README.md`)
- React application → AI search experience: presents (evidence: `README.md`)
- React application → Account administration: presents (evidence: `README.md`)
- React application → System monitoring: presents (evidence: `README.md`)
- Authentication UI → Express API: authenticates via
- Collection records → Express API: requests records
- Import workflows → Express API: uploads data
- Search and saved → Express API: queries
- Analytics and reports → Express API: requests reports
- AI search experience → Express API: submits questions
- Account administration → Express API: manages accounts
- Express API → Import processing: routes imports
- Express API → Authentication services: routes authentication
- Express API → Collection services: routes collection
- Express API → Search service: routes search
- Express API → Analytics and reporting: serves analytics
- Import processing → PostgreSQL storage: persists imports
- Collection services → PostgreSQL storage: persists records
- Search service → Search repository: queries (evidence: `server/services/search.service.ts`)
- Search repository → PostgreSQL: reads data (evidence: `server/repositories/search.repository.ts`)
- PostgreSQL storage → PostgreSQL: persists domain data
- PostgreSQL storage → Domain schema: uses schema
- AI search service → Ollama: uses model (evidence: `README.md`)
- React application → Live notifications: receives notifications (evidence: `README.md`)
