# shubhamjsh/system-design architecture

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

- Interactive diagram: https://gitdiagram.com/shubhamjsh/system-design
- Repository: https://github.com/shubhamjsh/system-design

## Overview

This is a System Design Handbook: engineers consult design concepts and LLD/HLD examples rather than using one integrated application workflow. The graph treats the README’s handbook-to-topic links as documented navigation, then shows runtime calls only where the sampled Go source establishes them. Major README topics whose implementations are not in the supplied tree are represented at their existing enclosing directory; the tree does not expose their internal components.

Main entry points: [`Readme.md`](https://github.com/shubhamjsh/system-design/blob/main/Readme.md) (Topic Index), [`lld/task-scheduler/main.go`](https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/main.go) (Scheduler Example), [`lld/idempotency/payment.go`](https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go) (Payment Handler), [`lld/grpc-chat/main.go`](https://github.com/shubhamjsh/system-design/blob/main/lld/grpc-chat/main.go) (Chat Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_handbook["Handbook"]
  node_handbook_index["Topic Index<br/>[Readme.md]"]
  node_concepts["Distributed Concepts"]
  node_hld["HLD Designs"]
  node_lld["LLD Examples"]
  node_distributed_cache["Distributed Cache"]
  node_notification_system["Notification System"]
  node_payment_system["Payment System Design"]
  node_url_shortener["URL Shortener"]
  node_database_indexing["Database Indexing"]
  node_concurrency["Concurrency"]
  node_message_queues["Message Queues"]
end

subgraph group_patterns["Design Patterns"]
  node_lru["LRU Cache<br/>[LRU.go]"]
  node_hashring["Hash Ring"]
end

subgraph group_services["LLD Services"]
  node_idempotency_handler["Payment Handler<br/>[payment.go]"]
  node_idempotency_store[("Idempotency Store<br/>[payment.go]")]
  node_payment_logic["Payment Logic<br/>[payment.go]"]
  node_chat_server["Chat Server<br/>[main.go]"]
  node_chat_pool["Broadcast Pool<br/>[handler.go]"]
  node_rate_limiter["Rate Limiters"]
  node_kv_store["In-Memory KV"]
end

subgraph group_integrity["Data Integrity"]
  node_audit_ledger["Hash-Chain Ledger<br/>[main.go]"]
  node_merkle_ledger["Merkle Ledger<br/>[main.go]"]
end

subgraph group_scheduling["Task Scheduling"]
  node_scheduler_main["Scheduler Example<br/>[main.go]"]
  node_worker_pool["Worker Pool<br/>[pool.go]"]
  node_task_service["Task Service<br/>[service.go]"]
  node_task_scheduler["Task Scheduler<br/>[scheduler.go]"]
end

node_engineer(("Engineer"))
node_payment_client(("Payment Client"))
node_chat_clients(("Chat Clients"))

node_engineer -->|"consults"| node_handbook_index
node_handbook_index -->|"links topics"| node_concepts
node_handbook_index -->|"links designs"| node_hld
node_handbook_index -->|"links examples"| node_lld
node_handbook_index -->|"documents"| node_distributed_cache
node_handbook_index -->|"documents"| node_notification_system
node_handbook_index -->|"documents"| node_payment_system
node_handbook_index -->|"documents"| node_url_shortener
node_handbook_index -->|"documents"| node_database_indexing
node_handbook_index -->|"documents"| node_concurrency
node_handbook_index -->|"documents"| node_message_queues
node_handbook_index -->|"features"| node_lru
node_handbook_index -->|"features"| node_hashring
node_handbook_index -->|"features"| node_idempotency_handler
node_handbook_index -->|"features"| node_audit_ledger
node_handbook_index -->|"features"| node_merkle_ledger
node_handbook_index -->|"features"| node_chat_server
node_handbook_index -->|"features"| node_rate_limiter
node_handbook_index -->|"features"| node_scheduler_main
node_handbook_index -->|"features"| node_kv_store
node_payment_client -->|"sends request"| node_idempotency_handler
node_idempotency_handler -->|"reserves and completes"| node_idempotency_store
node_idempotency_handler -->|"processes payment"| node_payment_logic
node_chat_server -->|"registers server"| node_chat_pool
node_chat_clients -.->|"streams messages"| node_chat_pool
node_scheduler_main -->|"creates pool"| node_worker_pool
node_scheduler_main -->|"creates and schedules"| node_task_scheduler
node_scheduler_main -->|"creates and stops"| node_task_service
node_task_service -->|"stops task"| node_task_scheduler

click node_handbook_index "https://github.com/shubhamjsh/system-design/blob/main/Readme.md"
click node_concepts "https://github.com/shubhamjsh/system-design/tree/main/concepts"
click node_hld "https://github.com/shubhamjsh/system-design/tree/main/hld"
click node_lld "https://github.com/shubhamjsh/system-design/tree/main/lld"
click node_lru "https://github.com/shubhamjsh/system-design/blob/main/lld/caching/LRU/LRU.go"
click node_hashring "https://github.com/shubhamjsh/system-design/blob/main/lld/consistant-hashing/BST-implementation.go"
click node_idempotency_handler "https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go"
click node_idempotency_store "https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go"
click node_payment_logic "https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go"
click node_chat_server "https://github.com/shubhamjsh/system-design/blob/main/lld/grpc-chat/main.go"
click node_chat_pool "https://github.com/shubhamjsh/system-design/blob/main/lld/grpc-chat/handler/handler.go"
click node_rate_limiter "https://github.com/shubhamjsh/system-design/tree/main/lld/rate-limiter"
click node_kv_store "https://github.com/shubhamjsh/system-design/tree/main/lld"
click node_audit_ledger "https://github.com/shubhamjsh/system-design/blob/main/lld/tamper-detection/hash-chain/main.go"
click node_merkle_ledger "https://github.com/shubhamjsh/system-design/blob/main/lld/tamper-detection/merkle-tree/main.go"
click node_scheduler_main "https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/main.go"
click node_worker_pool "https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/config/pool.go"
click node_task_service "https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/task/service.go"
click node_task_scheduler "https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/task/scheduler.go"
click node_distributed_cache "https://github.com/shubhamjsh/system-design/tree/main/hld"
click node_notification_system "https://github.com/shubhamjsh/system-design/tree/main/hld"
click node_payment_system "https://github.com/shubhamjsh/system-design/tree/main/hld"
click node_url_shortener "https://github.com/shubhamjsh/system-design/tree/main/hld"
click node_database_indexing "https://github.com/shubhamjsh/system-design/tree/main/concepts"
click node_concurrency "https://github.com/shubhamjsh/system-design/tree/main/concepts"
click node_message_queues "https://github.com/shubhamjsh/system-design/tree/main/concepts"

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_handbook_index,node_concepts,node_hld,node_lld,node_distributed_cache,node_notification_system,node_payment_system,node_url_shortener,node_database_indexing,node_concurrency,node_message_queues,node_payment_client,node_chat_clients toneBlue
class node_lru,node_hashring toneAmber
class node_idempotency_handler,node_idempotency_store,node_payment_logic,node_chat_server,node_chat_pool,node_rate_limiter,node_kv_store toneMint
class node_audit_ledger,node_merkle_ledger toneRose
class node_scheduler_main,node_worker_pool,node_task_service,node_task_scheduler,node_engineer toneIndigo
```

## Components

### Handbook

- [Topic Index](https://github.com/shubhamjsh/system-design/blob/main/Readme.md): `Readme.md`
- [Distributed Concepts](https://github.com/shubhamjsh/system-design/tree/main/concepts): `concepts`
- [HLD Designs](https://github.com/shubhamjsh/system-design/tree/main/hld): `hld`
- [LLD Examples](https://github.com/shubhamjsh/system-design/tree/main/lld): `lld`
- [Distributed Cache](https://github.com/shubhamjsh/system-design/tree/main/hld): `hld`
- [Notification System](https://github.com/shubhamjsh/system-design/tree/main/hld): `hld`
- [Payment System Design](https://github.com/shubhamjsh/system-design/tree/main/hld): `hld`
- [URL Shortener](https://github.com/shubhamjsh/system-design/tree/main/hld): `hld`
- [Database Indexing](https://github.com/shubhamjsh/system-design/tree/main/concepts): `concepts`
- [Concurrency](https://github.com/shubhamjsh/system-design/tree/main/concepts): `concepts`
- [Message Queues](https://github.com/shubhamjsh/system-design/tree/main/concepts): `concepts`

### Design Patterns

- [LRU Cache](https://github.com/shubhamjsh/system-design/blob/main/lld/caching/LRU/LRU.go): `lld/caching/LRU/LRU.go`
- [Hash Ring](https://github.com/shubhamjsh/system-design/blob/main/lld/consistant-hashing/BST-implementation.go): `lld/consistant-hashing/BST-implementation.go`

### LLD Services

- [Payment Handler](https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go): `lld/idempotency/payment.go`
- [Idempotency Store](https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go): `lld/idempotency/payment.go`
- [Payment Logic](https://github.com/shubhamjsh/system-design/blob/main/lld/idempotency/payment.go): `lld/idempotency/payment.go`
- [Chat Server](https://github.com/shubhamjsh/system-design/blob/main/lld/grpc-chat/main.go): `lld/grpc-chat/main.go`
- [Broadcast Pool](https://github.com/shubhamjsh/system-design/blob/main/lld/grpc-chat/handler/handler.go): `lld/grpc-chat/handler/handler.go`
- [Rate Limiters](https://github.com/shubhamjsh/system-design/tree/main/lld/rate-limiter): `lld/rate-limiter`
- [In-Memory KV](https://github.com/shubhamjsh/system-design/tree/main/lld): `lld`

### Data Integrity

- [Hash-Chain Ledger](https://github.com/shubhamjsh/system-design/blob/main/lld/tamper-detection/hash-chain/main.go): `lld/tamper-detection/hash-chain/main.go`
- [Merkle Ledger](https://github.com/shubhamjsh/system-design/blob/main/lld/tamper-detection/merkle-tree/main.go): `lld/tamper-detection/merkle-tree/main.go`

### Task Scheduling

- [Scheduler Example](https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/main.go): `lld/task-scheduler/main.go`
- [Worker Pool](https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/config/pool.go): `lld/task-scheduler/config/pool.go`
- [Task Service](https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/task/service.go): `lld/task-scheduler/task/service.go`
- [Task Scheduler](https://github.com/shubhamjsh/system-design/blob/main/lld/task-scheduler/task/scheduler.go): `lld/task-scheduler/task/scheduler.go`

### Other components

- **Engineer**
- **Payment Client**
- **Chat Clients**

## Connections

- Engineer → Topic Index: consults (evidence: `Readme.md`)
- Topic Index → Distributed Concepts: links topics (evidence: `Readme.md`)
- Topic Index → HLD Designs: links designs (evidence: `Readme.md`)
- Topic Index → LLD Examples: links examples (evidence: `Readme.md`)
- Topic Index → Distributed Cache: documents (evidence: `Readme.md`)
- Topic Index → Notification System: documents (evidence: `Readme.md`)
- Topic Index → Payment System Design: documents (evidence: `Readme.md`)
- Topic Index → URL Shortener: documents (evidence: `Readme.md`)
- Topic Index → Database Indexing: documents (evidence: `Readme.md`)
- Topic Index → Concurrency: documents (evidence: `Readme.md`)
- Topic Index → Message Queues: documents (evidence: `Readme.md`)
- Topic Index → LRU Cache: features (evidence: `Readme.md`)
- Topic Index → Hash Ring: features (evidence: `Readme.md`)
- Topic Index → Payment Handler: features (evidence: `Readme.md`)
- Topic Index → Hash-Chain Ledger: features (evidence: `Readme.md`)
- Topic Index → Merkle Ledger: features (evidence: `Readme.md`)
- Topic Index → Chat Server: features (evidence: `Readme.md`)
- Topic Index → Rate Limiters: features (evidence: `Readme.md`)
- Topic Index → Scheduler Example: features (evidence: `Readme.md`)
- Topic Index → In-Memory KV: features (evidence: `Readme.md`)
- Payment Client → Payment Handler: sends request (evidence: `lld/idempotency/payment.go`)
- Payment Handler → Idempotency Store: reserves and completes (evidence: `lld/idempotency/payment.go`)
- Payment Handler → Payment Logic: processes payment (evidence: `lld/idempotency/payment.go`)
- Chat Server → Broadcast Pool: registers server (evidence: `lld/grpc-chat/main.go`)
- Chat Clients → Broadcast Pool: streams messages
- Scheduler Example → Worker Pool: creates pool (evidence: `lld/task-scheduler/main.go`)
- Scheduler Example → Task Scheduler: creates and schedules (evidence: `lld/task-scheduler/main.go`)
- Scheduler Example → Task Service: creates and stops (evidence: `lld/task-scheduler/main.go`)
- Task Service → Task Scheduler: stops task (evidence: `lld/task-scheduler/task/service.go`)
