# logicforgelab/js-projects architecture

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

- Interactive diagram: https://gitdiagram.com/logicforgelab/js-projects
- Repository: https://github.com/logicforgelab/js-projects

## Overview

This repository is a set of JavaScript learning examples, not one integrated application. Its main workflows are standalone algorithm/data-structure demonstrations, object-oriented models, generator examples, and browser Web Worker demos. The worker demos send values from a page’s main thread to a worker and display a response; two also include a small static server. Edges reflect only shown calls or messages. Worker implementations and several listed modules were not excerpted, so uncertain behavior is omitted.

Main entry points: [`Workers/MainThread-Worker/main.js`](https://github.com/logicforgelab/js-projects/blob/main/Workers/MainThread-Worker/main.js) (Main-thread demo), [`Workers/ProcessingBinaryData/main.js`](https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/main.js) (Binary-data demo), [`Workers/TypedArray/main.js`](https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/main.js) (Typed-array demo), [`Workers/WorkingWithAnArray/main.js`](https://github.com/logicforgelab/js-projects/blob/main/Workers/WorkingWithAnArray/main.js) (Array demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workers["Web Workers"]
  node_mainthread_main["Main-thread demo<br/>[main.js]"]
  node_mainthread_worker["Message worker<br/>[worker.js]"]
  node_binary_main["Binary-data demo<br/>[main.js]"]
  node_binary_worker["Binary-data worker<br/>[worker.js]"]
  node_binary_server["Demo server<br/>[server.js]"]
  node_typed_main["Typed-array demo<br/>[main.js]"]
  node_typed_worker["Typed-array worker<br/>[worker.js]"]
  node_typed_server["Demo server<br/>[server.js]"]
  node_array_main["Array demo<br/>[main.js]"]
  node_array_worker["Array worker<br/>[worker.js]"]
end

subgraph group_algorithms["Algorithms"]
  node_binary_search["Binary search<br/>[binary-search.js]"]
  node_jump_search["Jump search<br/>[jump-search.js]"]
  node_bubble_sort["Bubble sort<br/>[bubble-sort.js]"]
  node_counting_sort["Counting sort<br/>[counting-sort.js]"]
  node_merge_sort["Merge sort<br/>[merge-sort.js]"]
  node_quick_sort["Quick sort<br/>[quick-sort.js]"]
  node_selection_sort["Selection sort<br/>[selection-sort.js]"]
end

subgraph group_structures["Data Structures"]
  node_dynamic_array["Dynamic array<br/>[dynamic.array.js]"]
  node_linked_list["Singly linked list"]
  node_stack["Stack<br/>[stack.js]"]
  node_queue["Queue<br/>[queue.js]"]
end

subgraph group_oop["Object-Oriented Examples"]
  node_employee_class["Employee classes"]
  node_employee_prototype["Employee prototypes"]
  node_animal_class["Animal classes<br/>[class-animal.js]"]
  node_animal_function["Animal prototypes<br/>[function-animal.js]"]
end

subgraph group_generators["Generators"]
  node_basic_generator["Sequence generator"]
  node_data_generator["Data-passing generator"]
  node_fibonacci_generator["Fibonacci generator"]
  node_pagination_generator["Pagination generator"]
  node_id_generator["ID generator"]
end

node_mainthread_main -->|"posts message"| node_mainthread_worker
node_binary_main -->|"posts data"| node_binary_worker
node_typed_main -->|"posts array"| node_typed_worker
node_array_main -->|"posts array"| node_array_worker

click node_mainthread_main "https://github.com/logicforgelab/js-projects/blob/main/Workers/MainThread-Worker/main.js"
click node_mainthread_worker "https://github.com/logicforgelab/js-projects/blob/main/Workers/MainThread-Worker/worker.js"
click node_binary_main "https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/main.js"
click node_binary_worker "https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/worker.js"
click node_binary_server "https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/server.js"
click node_typed_main "https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/main.js"
click node_typed_worker "https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/worker.js"
click node_typed_server "https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/server.js"
click node_array_main "https://github.com/logicforgelab/js-projects/blob/main/Workers/WorkingWithAnArray/main.js"
click node_array_worker "https://github.com/logicforgelab/js-projects/blob/main/Workers/WorkingWithAnArray/worker.js"
click node_binary_search "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/searching/binary-search.js"
click node_jump_search "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/searching/jump-search.js"
click node_bubble_sort "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/bubble-sort.js"
click node_counting_sort "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/counting-sort.js"
click node_merge_sort "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/merge-sort.js"
click node_quick_sort "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/quick-sort.js"
click node_selection_sort "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/selection-sort.js"
click node_dynamic_array "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/DynamicArray/dynamic.array.js"
click node_linked_list "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/LinkedList/singly-linked-list.js"
click node_stack "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/StackAndQueue/stack.js"
click node_queue "https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/StackAndQueue/queue.js"
click node_employee_class "https://github.com/logicforgelab/js-projects/blob/main/OOP/Employee-oop/employee-oop-class.js"
click node_employee_prototype "https://github.com/logicforgelab/js-projects/blob/main/OOP/Employee-oop/employee-oop-prototype.js"
click node_animal_class "https://github.com/logicforgelab/js-projects/blob/main/OOP/animal-oop/class-animal.js"
click node_animal_function "https://github.com/logicforgelab/js-projects/blob/main/OOP/animal-oop/function-animal.js"
click node_basic_generator "https://github.com/logicforgelab/js-projects/blob/main/generator/BasicSequenceGenerator.js"
click node_data_generator "https://github.com/logicforgelab/js-projects/blob/main/generator/DataPassingToGenerator.js"
click node_fibonacci_generator "https://github.com/logicforgelab/js-projects/blob/main/generator/FibonacciNumberGenerator.js"
click node_pagination_generator "https://github.com/logicforgelab/js-projects/blob/main/generator/PaginationViaGenerator.js"
click node_id_generator "https://github.com/logicforgelab/js-projects/blob/main/generator/nfiniteIDGenerator.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_mainthread_main,node_mainthread_worker,node_binary_main,node_binary_worker,node_binary_server,node_typed_main,node_typed_worker,node_typed_server,node_array_main,node_array_worker toneBlue
class node_binary_search,node_jump_search,node_bubble_sort,node_counting_sort,node_merge_sort,node_quick_sort,node_selection_sort toneAmber
class node_dynamic_array,node_linked_list,node_stack,node_queue toneMint
class node_employee_class,node_employee_prototype,node_animal_class,node_animal_function toneRose
class node_basic_generator,node_data_generator,node_fibonacci_generator,node_pagination_generator,node_id_generator toneIndigo
```

## Components

### Web Workers

- [Main-thread demo](https://github.com/logicforgelab/js-projects/blob/main/Workers/MainThread-Worker/main.js): `Workers/MainThread-Worker/main.js`
- [Message worker](https://github.com/logicforgelab/js-projects/blob/main/Workers/MainThread-Worker/worker.js): `Workers/MainThread-Worker/worker.js`
- [Binary-data demo](https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/main.js): `Workers/ProcessingBinaryData/main.js`
- [Binary-data worker](https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/worker.js): `Workers/ProcessingBinaryData/worker.js`
- [Demo server](https://github.com/logicforgelab/js-projects/blob/main/Workers/ProcessingBinaryData/server.js): `Workers/ProcessingBinaryData/server.js`
- [Typed-array demo](https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/main.js): `Workers/TypedArray/main.js`
- [Typed-array worker](https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/worker.js): `Workers/TypedArray/worker.js`
- [Demo server](https://github.com/logicforgelab/js-projects/blob/main/Workers/TypedArray/server.js): `Workers/TypedArray/server.js`
- [Array demo](https://github.com/logicforgelab/js-projects/blob/main/Workers/WorkingWithAnArray/main.js): `Workers/WorkingWithAnArray/main.js`
- [Array worker](https://github.com/logicforgelab/js-projects/blob/main/Workers/WorkingWithAnArray/worker.js): `Workers/WorkingWithAnArray/worker.js`

### Algorithms

- [Binary search](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/searching/binary-search.js): `algorithms-and-data-structures/algorithms/searching/binary-search.js`
- [Jump search](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/searching/jump-search.js): `algorithms-and-data-structures/algorithms/searching/jump-search.js`
- [Bubble sort](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/bubble-sort.js): `algorithms-and-data-structures/algorithms/sorting/bubble-sort.js`
- [Counting sort](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/counting-sort.js): `algorithms-and-data-structures/algorithms/sorting/counting-sort.js`
- [Merge sort](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/merge-sort.js): `algorithms-and-data-structures/algorithms/sorting/merge-sort.js`
- [Quick sort](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/quick-sort.js): `algorithms-and-data-structures/algorithms/sorting/quick-sort.js`
- [Selection sort](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/algorithms/sorting/selection-sort.js): `algorithms-and-data-structures/algorithms/sorting/selection-sort.js`

### Data Structures

- [Dynamic array](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/DynamicArray/dynamic.array.js): `algorithms-and-data-structures/data-structures/DynamicArray/dynamic.array.js`
- [Singly linked list](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/LinkedList/singly-linked-list.js): `algorithms-and-data-structures/data-structures/LinkedList/singly-linked-list.js`
- [Stack](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/StackAndQueue/stack.js): `algorithms-and-data-structures/data-structures/StackAndQueue/stack.js`
- [Queue](https://github.com/logicforgelab/js-projects/blob/main/algorithms-and-data-structures/data-structures/StackAndQueue/queue.js): `algorithms-and-data-structures/data-structures/StackAndQueue/queue.js`

### Object-Oriented Examples

- [Employee classes](https://github.com/logicforgelab/js-projects/blob/main/OOP/Employee-oop/employee-oop-class.js): `OOP/Employee-oop/employee-oop-class.js`
- [Employee prototypes](https://github.com/logicforgelab/js-projects/blob/main/OOP/Employee-oop/employee-oop-prototype.js): `OOP/Employee-oop/employee-oop-prototype.js`
- [Animal classes](https://github.com/logicforgelab/js-projects/blob/main/OOP/animal-oop/class-animal.js): `OOP/animal-oop/class-animal.js`
- [Animal prototypes](https://github.com/logicforgelab/js-projects/blob/main/OOP/animal-oop/function-animal.js): `OOP/animal-oop/function-animal.js`

### Generators

- [Sequence generator](https://github.com/logicforgelab/js-projects/blob/main/generator/BasicSequenceGenerator.js): `generator/BasicSequenceGenerator.js`
- [Data-passing generator](https://github.com/logicforgelab/js-projects/blob/main/generator/DataPassingToGenerator.js): `generator/DataPassingToGenerator.js`
- [Fibonacci generator](https://github.com/logicforgelab/js-projects/blob/main/generator/FibonacciNumberGenerator.js): `generator/FibonacciNumberGenerator.js`
- [Pagination generator](https://github.com/logicforgelab/js-projects/blob/main/generator/PaginationViaGenerator.js): `generator/PaginationViaGenerator.js`
- [ID generator](https://github.com/logicforgelab/js-projects/blob/main/generator/nfiniteIDGenerator.js): `generator/nfiniteIDGenerator.js`

## Connections

- Main-thread demo → Message worker: posts message (evidence: `Workers/MainThread-Worker/main.js`)
- Binary-data demo → Binary-data worker: posts data (evidence: `Workers/ProcessingBinaryData/main.js`)
- Typed-array demo → Typed-array worker: posts array (evidence: `Workers/TypedArray/main.js`)
- Array demo → Array worker: posts array (evidence: `Workers/WorkingWithAnArray/main.js`)
