# debottam2003/typescript architecture

> Architecture diagram of the GitHub repository debottam2003/typescript, 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/typescript
- Repository: https://github.com/debottam2003/typescript

## Overview

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: [`11_react_ts/TS/src/App.tsx`](https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/App.tsx) (App), [`TypeScript/src/index.ts`](https://github.com/debottam2003/typescript/blob/master/TypeScript/src/index.ts) (TS source), [`02_conditionals/index.ts`](https://github.com/debottam2003/typescript/blob/master/02_conditionals/index.ts) (Conditionals), [`03_operators/index.ts`](https://github.com/debottam2003/typescript/blob/master/03_operators/index.ts) (Operators)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fundamentals["TypeScript basics"]
  node_lesson_01["Datatypes<br/>lesson<br/>[index.ts]"]
  node_lesson_02["Conditionals<br/>lesson<br/>[index.ts]"]
  node_lesson_03["Operators<br/>lesson<br/>[index.ts]"]
  node_lesson_04["Loops<br/>lesson<br/>[index.ts]"]
  node_lesson_05["Utils<br/>lesson<br/>[index.ts]"]
  node_lesson_06["Enums<br/>lesson<br/>[enums.ts]"]
  node_lesson_07["Functions<br/>lesson<br/>[index.ts]"]
  node_lesson_08["OOP<br/>lesson<br/>[index.ts]"]
  node_lesson_09["Generics<br/>lesson<br/>[index.ts]"]
  node_lesson_10["Promises<br/>lesson<br/>[index.ts]"]
end

subgraph group_frontend["Frontend demos"]
  node_react_main["Main<br/>react entry<br/>[main.tsx]"]
  node_react_app["App<br/>[App.tsx]"]
  node_react_support["Context<br/>react support<br/>[Context.tsx]"]
  node_react_dup["TS React<br/>vite app<br/>[main.tsx]"]
  node_webrtc_demo["WebRTC<br/>browser demo<br/>[index.html]"]
end

subgraph group_backend["Server demos"]
  node_backend_pair["Backend<br/>server demo<br/>[server.ts]"]
  node_server_app["Server app<br/>[app.ts]"]
  node_router["Router<br/>route layer<br/>[router.ts]"]
  node_ddos_demo["DDoS<br/>server demo<br/>[server.ts]"]
end

subgraph group_codebase["Core codebases"]
  node_ts_src["TS source<br/>ts codebase<br/>[index.ts]"]
  node_ts_dist["TS dist<br/>build output<br/>[index.js]"]
  node_masterclass["Masterclass<br/>topic bundle<br/>[main.ts]"]
end

subgraph group_sandboxes["Playgrounds"]
  node_http_sandbox["HTTP sandbox<br/>js sandbox<br/>[http1a.js]"]
  node_background_job["Background<br/>script package<br/>[background.js]"]
end

node_lesson_01 -->|"next topic"| node_lesson_02
node_lesson_02 -->|"next topic"| node_lesson_03
node_lesson_03 -->|"next topic"| node_lesson_04
node_lesson_04 -->|"next topic"| node_lesson_05
node_lesson_05 -->|"next topic"| node_lesson_06
node_lesson_06 -->|"next topic"| node_lesson_07
node_lesson_07 -->|"next topic"| node_lesson_08
node_lesson_08 -->|"next topic"| node_lesson_09
node_lesson_09 -->|"next topic"| node_lesson_10
node_react_main -->|"bootstraps"| node_react_app
node_react_app -->|"uses"| node_react_support
node_react_dup -.->|"mirrors"| node_react_app
node_backend_pair -.->|"server side"| node_server_app
node_server_app -->|"dispatches"| node_router
node_router -.->|"similar pattern"| node_ddos_demo
node_ts_src -->|"compiles to"| node_ts_dist
node_ts_src -.->|"shares concepts"| node_masterclass
node_http_sandbox -.->|"standalone demos"| node_background_job
node_webrtc_demo -.->|"browser runtime"| node_react_main

click node_lesson_01 "https://github.com/debottam2003/typescript/blob/master/01_datatypes/index.ts"
click node_lesson_02 "https://github.com/debottam2003/typescript/blob/master/02_conditionals/index.ts"
click node_lesson_03 "https://github.com/debottam2003/typescript/blob/master/03_operators/index.ts"
click node_lesson_04 "https://github.com/debottam2003/typescript/blob/master/04_loop/index.ts"
click node_lesson_05 "https://github.com/debottam2003/typescript/blob/master/05_utils/index.ts"
click node_lesson_06 "https://github.com/debottam2003/typescript/blob/master/06_enums/enums.ts"
click node_lesson_07 "https://github.com/debottam2003/typescript/blob/master/07_function/index.ts"
click node_lesson_08 "https://github.com/debottam2003/typescript/blob/master/08_oops/index.ts"
click node_lesson_09 "https://github.com/debottam2003/typescript/blob/master/09_generics/index.ts"
click node_lesson_10 "https://github.com/debottam2003/typescript/blob/master/10_promise/index.ts"
click node_react_main "https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/main.tsx"
click node_react_app "https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/App.tsx"
click node_react_support "https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/Context.tsx"
click node_react_dup "https://github.com/debottam2003/typescript/blob/master/TSReact/TS/src/main.tsx"
click node_webrtc_demo "https://github.com/debottam2003/typescript/blob/master/webrtc/index.html"
click node_backend_pair "https://github.com/debottam2003/typescript/blob/master/12_backend/server.ts"
click node_server_app "https://github.com/debottam2003/typescript/blob/master/server/app.ts"
click node_router "https://github.com/debottam2003/typescript/blob/master/ts_server/src/routes/router.ts"
click node_ddos_demo "https://github.com/debottam2003/typescript/blob/master/ddos/server.ts"
click node_ts_src "https://github.com/debottam2003/typescript/blob/master/TypeScript/src/index.ts"
click node_ts_dist "https://github.com/debottam2003/typescript/blob/master/TypeScript/dist/index.js"
click node_masterclass "https://github.com/debottam2003/typescript/blob/master/masterclass/main.ts"
click node_http_sandbox "https://github.com/debottam2003/typescript/blob/master/http/http1a.js"
click node_background_job "https://github.com/debottam2003/typescript/blob/master/background/background.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_lesson_01,node_lesson_02,node_lesson_03,node_lesson_04,node_lesson_05,node_lesson_06,node_lesson_07,node_lesson_08,node_lesson_09,node_lesson_10 toneBlue
class node_react_main,node_react_app,node_react_support,node_react_dup,node_webrtc_demo toneAmber
class node_backend_pair,node_server_app,node_router,node_ddos_demo toneMint
class node_ts_src,node_ts_dist,node_masterclass toneRose
class node_http_sandbox,node_background_job toneIndigo
```

## Components

### TypeScript basics

Independent topic folders that teach language concepts one at a time.

- [Datatypes](https://github.com/debottam2003/typescript/blob/master/01_datatypes/index.ts): lesson · Introductory TypeScript data types example. · `01_datatypes/index.ts`
- [Conditionals](https://github.com/debottam2003/typescript/blob/master/02_conditionals/index.ts): lesson · Branching and conditional logic example. · `02_conditionals/index.ts`
- [Operators](https://github.com/debottam2003/typescript/blob/master/03_operators/index.ts): lesson · Operators and expression exercises. · `03_operators/index.ts`
- [Loops](https://github.com/debottam2003/typescript/blob/master/04_loop/index.ts): lesson · Iteration and loop patterns. · `04_loop/index.ts`
- [Utils](https://github.com/debottam2003/typescript/blob/master/05_utils/index.ts): lesson · Small utility-function examples. · `05_utils/index.ts`
- [Enums](https://github.com/debottam2003/typescript/blob/master/06_enums/enums.ts): lesson · Enum-focused TypeScript sample. · `06_enums/enums.ts`
- [Functions](https://github.com/debottam2003/typescript/blob/master/07_function/index.ts): lesson · Function syntax and usage exercises. · `07_function/index.ts`
- [OOP](https://github.com/debottam2003/typescript/blob/master/08_oops/index.ts): lesson · Classes and object-oriented examples. · `08_oops/index.ts`
- [Generics](https://github.com/debottam2003/typescript/blob/master/09_generics/index.ts): lesson · Generic types and reusable abstractions. · `09_generics/index.ts`
- [Promises](https://github.com/debottam2003/typescript/blob/master/10_promise/index.ts): lesson · Async promise and runtime examples. · `10_promise/index.ts`

### Frontend demos

Browser-focused React and WebRTC examples.

- [Main](https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/main.tsx): react entry · Vite bootstrap entry for the React example. · `11_react_ts/TS/src/main.tsx`
- [App](https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/App.tsx): react app · Top-level React component tree. · `11_react_ts/TS/src/App.tsx`
- [Context](https://github.com/debottam2003/typescript/blob/master/11_react_ts/TS/src/Context.tsx): react support · Supporting component and context examples. · `11_react_ts/TS/src/Context.tsx`
- [TS React](https://github.com/debottam2003/typescript/blob/master/TSReact/TS/src/main.tsx): vite app · Duplicate Vite React/TypeScript example. · `TSReact/TS/src/main.tsx`
- [WebRTC](https://github.com/debottam2003/typescript/blob/master/webrtc/index.html): browser demo · Client-side browser API experiment. · `webrtc/index.html`

### Server demos

Small Node/Bun backend and routing examples.

- [Backend](https://github.com/debottam2003/typescript/blob/master/12_backend/server.ts): server demo · Simple client/server TypeScript learning pair. · `12_backend/server.ts`
- [Server app](https://github.com/debottam2003/typescript/blob/master/server/app.ts): server app · Standalone server application example. · `server/app.ts`
- [Router](https://github.com/debottam2003/typescript/blob/master/ts_server/src/routes/router.ts): route layer · Route dispatch inside the server tutorial. · `ts_server/src/routes/router.ts`
- [DDoS](https://github.com/debottam2003/typescript/blob/master/ddos/server.ts): server demo · Separate client/server stress or request demo. · `ddos/server.ts`

### Core codebases

More structured TypeScript source-to-build projects.

- [TS source](https://github.com/debottam2003/typescript/blob/master/TypeScript/src/index.ts): ts codebase · Structured TypeScript source tree with domain-style modules. · `TypeScript/src/index.ts`
- [TS dist](https://github.com/debottam2003/typescript/blob/master/TypeScript/dist/index.js): build output · Compiled JavaScript artifacts produced from TypeScript sources. · `TypeScript/dist/index.js`
- [Masterclass](https://github.com/debottam2003/typescript/blob/master/masterclass/main.ts): topic bundle · Consolidated topic-by-topic TypeScript demonstrations. · `masterclass/main.ts`

### Playgrounds

Loose experiments and standalone utility files.

- [HTTP sandbox](https://github.com/debottam2003/typescript/blob/master/http/http1a.js): js sandbox · Plain JavaScript HTTP experiments and project subfolder. · `http/http1a.js`
- [Background](https://github.com/debottam2003/typescript/blob/master/background/background.js): script package · Isolated background-processing or automation script package. · `background/background.js`

## Connections

- 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.
