# santhoshharsha375-afk/supplysphere-global-supply-chain-platform architecture

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

- Interactive diagram: https://gitdiagram.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform
- Repository: https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform

## Overview

SupplySphere is a JDK-only supply-chain platform with console and web front ends sharing search and operations services. The main workflow loads a document corpus, searches it in four modes, and presents ranked results; separate operational workflows analyze network throughput, schedule deliveries, validate codes, find duplicates, and report algorithm choices. The graph preserves those product branches and the algorithm families documented in the README. Some operational and web wiring is supported by the README and source index rather than full excerpts, so unsampled details are not expanded.

Main entry points: [`src/com/supplysphere/ops/OperationsService.java`](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/OperationsService.java) (Operations facade), [`src/com/supplysphere/service/SearchService.java`](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/service/SearchService.java) (Search facade), [`src/com/supplysphere/engine/QueryEngine.java`](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/QueryEngine.java) (Query engine), [`src/com/supplysphere/ui/SearchConsole.java`](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ui/SearchConsole.java) (Command console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontends["User interfaces"]
  node_console["Command console<br/>[SearchConsole.java]"]
  node_web["Web dashboard and API<br/>[WebApp.java]"]
  node_app["Application launcher"]
end

subgraph group_search["Knowledge search"]
  node_search_service["Search facade<br/>[SearchService.java]"]
  node_corpus_loader["Corpus loading<br/>[CorpusLoader.java]"]
  node_repository["Article repository"]
  node_query_engine["Query engine<br/>[QueryEngine.java]"]
  node_search_results["Ranked reports<br/>[QueryReport.java]"]
  node_algorithm_report["Algorithm report<br/>[ModuleReport.java]"]
  node_demo_reports["Algorithm demonstrations<br/>[EngineDemos.java]"]
end

subgraph group_operations["Supply operations"]
  node_operations_service["Operations facade"]
  node_network_data["Supply network<br/>[SupplyNetwork.java]"]
  node_network_loader["Network loading"]
  node_job_set["Delivery jobs<br/>[JobSet.java]"]
  node_code_validation["Batch code validation<br/>[MillerRabin.java]"]
  node_duplicate_detection["Duplicate detection"]
end

subgraph group_algorithms["Algorithm implementations"]
  node_search_algorithms["Retrieval algorithms"]
  node_fuzzy_algorithms["Fuzzy matching<br/>[EditDistance.java]"]
  node_similarity_index["Similarity index"]
  node_flow_network["Flow network model<br/>[FlowNetwork.java]"]
  node_max_flow["Max-flow analysis<br/>[Dinic.java]"]
  node_flow_result["Flow certificate<br/>[FlowResult.java]"]
  node_scheduling["Delivery scheduling"]
end

subgraph group_shared["Shared domain"]
  node_article["Article documents<br/>[Article.java]"]
  node_configuration["Search configuration<br/>[AppConfig.java]"]
  node_text_utils["Text utilities<br/>[Text.java]"]
  node_validation_utils["Input validation<br/>[Preconditions.java]"]
  node_domain_errors["Domain errors"]
end

node_user(("User"))

node_user -->|"issues commands"| node_console
node_user -->|"uses dashboard"| node_web
node_app -->|"launches"| node_console
node_console -->|"requests search"| node_search_service
node_web -->|"serves search"| node_search_service
node_console -->|"requests operations"| node_operations_service
node_web -->|"serves operations"| node_operations_service
node_search_service -->|"loads corpus"| node_corpus_loader
node_search_service -->|"stores articles"| node_repository
node_corpus_loader -->|"creates articles"| node_article
node_search_service -->|"delegates searches"| node_query_engine
node_search_service -->|"configures search"| node_configuration
node_query_engine -->|"indexes documents"| node_article
node_query_engine -->|"dispatches matching"| node_search_algorithms
node_query_engine -->|"computes fuzzy matches"| node_fuzzy_algorithms
node_query_engine -->|"ranks topical matches"| node_similarity_index
node_query_engine -->|"builds reports"| node_search_results
node_search_service -->|"returns reports"| node_search_results
node_operations_service -->|"loads network"| node_network_loader
node_network_loader -->|"builds network"| node_network_data
node_operations_service -->|"analyzes network"| node_network_data
node_operations_service -->|"constructs flow input"| node_flow_network
node_operations_service -->|"runs max flow"| node_max_flow
node_max_flow -->|"traverses residual graph"| node_flow_network
node_max_flow -->|"produces certificate"| node_flow_result
node_operations_service -->|"loads jobs"| node_job_set
node_operations_service -->|"plans deliveries"| node_scheduling
node_operations_service -->|"checks primality"| node_code_validation
node_operations_service -->|"ranks duplicates"| node_duplicate_detection
node_search_service -.->|"compares corpus"| node_duplicate_detection
node_console -->|"displays choices"| node_algorithm_report
node_console -->|"shows demonstrations"| node_demo_reports
node_article -->|"normalizes text"| node_text_utils
node_search_algorithms -.->|"validates inputs"| node_validation_utils
node_configuration -->|"validates settings"| node_validation_utils
node_validation_utils -->|"raises failures"| node_domain_errors

click node_console "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ui/SearchConsole.java"
click node_web "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/web/WebApp.java"
click node_app "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/SupplySphereApp.java"
click node_search_service "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/service/SearchService.java"
click node_corpus_loader "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/dataset/CorpusLoader.java"
click node_article "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/dataset/Article.java"
click node_repository "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/repository/ArticleRepository.java"
click node_query_engine "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/QueryEngine.java"
click node_search_results "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/QueryReport.java"
click node_search_algorithms "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/tree/main/src/com/supplysphere/algorithm/stringalgorithms"
click node_fuzzy_algorithms "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/dp/EditDistance.java"
click node_similarity_index "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/suffixstructures/SimilarityIndex.java"
click node_operations_service "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/OperationsService.java"
click node_network_data "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/SupplyNetwork.java"
click node_network_loader "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/SupplyNetworkLoader.java"
click node_flow_network "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/flow/FlowNetwork.java"
click node_max_flow "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/flow/Dinic.java"
click node_flow_result "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/flow/FlowResult.java"
click node_job_set "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/JobSet.java"
click node_scheduling "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/np/SchedulingApprox.java"
click node_code_validation "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/randomised/MillerRabin.java"
click node_duplicate_detection "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/suffixstructures/SimilarityIndex.java"
click node_algorithm_report "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/ModuleReport.java"
click node_demo_reports "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/EngineDemos.java"
click node_configuration "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/config/AppConfig.java"
click node_text_utils "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/util/Text.java"
click node_validation_utils "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/util/Preconditions.java"
click node_domain_errors "https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/util/DomainException.java"

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_console,node_web,node_app,node_user toneBlue
class node_search_service,node_corpus_loader,node_repository,node_query_engine,node_search_results,node_algorithm_report,node_demo_reports toneAmber
class node_operations_service,node_network_data,node_network_loader,node_job_set,node_code_validation,node_duplicate_detection toneMint
class node_search_algorithms,node_fuzzy_algorithms,node_similarity_index,node_flow_network,node_max_flow,node_flow_result,node_scheduling toneRose
class node_article,node_configuration,node_text_utils,node_validation_utils,node_domain_errors toneIndigo
```

## Components

### User interfaces

- [Command console](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ui/SearchConsole.java): `src/com/supplysphere/ui/SearchConsole.java`
- [Web dashboard and API](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/web/WebApp.java): `src/com/supplysphere/web/WebApp.java`
- [Application launcher](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/SupplySphereApp.java): `src/SupplySphereApp.java`

### Knowledge search

- [Search facade](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/service/SearchService.java): `src/com/supplysphere/service/SearchService.java`
- [Corpus loading](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/dataset/CorpusLoader.java): `src/com/supplysphere/dataset/CorpusLoader.java`
- [Article repository](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/repository/ArticleRepository.java): `src/com/supplysphere/repository/ArticleRepository.java`
- [Query engine](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/QueryEngine.java): `src/com/supplysphere/engine/QueryEngine.java`
- [Ranked reports](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/QueryReport.java): `src/com/supplysphere/engine/QueryReport.java`
- [Algorithm report](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/ModuleReport.java): `src/com/supplysphere/engine/ModuleReport.java`
- [Algorithm demonstrations](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/engine/EngineDemos.java): `src/com/supplysphere/engine/EngineDemos.java`

### Supply operations

- [Operations facade](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/OperationsService.java): `src/com/supplysphere/ops/OperationsService.java`
- [Supply network](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/SupplyNetwork.java): `src/com/supplysphere/ops/SupplyNetwork.java`
- [Network loading](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/SupplyNetworkLoader.java): `src/com/supplysphere/ops/SupplyNetworkLoader.java`
- [Delivery jobs](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/ops/JobSet.java): `src/com/supplysphere/ops/JobSet.java`
- [Batch code validation](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/randomised/MillerRabin.java): `src/com/supplysphere/algorithm/randomised/MillerRabin.java`
- [Duplicate detection](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/suffixstructures/SimilarityIndex.java): `src/com/supplysphere/algorithm/suffixstructures/SimilarityIndex.java`

### Algorithm implementations

- [Retrieval algorithms](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/tree/main/src/com/supplysphere/algorithm/stringalgorithms): `src/com/supplysphere/algorithm/stringalgorithms`
- [Fuzzy matching](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/dp/EditDistance.java): `src/com/supplysphere/algorithm/dp/EditDistance.java`
- [Similarity index](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/suffixstructures/SimilarityIndex.java): `src/com/supplysphere/algorithm/suffixstructures/SimilarityIndex.java`
- [Flow network model](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/flow/FlowNetwork.java): `src/com/supplysphere/algorithm/flow/FlowNetwork.java`
- [Max-flow analysis](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/flow/Dinic.java): `src/com/supplysphere/algorithm/flow/Dinic.java`
- [Flow certificate](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/flow/FlowResult.java): `src/com/supplysphere/algorithm/flow/FlowResult.java`
- [Delivery scheduling](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/algorithm/np/SchedulingApprox.java): `src/com/supplysphere/algorithm/np/SchedulingApprox.java`

### Shared domain

- [Article documents](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/dataset/Article.java): `src/com/supplysphere/dataset/Article.java`
- [Search configuration](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/config/AppConfig.java): `src/com/supplysphere/core/config/AppConfig.java`
- [Text utilities](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/util/Text.java): `src/com/supplysphere/core/util/Text.java`
- [Input validation](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/util/Preconditions.java): `src/com/supplysphere/core/util/Preconditions.java`
- [Domain errors](https://github.com/santhoshharsha375-afk/supplysphere-global-supply-chain-platform/blob/main/src/com/supplysphere/core/util/DomainException.java): `src/com/supplysphere/core/util/DomainException.java`

### Other components

- **User**

## Connections

- User → Command console: issues commands
- User → Web dashboard and API: uses dashboard
- Application launcher → Command console: launches (evidence: `src/SupplySphereApp.java`)
- Command console → Search facade: requests search (evidence: `src/com/supplysphere/ui/SearchConsole.java`)
- Web dashboard and API → Search facade: serves search (evidence: `src/com/supplysphere/web/WebApp.java`)
- Command console → Operations facade: requests operations (evidence: `src/com/supplysphere/ui/SearchConsole.java`)
- Web dashboard and API → Operations facade: serves operations (evidence: `src/com/supplysphere/web/WebApp.java`)
- Search facade → Corpus loading: loads corpus (evidence: `src/com/supplysphere/service/SearchService.java`)
- Search facade → Article repository: stores articles (evidence: `src/com/supplysphere/service/SearchService.java`)
- Corpus loading → Article documents: creates articles (evidence: `src/com/supplysphere/dataset/CorpusLoader.java`)
- Search facade → Query engine: delegates searches (evidence: `src/com/supplysphere/service/SearchService.java`)
- Search facade → Search configuration: configures search (evidence: `src/com/supplysphere/service/SearchService.java`)
- Query engine → Article documents: indexes documents (evidence: `src/com/supplysphere/engine/QueryEngine.java`)
- Query engine → Retrieval algorithms: dispatches matching (evidence: `src/com/supplysphere/engine/QueryEngine.java`)
- Query engine → Fuzzy matching: computes fuzzy matches (evidence: `src/com/supplysphere/engine/QueryEngine.java`)
- Query engine → Similarity index: ranks topical matches (evidence: `src/com/supplysphere/engine/QueryEngine.java`)
- Query engine → Ranked reports: builds reports (evidence: `src/com/supplysphere/engine/QueryEngine.java`)
- Search facade → Ranked reports: returns reports (evidence: `src/com/supplysphere/service/SearchService.java`)
- Operations facade → Network loading: loads network (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Network loading → Supply network: builds network (evidence: `src/com/supplysphere/ops/SupplyNetworkLoader.java`)
- Operations facade → Supply network: analyzes network (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Operations facade → Flow network model: constructs flow input (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Operations facade → Max-flow analysis: runs max flow (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Max-flow analysis → Flow network model: traverses residual graph (evidence: `src/com/supplysphere/algorithm/flow/Dinic.java`)
- Max-flow analysis → Flow certificate: produces certificate (evidence: `src/com/supplysphere/algorithm/flow/Dinic.java`)
- Operations facade → Delivery jobs: loads jobs (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Operations facade → Delivery scheduling: plans deliveries (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Operations facade → Batch code validation: checks primality (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Operations facade → Duplicate detection: ranks duplicates (evidence: `src/com/supplysphere/ops/OperationsService.java`)
- Search facade → Duplicate detection: compares corpus
- Command console → Algorithm report: displays choices (evidence: `src/com/supplysphere/ui/SearchConsole.java`)
- Command console → Algorithm demonstrations: shows demonstrations (evidence: `src/com/supplysphere/ui/SearchConsole.java`)
- Article documents → Text utilities: normalizes text (evidence: `src/com/supplysphere/dataset/Article.java`)
- Retrieval algorithms → Input validation: validates inputs (evidence: `src/com/supplysphere/algorithm/stringalgorithms/RabinKarp.java`)
- Search configuration → Input validation: validates settings (evidence: `src/com/supplysphere/core/config/AppConfig.java`)
- Input validation → Domain errors: raises failures (evidence: `src/com/supplysphere/core/util/Preconditions.java`)
