How altaseb-chernet/30-days-of-typescript works
This repository is not a single application with runtime components; it is a course-style monorepo of independent TypeScript lesson units.
Top-level structure
The repo has three main top-level concerns:
1. Course landing content
- README.md explains the challenge, audience, and workflow.
- assets/TypeScript.png is the visual hero asset used by the root README.
2. Daily lesson folders
- day-01-... through day-28-...
- Each day is a self-contained learning module focused on one TypeScript topic.
- The folders are intentionally isolated; there is no central application runtime connecting them.
3. Generated artifacts
- Many day folders include dist/ output alongside src/.
- These are TypeScript build outputs: compiled JavaScript plus declaration files and source maps.
- The repo appears to commit build artifacts for instructional convenience.
Main architectural pattern
The dominant pattern is:
• Source of truth: src/index.ts
• Build step: TypeScript compiler via tsconfig.json
• Outputs: dist/index.js, dist/index.d.ts, and .map files
This repeated structure is the core architectural boundary across most days. In the diagram, each day can be represented as an independent package/module with:
• lesson source,
• compiler configuration,
• compiled outputs.
Per-day module boundaries
Each day folder is a standalone teaching slice. The names show the progression of concern areas:
• Days 1–4: TypeScript fundamentals, type system, arrays/tuples, objects/type aliases
• Days 5–17: functions, unions, assertions, literal types, interfaces, classes, generics, utility types, type guards, OOP, interface merging
• Days 18–21: modules/imports, DOM manipulation, events/forms, event propagation
• Days 22–24: async TypeScript, fetch/API typing, error handling
• Days 25–28: advanced patterns, performance, design patterns
From an architecture standpoint, these are not interconnected services; they are incremental educational units. A learner can open any day independently.
Notable structural differences
A few folders deviate from the common src + dist layout:
• Day 5 has only src/ and tsconfig.json in the tree shown, with no committed dist/.
• Day 10 places compiled outputs under src/ instead of a separate dist/.
• Day 18 includes a nested Node project setup:
- src/package.json
- src/package-lock.json
- src/node_modules/
- this suggests the lesson demonstrates module/import/project structure using a local npm environment.
• Day 28 is shown with only src/index.ts, suggesting either incomplete build artifacts or a newer/leaner lesson layout.
These inconsistencies matter for a diagram because they show that the repo is not standardized as a production package monorepo; it is a collection of lesson examples with slightly different setup per topic.
Execution/runtime boundaries
The repo mixes several execution contexts depending on the lesson:
• TypeScript-only conceptual lessons in early days
• Browser-oriented lessons in the DOM/event/fetch days
• Async/runtime lessons in later days
• Module/package lessons in day 18 with an actual npm project inside a lesson folder
There is no evidence of a central backend, database, message bus, or shared API layer. Any external interaction is lesson-specific and isolated to that day’s example code.
How to diagram it accurately
A good architecture diagram for this repo should show:
• A root course container
- README and assets
• A series of independent daily lesson modules
- each with src/index.ts
- most with tsconfig.json
- many with build outputs in dist/
• A TypeScript compilation boundary
- source to generated JS and typings
• A special nested npm lesson module for day 18
• No shared runtime dependencies between days
In short: this is an instructional TypeScript curriculum repo, organized as loosely coupled, per-day mini-projects rather than a single integrated software system.
Main entry points: README.md README · package.json Day 18 package · package-lock.json Package lock · node_modules Installed deps
Components 17
Root content
Course landing content and repository metadata
- README · Root landing page describing the challenge and workflow
README.md - TypeScript art · Hero illustration referenced by the landing README
Lesson phases
Independent TypeScript lesson units grouped by topic progression
- Daily lessons · Independent day folders; each lesson is self-contained
- Days 1-4 · Intro, type system basics, arrays/tuples, objects and aliases
- Days 5-17 · Functions, unions, assertions, literals, interfaces, classes, generics, guards, OOP
- Days 18-21 · Imports, project structure, DOM, events, forms, propagation
- Days 22-24 · Async TypeScript, fetch typing, and advanced error handling
- Days 25-28 · Advanced type patterns, utility types, performance, design patterns
Build boundary
Repeated source-to-output compilation pattern across lessons
- Source lesson · Representative lesson source file pattern used across days
- Compiler config · Per-lesson TypeScript compiler boundary
- Compiled output · Generated JavaScript, declaration files, and source maps
- Lesson notes · README files inside lesson folders provide topic guidance
Runtime contexts
Browser-oriented and Node/npm-specific lesson environments
- Browser lessons · Lessons that rely on browser APIs and event-driven interaction
- Node/npm lesson · Lesson 18 includes a local npm project inside the lesson folder
Special setup
Outlier lesson with nested npm project structure
- Day 18 package · Local package.json and package-lock.json embedded in the lesson
day-18–Modules, Imports(Exports & Project Structure)/src/package.json - Package lock · Lockfile for the nested lesson package
day-18–Modules, Imports(Exports & Project Structure)/src/package-lock.json - Installed deps · Nested dependency directory for the module/import lesson
day-18–Modules, Imports(Exports & Project Structure)/src/node_modules
Connections 27
- README → Daily lessons: describes · The landing README introduces the curriculum structure
- TypeScript art → README: illustrates · Hero image supports the root documentation
- Daily lessons → Days 1-4: contains · Top-level lesson progression starts with fundamentals
- Daily lessons → Days 5-17: contains · Middle lessons expand the type system and OOP concepts
- Daily lessons → Days 18-21: contains · Later lessons shift into modules and browser interaction
- Daily lessons → Days 22-24: contains · Async, fetch, and error-handling lessons form another phase
- Daily lessons → Days 25-28: contains · Final lessons focus on advanced patterns and best practices
- Daily lessons → Lesson notes: uses · Each daily folder includes a lesson README
- Daily lessons → Source lesson: standardizes on · Most lessons center on a single source entrypoint pattern
- Daily lessons → Compiler config: builds with · Each lesson uses its own TypeScript compiler configuration
- Source lesson → Compiler config: compiled by · Source files are processed through the lesson compiler config
- Compiler config → Compiled output: emits · Compiler output produces JS, types, and maps in most days
- Days 1-4 → Source lesson: implements · Early days use the standard source pattern
- Days 5-17 → Source lesson: implements · Core language lessons follow the same source/build shape
- Days 18-21 → Browser lessons: runs in · DOM and event lessons depend on browser APIs
- Days 22-24 → Browser lessons: often runs in · Fetch and async examples may execute in browser-like contexts
- Days 25-28 → Source lesson: implements · Advanced lessons still use the same lesson entrypoint pattern
- Days 18-21 → Node/npm lesson: includes · Day 18 adds an actual npm package environment inside the lesson
- Node/npm lesson → Day 18 package: defines · Nested package.json marks the special lesson boundary
- Node/npm lesson → Package lock: pins · Lockfile captures the local package state
- Node/npm lesson → Installed deps: installs · Nested dependencies are committed for the lesson environment
- Day 18 package → Source lesson: hosts · The module lesson still centers on TypeScript source
- Compiled output → Days 1-4: appears in · Most early lessons commit compiled artifacts
- Compiled output → Days 5-17: appears in · Compiled outputs are common across the middle lessons
- Compiled output → Days 18-21: appears in · Browser/module lessons also commit generated files
- Compiled output → Days 22-24: appears in · Async and API lessons include built outputs
- Compiled output → Days 25-28: appears in · Later lessons continue the same output pattern