MCPcopy Index your code
hub / github.com/angelsolaorbaiceta/fe-fwk-book

github.com/angelsolaorbaiceta/fe-fwk-book @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
612 symbols 1,553 edges 250 files 72 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build a frontend framework from scratch

fe-fwk

Learn how frontend frameworks work by building your own—from scratch!

Code for the book "Build a web frontend framework (from scratch)," published by Manning and written by myself. In this book, you build a frontend framework yourself to learn how frontend frameworks work.

Build a frontend web framework

📘 Purchase your copy of the book here and start learning today!

Table Of Contents

The first three parts of the book are published by Manning:

The last two are freely available in the repository's Wiki:

Getting Started

To create an empty project where you can write the code for your framework, you can use the CLI:

$ npx fe-fwk-cli init my-framework-name

Where my-framework-name is the name of your framework. You can alternatively create and configure the project manually, by following the instructions at Appendix A in the book.

The project that you get contains three packages:

  • runtime: the runtime for your framework; the framework itself.
  • compiler: the compiler that transforms HTML templates into JavaScript render functions.
  • loader: the Webpack loader that integrates the compiler with Webpack.

Scripts

The three packages have the same scripts:

  • build: bundles the code into a single ESM file, located at the dist/ folder.
  • lint: lints the code with ESLint.
  • lint:fix: lints the code with ESLint and fixes the errors.
  • test: runs the tests once with Vitest.
  • test:watch: runs the tests in "watch" mode with Vitest.
  • test:coverage: runs the tests and generate a coverage report.

Core symbols most depended-on inside this repo

h
called by 749
packages/runtime/src/h.js
hFragment
called by 136
packages/runtime/src/h.js
defineComponent
called by 77
packages/runtime/src/component.js
mountDOM
called by 76
packages/runtime/src/mount-dom.js
hString
called by 74
packages/runtime/src/h.js
defineComponent
called by 43
listings/ch13/listing_02.js
mount
called by 41
packages/runtime/src/component.js
updateState
called by 40
listings/ch09/listing_07.js

Shape

Function 405
Method 133
Class 74

Languages

TypeScript100%

Modules by API surface

packages/runtime/src/router.js26 symbols
packages/runtime/src/component.js25 symbols
packages/runtime/src/utils/arrays.js19 symbols
packages/runtime/src/patch-dom.js12 symbols
listings/ch10/listing_12.js12 symbols
packages/runtime/src/route-matchers.js10 symbols
examples/ch13/todos/todos.js10 symbols
packages/runtime/src/h.js9 symbols
listings/ch09/listing_06.js9 symbols
listings/ch09/listing_04.js9 symbols
examples/ch12/todos/todos.js9 symbols
listings/ch09/listing_07.js8 symbols

For agents

$ claude mcp add fe-fwk-book \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page