How debottam2003/typescript works
This repository is not a single application; it is a collection of independent TypeScript/JavaScript learning projects. The main architectural boundary is per-folder isolation: most subdirectories are self-contained examples with their own package.json, tsconfig.json, and sometimes lockfiles, so each topic can be run and built independently.
The dominant layer is the TypeScript fundamentals track: 01_datatypes through 10_promise. These folders each focus on one concept area—types, conditionals, operators, loops, utility functions, enums, functions, OOP, generics, and promises. Their entry points are typically a single index.ts or similarly named file, which makes them small, single-purpose teaching units rather than integrated modules.
A second major subsystem is the React/TypeScript example in 11_react_ts/TS and the duplicated TSReact/TS. This is a Vite-based frontend app with the usual React entry flow: main.tsx bootstraps the app, App.tsx is the top-level component, and Comp.tsx / Context.tsx provide supporting component and context examples. The architecture here is browser-runtime only, with source under src/ and standard Vite/TypeScript config files.
There is a backend/server learning cluster made up of 12_backend, 13_server, ts_server, server, and ddos. These appear to demonstrate simple server-side TypeScript patterns, with separate client/server files in some cases (client.ts, server.ts) and a route split in ts_server/src/routes/router.ts. The likely data flow is request in, routing/handler logic, response out; there is no indication of a larger service mesh or persistence layer.
The TypeScript/ directory is a larger, more structured TypeScript codebase than the topic folders. It has a src/ tree with multiple domain-style files such as Human.ts, Parent.ts, Child.ts, Learn.ts, Main.ts, linkedlist.ts, data.ts, google.ts, and server.ts, plus committed dist/ outputs. This suggests it is a compilation-focused demo where TypeScript source is transformed into JavaScript artifacts, and the checked-in dist/ directory is generated output rather than a separate source boundary.
Several directories show the same source-to-output pattern: TypeScript/dist, TypeScript/src/dist, and 10_promise/index.js or tempCodeRunnerFile.js indicate generated JavaScript is committed alongside TypeScript sources in some places. For an architecture diagram, it is useful to treat these as build artifacts, not primary inputs.
The http/ folder is a separate plain-JavaScript HTTP sandbox. It contains many numbered files (http1a.js through http1j.js) plus a project/ subfolder and data/reference files like statuscode.txt and xml.txt. This looks like a progression of low-level HTTP experiments rather than an application with internal modules.
The masterclass/ directory is another mixed learning area, with TypeScript and compiled JavaScript side by side. Its files (types.ts, oops.ts, generics.ts, promise.ts, main.ts, first.ts, gaga.ts) indicate topic-by-topic demonstrations, likely similar in role to the numbered top-level folders but more consolidated.
There are also standalone utility or playground files at the repository root such as copyconstructor.ts, learnts.ts, test.ts, start.js, types_of_functions.txt, and export.txt. These are incidental experiment artifacts and do not form a cohesive subsystem.
The background/ folder and webrtc/ folder are separate special-purpose demos. webrtc includes an index.html and browser-side JS/TS config, so it is a client-side browser experiment. background appears to be a Node/Bun-style script package for background processing or browser automation, but it is isolated from the rest of the repo.
Overall, the repository architecture is a set of parallel learning sandboxes rather than one integrated product. The key diagrammatic concepts are: isolated package boundaries, source-to-build output boundaries, frontend vs backend vs browser-API demos, and a progression from language basics to more advanced application patterns.
Main entry points: App.tsx App · src/index.ts TS source · 02_conditionals/index.ts Conditionals · 03_operators/index.ts Operators
Components 24
TypeScript basics
Independent topic folders that teach language concepts one at a time.
- Datatypes · Introductory TypeScript data types example.
01_datatypes/index.ts - Conditionals · Branching and conditional logic example.
02_conditionals/index.ts - Operators · Operators and expression exercises.
03_operators/index.ts - Loops · Iteration and loop patterns.
04_loop/index.ts - Utils · Small utility-function examples.
05_utils/index.ts - Enums · Enum-focused TypeScript sample.
06_enums/enums.ts - Functions · Function syntax and usage exercises.
07_function/index.ts - OOP · Classes and object-oriented examples.
08_oops/index.ts - Generics · Generic types and reusable abstractions.
09_generics/index.ts - Promises · Async promise and runtime examples.
10_promise/index.ts
Frontend demos
Browser-focused React and WebRTC examples.
- Main · Vite bootstrap entry for the React example.
11_react_ts/TS/src/main.tsx - App · Top-level React component tree.
11_react_ts/TS/src/App.tsx - Context · Supporting component and context examples.
11_react_ts/TS/src/Context.tsx - TS React · Duplicate Vite React/TypeScript example.
TSReact/TS/src/main.tsx - WebRTC · Client-side browser API experiment.
webrtc/index.html
Server demos
Small Node/Bun backend and routing examples.
- Backend · Simple client/server TypeScript learning pair.
12_backend/server.ts - Server app · Standalone server application example.
server/app.ts - Router · Route dispatch inside the server tutorial.
ts_server/src/routes/router.ts - DDoS · Separate client/server stress or request demo.
ddos/server.ts
Core codebases
More structured TypeScript source-to-build projects.
- TS source · Structured TypeScript source tree with domain-style modules.
TypeScript/src/index.ts - TS dist · Compiled JavaScript artifacts produced from TypeScript sources.
TypeScript/dist/index.js - Masterclass · Consolidated topic-by-topic TypeScript demonstrations.
masterclass/main.ts
Playgrounds
Loose experiments and standalone utility files.
- HTTP sandbox · Plain JavaScript HTTP experiments and project subfolder.
http/http1a.js - Background · Isolated background-processing or automation script package.
background/background.js
Connections 19
- Datatypes → Conditionals: next topic · Sequential fundamentals learning path.
- Conditionals → Operators: next topic · Sequential fundamentals learning path.
- Operators → Loops: next topic · Sequential fundamentals learning path.
- Loops → Utils: next topic · Sequential fundamentals learning path.
- Utils → Enums: next topic · Sequential fundamentals learning path.
- Enums → Functions: next topic · Sequential fundamentals learning path.
- Functions → OOP: next topic · Sequential fundamentals learning path.
- OOP → Generics: next topic · Sequential fundamentals learning path.
- Generics → Promises: next topic · Sequential fundamentals learning path.
- Main → App: bootstraps · Vite entry mounts the application component.
- App → Context: uses · Top-level UI consumes supporting examples and context.
- TS React → App: mirrors · Parallel React/TypeScript example with the same app shape.
- Backend → Server app: server side · Backend examples overlap with standalone server code.
- Server app → Router: dispatches · Request handling flows through routing.
- Router → DDoS: similar pattern · Another isolated server/client demo in the backend cluster.
- TS source → TS dist: compiles to · TypeScript source is emitted into checked-in JavaScript output.
- TS source → Masterclass: shares concepts · Both are structured TypeScript teaching codebases.
- HTTP sandbox → Background: standalone demos · Independent runtime experiments without a shared product boundary.
- WebRTC → Main: browser runtime · Both are client-side browser-focused examples.