Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Practice build · Servers and backend infrastructure

Build your own Web Framework

A small Express- or Flask-like framework: routing with path parameters, a middleware chain, request and response helpers, and one error-handling layer.

  • Intermediate
  • About 8–15 h
  • 4 checkpoints
  • 4 tutorials · PHP, Node.js, Python

Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.

Choose a tutorial

Why build it

Frameworks are easier to use well once you have built one. A router and a middleware chain show the patterns frameworks rely on, such as chain of responsibility and inversion of control, and where their trade-offs come from.

You will be able to

  • Match routes by method and path, with path parameters.
  • Compose middleware as a chain in which any step can short-circuit.
  • Keep framework code and application code apart behind clear interfaces.
  • Turn every failure into a consistent error response from one place.

Skills it exercises

Recommended on Backend Engineer and Software Architect.

Checkpoints

How you know you are there

Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.

  1. Checkpoint 1Self-check

    Router

    Done when: GET /users/:id and POST /users reach different handlers, the id reaches its handler, unknown paths return 404 and wrong methods return 405.

  2. Checkpoint 2Self-check

    Middleware

    Done when: Logging, JSON body parsing and an auth check run in order, and the auth step can stop the chain with 401.

  3. Checkpoint 3Self-check

    Errors

    Done when: An exception in any handler becomes a JSON error response from a single error handler, without a stack trace.

  4. Checkpoint 4Self-check

    Sample app and tests

    Done when: A small CRUD app built on your framework has a test for each route that runs without opening a network port.

Stretch goals

  • A small dependency-injection container.
  • Async handlers.
  • Plug in your own template engine.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: PHP, Node.js, Python). They open on the author’s site.

Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.

Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.