# debottam2003/javascript architecture

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

- Interactive diagram: https://gitdiagram.com/debottam2003/javascript
- Repository: https://github.com/debottam2003/javascript

## Overview

1. **Overall shape**
This repository is not a single application; it is a **learning workspace** made of many independent JavaScript exercises, browser demos, and small sandboxed projects. The architecture is intentionally flat: most files are standalone, and many folders represent self-contained mini-apps.

2. **Core layer: root-level study scripts**
The root contains many numbered and topic-named `.js` files such as `01_js_learn1.js`, `03_function.js`, `09_dom.js`, `11_api.js`, `promiseAll.js`, `regex.js`, `worker.js`, etc. These are best understood as **topic-by-topic experiments** that isolate one language feature or browser API at a time. They do not appear to depend on a shared runtime beyond the browser or Node when relevant.

3. **Browser demo subsystem**
A large portion of the repo is made of **single-page HTML demos** like `clock.html`, `weather.html`, `calculator.html`, `rps.html`, `login.html`, `color_picker.html`, `stopwatch/index.html`, and many others. These follow a common pattern: user interaction in the page drives JavaScript logic, which updates the DOM and sometimes plays with media, timers, or browser APIs.

4. **DOM and interaction-heavy examples**
Files such as `dom.js`, `events.js`, `scroll.js`, `navigator.js`, `cookie.js`, `innerhtml.html`, `oninput.html`, and `worker.js` indicate a clear cluster around **browser interaction and client-side state**. The data flow here is usually: browser event → script handler → DOM/state update → visible UI change. This is a major architectural boundary in the repo.

5. **Mini-project folders**
Several directories are small projects rather than isolated snippets: `bookmark_app`, `domMasterClass`, `floatingLogin`, `imageslider`, `ludo`, `traffic_light`, `stopwatch`, `responsive`, and `vanilajs`. These are the closest things to “applications” in the repo. Each is self-contained, typically with its own HTML/CSS/JS files, and should be drawn as separate vertical slices rather than shared services.

6. **Vanilla JS app structure**
The `vanilajs` folder stands out as a more conventional front-end project. It has `app.js`, `public/index.html`, and `public/scripts/script.js`, plus its own `package.json`. This suggests a small browser app with a more explicit entry point and directory structure than the loose root-level demos.

7. **Node and backend experiments**
There is a separate `node/` folder with `index.js`, `db_connect.js`, and its own `package.json`, plus standalone files like `pg_connect.js`, `server_table.js`, `urlencoded.js`, and `what_is_express/express.js`. These indicate a **Node.js backend/exploration lane**, likely focused on server basics and database connectivity. This lane is distinct from the browser demo lane.

8. **TypeScript sandbox**
The `ts/` directory is an isolated TypeScript practice area with `tsconfig.json`, `package.json`, and paired `.ts`/`.js` files such as `enum.ts`, `linkedlist.ts`, and `spread.ts`. This is a separate compilation boundary from the plain JavaScript examples, with its own build configuration and output artifacts.

9. **WebRTC and real-time media experiments**
The `webRTC/` folder contains `client1.js`, `client2.js`, `webcam.html`, and an ICE summary note. This is a specialized subsystem for **peer connection / media streaming experiments**, likely involving browser APIs for camera access and signaling concepts. It is isolated from the other demos and should be treated as its own real-time communication slice.

10. **Data, assets, and supporting files**
The repo includes small data and asset files like `json1.json`, `userdata.json`, `name.txt`, `click.mp3`, `rain.mp3`, and images/CSS alongside the demos. These act as local fixtures for parsing, fetch, media playback, and UI styling. They are supporting inputs rather than central components.

11. **Technology boundaries**
The dominant runtime is **browser JavaScript**, with some **Node.js**, a **TypeScript subproject**, and a few Python helper files (`json_read.py`, `matrix.py`, `py.py`) that look like side experiments rather than integrated parts of the main repo. There is no evidence of a single build pipeline or monorepo app architecture; instead, each folder/file cluster is a separate practice boundary.

12. **How to diagram it**
If you draw this repository, model it as a **collection of independent learning modules** under one repo boundary. The key relationships are:
- root-level topic scripts as isolated examples
- HTML/CSS/JS mini-apps as self-contained browser slices
- `node/`, `ts/`, `vanilajs/`, `webRTC/`, and `export_import/` as separate sandboxed subsystems
- local data/assets feeding specific demos
- minimal shared infrastructure between modules

Main entry points: [`index.html`](https://github.com/debottam2003/javascript/blob/main/index.html) (Page demos), [`bookmark_app/index.html`](https://github.com/debottam2003/javascript/blob/main/bookmark_app/index.html) (Bookmark app), [`domMasterClass/index.html`](https://github.com/debottam2003/javascript/blob/main/domMasterClass/index.html) (DOM MasterClass), [`floatingLogin/index.html`](https://github.com/debottam2003/javascript/blob/main/floatingLogin/index.html) (Floating login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root_experiments["Root scripts"]
  node_root_js_topics["Topic scripts<br/>js exercises"]
  node_dom_events_cluster["DOM & events<br/>browser interaction"]
  node_js_language_cluster["JS mechanics<br/>language basics"]
end

subgraph group_browser_demos["Browser demos"]
  node_browser_demo_pages["Page demos<br/>html demos<br/>[index.html]"]
end

subgraph group_mini_apps["Mini projects"]
  node_bookmark_app["Bookmark app<br/>mini app<br/>[index.html]"]
  node_dom_masterclass["DOM MasterClass<br/>mini app<br/>[index.html]"]
  node_floating_login["Floating login<br/>mini app<br/>[index.html]"]
  node_image_slider["Image slider<br/>mini app<br/>[image.html]"]
  node_ludo_game["Ludo game<br/>mini app<br/>[index.html]"]
  node_responsive_demo["Responsive demo<br/>mini app<br/>[page.html]"]
  node_stopwatch_app["Stopwatch<br/>mini app<br/>[index.html]"]
  node_traffic_light_app["Traffic light<br/>mini app<br/>[traffic.html]"]
end

subgraph group_runtime_sandboxes["Runtime sandboxes"]
  node_vanilla_project["Vanilla JS<br/>frontend app<br/>[app.js]"]
  node_node_backend["Node sandbox<br/>node.js<br/>[index.js]"]
  node_ts_sandbox["TypeScript sandbox<br/>[tsconfig.json]"]
  node_web_rtc_lab["WebRTC lab<br/>media rtc<br/>[webcam.html]"]
  node_export_import_lab["Import/export<br/>module demo<br/>[export.js]"]
end

subgraph group_supporting_files["Assets & data"]
  node_data_and_assets[("Data files<br/>fixtures")]
end

node_root_js_topics -->|"browser APIs"| node_dom_events_cluster
node_root_js_topics -->|"language study"| node_js_language_cluster
node_browser_demo_pages -->|"uses"| node_data_and_assets
node_bookmark_app -->|"uses"| node_data_and_assets
node_dom_masterclass -->|"focuses on"| node_dom_events_cluster
node_floating_login -.->|"similar pattern"| node_browser_demo_pages
node_image_slider -.->|"similar pattern"| node_browser_demo_pages
node_ludo_game -.->|"similar pattern"| node_browser_demo_pages
node_responsive_demo -.->|"layout practice"| node_browser_demo_pages
node_stopwatch_app -.->|"timer demo"| node_browser_demo_pages
node_traffic_light_app -->|"event driven"| node_dom_events_cluster
node_vanilla_project -->|"browser app"| node_browser_demo_pages
node_node_backend -->|"reads/writes"| node_data_and_assets
node_ts_sandbox -->|"typed variant"| node_js_language_cluster
node_web_rtc_lab -->|"media events"| node_dom_events_cluster
node_export_import_lab -->|"modules"| node_js_language_cluster

click node_browser_demo_pages "https://github.com/debottam2003/javascript/blob/main/index.html"
click node_bookmark_app "https://github.com/debottam2003/javascript/blob/main/bookmark_app/index.html"
click node_dom_masterclass "https://github.com/debottam2003/javascript/blob/main/domMasterClass/index.html"
click node_floating_login "https://github.com/debottam2003/javascript/blob/main/floatingLogin/index.html"
click node_image_slider "https://github.com/debottam2003/javascript/blob/main/imageslider/image.html"
click node_ludo_game "https://github.com/debottam2003/javascript/blob/main/ludo/index.html"
click node_responsive_demo "https://github.com/debottam2003/javascript/blob/main/responsive/page.html"
click node_stopwatch_app "https://github.com/debottam2003/javascript/blob/main/stopwatch/index.html"
click node_traffic_light_app "https://github.com/debottam2003/javascript/blob/main/traffic_light/traffic.html"
click node_vanilla_project "https://github.com/debottam2003/javascript/blob/main/vanilajs/app.js"
click node_node_backend "https://github.com/debottam2003/javascript/blob/main/node/index.js"
click node_ts_sandbox "https://github.com/debottam2003/javascript/blob/main/ts/tsconfig.json"
click node_web_rtc_lab "https://github.com/debottam2003/javascript/blob/main/webRTC/webcam.html"
click node_export_import_lab "https://github.com/debottam2003/javascript/blob/main/export_import/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_root_js_topics,node_dom_events_cluster,node_js_language_cluster toneBlue
class node_browser_demo_pages toneAmber
class node_bookmark_app,node_dom_masterclass,node_floating_login,node_image_slider,node_ludo_game,node_responsive_demo,node_stopwatch_app,node_traffic_light_app toneMint
class node_vanilla_project,node_node_backend,node_ts_sandbox,node_web_rtc_lab,node_export_import_lab toneRose
class node_data_and_assets toneIndigo
```

## Components

### Root scripts

Standalone JavaScript study files at the repository root.

- **Topic scripts**: js exercises · Numbered and topic-named root scripts exploring language features and browser APIs.
- **DOM & events**: browser interaction · Scripts centered on DOM manipulation, events, scrolling, input, cookies, and worker-style browser behavior.
- **JS mechanics**: language basics · Core language practice around functions, objects, arrays, loops, classes, promises, regex, and related syntax.

### Browser demos

Single-page HTML/CSS/JS exercises and interaction demos.

- [Page demos](https://github.com/debottam2003/javascript/blob/main/index.html): html demos · Loose HTML-based browser demos such as clock, weather, calculator, login, RPS, and media experiments. · `index.html`

### Mini projects

Self-contained app-like folders with their own entry files and assets.

- [Bookmark app](https://github.com/debottam2003/javascript/blob/main/bookmark_app/index.html): mini app · Small browser app with its own HTML/CSS/JS for bookmark management. · `bookmark_app/index.html`
- [DOM MasterClass](https://github.com/debottam2003/javascript/blob/main/domMasterClass/index.html): mini app · Focused DOM practice app with HTML and script entry point. · `domMasterClass/index.html`
- [Floating login](https://github.com/debottam2003/javascript/blob/main/floatingLogin/index.html): mini app · Small login UI project with multiple HTML surfaces. · `floatingLogin/index.html`
- [Image slider](https://github.com/debottam2003/javascript/blob/main/imageslider/image.html): mini app · Slider/image demo split across multiple HTML pages. · `imageslider/image.html`
- [Ludo game](https://github.com/debottam2003/javascript/blob/main/ludo/index.html): mini app · Board-game style project with HTML, script, and stylesheet. · `ludo/index.html`
- [Responsive demo](https://github.com/debottam2003/javascript/blob/main/responsive/page.html): mini app · Responsive-layout practice folder with a dedicated page. · `responsive/page.html`
- [Stopwatch](https://github.com/debottam2003/javascript/blob/main/stopwatch/index.html): mini app · Standalone timer/stopwatch page. · `stopwatch/index.html`
- [Traffic light](https://github.com/debottam2003/javascript/blob/main/traffic_light/traffic.html): mini app · Interactive traffic-light simulation with dedicated HTML, CSS, and JS. · `traffic_light/traffic.html`

### Runtime sandboxes

Separate practice areas for Node.js, TypeScript, real-time media, and export/import exercises.

- [Vanilla JS](https://github.com/debottam2003/javascript/blob/main/vanilajs/app.js): frontend app · More conventional browser app with its own package and public entry points. · `vanilajs/app.js`
- [Node sandbox](https://github.com/debottam2003/javascript/blob/main/node/index.js): node.js · Node entry points and database/HTTP experiments in the node/ folder. · `node/index.js`
- [TypeScript sandbox](https://github.com/debottam2003/javascript/blob/main/ts/tsconfig.json): typescript · Isolated TypeScript practice area with its own tsconfig and compiled outputs. · `ts/tsconfig.json`
- [WebRTC lab](https://github.com/debottam2003/javascript/blob/main/webRTC/webcam.html): media rtc · Peer connection and webcam experiments for real-time communication concepts. · `webRTC/webcam.html`
- [Import/export](https://github.com/debottam2003/javascript/blob/main/export_import/export.js): module demo · Small module-system exercise area for exports and imports. · `export_import/export.js`

### Assets & data

Local fixtures, media, and helper files used by examples.

- **Data files**: fixtures · JSON, text, audio, and style assets used by individual demos and exercises.

## Connections

- Topic scripts → DOM & events: browser APIs · Some topic scripts move into DOM, event, and worker experiments.
- Topic scripts → JS mechanics: language study · Core repository activity is isolated JavaScript feature practice.
- Page demos → Data files: uses · Loose demos rely on local media, JSON, text, and CSS assets.
- Bookmark app → Data files: uses · Mini apps share local styling and data fixtures where needed.
- DOM MasterClass → DOM & events: focuses on · This project deepens DOM and interaction patterns.
- Floating login → Page demos: similar pattern · A self-contained HTML interaction demo.
- Image slider → Page demos: similar pattern · Another small multi-page browser exercise.
- Ludo game → Page demos: similar pattern · Game-like front-end demo with its own assets.
- Responsive demo → Page demos: layout practice · A dedicated responsive design slice.
- Stopwatch → Page demos: timer demo · Single-purpose interactive page.
- Traffic light → DOM & events: event driven · Uses browser interaction to switch visible state.
- Vanilla JS → Page demos: browser app · A more structured front-end project compared with loose demos.
- Node sandbox → Data files: reads/writes · Backend experiments may use local files and database connections.
- TypeScript sandbox → JS mechanics: typed variant · TypeScript practice extends the same core language-study theme.
- WebRTC lab → DOM & events: media events · Real-time media experiments depend on browser event handling and device APIs.
- Import/export → JS mechanics: modules · Explores JavaScript module boundaries.
