How debottam2003/javascript works
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 Page demos · bookmark_app/index.html Bookmark app · domMasterClass/index.html DOM MasterClass · floatingLogin/index.html Floating login
Components 18
Root scripts
Standalone JavaScript study files at the repository root.
- Topic scripts · Numbered and topic-named root scripts exploring language features and browser APIs.
- DOM & events · Scripts centered on DOM manipulation, events, scrolling, input, cookies, and worker-style browser behavior.
- JS mechanics · 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 · 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 · Small browser app with its own HTML/CSS/JS for bookmark management.
bookmark_app/index.html - DOM MasterClass · Focused DOM practice app with HTML and script entry point.
domMasterClass/index.html - Floating login · Small login UI project with multiple HTML surfaces.
floatingLogin/index.html - Image slider · Slider/image demo split across multiple HTML pages.
imageslider/image.html - Ludo game · Board-game style project with HTML, script, and stylesheet.
ludo/index.html - Responsive demo · Responsive-layout practice folder with a dedicated page.
responsive/page.html - Stopwatch · Standalone timer/stopwatch page.
stopwatch/index.html - Traffic light · 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 · More conventional browser app with its own package and public entry points.
vanilajs/app.js - Node sandbox · Node entry points and database/HTTP experiments in the node/ folder.
node/index.js - TypeScript sandbox · Isolated TypeScript practice area with its own tsconfig and compiled outputs.
ts/tsconfig.json - WebRTC lab · Peer connection and webcam experiments for real-time communication concepts.
webRTC/webcam.html - Import/export · 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 · JSON, text, audio, and style assets used by individual demos and exercises.
Connections 16
- 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.