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 tutorialWhy 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
- HTTP & APIs
- Design Patterns
- Software Design Principles
- Error Handling & Structured Logging
- Software Testing Fundamentals
Recommended on Backend Engineer and Software Architect.
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.
- Checkpoint 1Self-check
Router
Done when:
GET /users/:idandPOST /usersreach different handlers, the id reaches its handler, unknown paths return 404 and wrong methods return 405. - 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.
- 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.
- 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.
Step-by-step guides
Pick one in a language you know (tutorial languages: PHP, Node.js, Python). They open on the author’s site.
- Node.js
lets-build-express(external site)
Node.js: rebuilds Express's router and middleware step by step.
- PHP
Modern PHP Without a Framework(external site)
PHP: assembles a framework from small libraries, with a good section on dependency injection.
- Python
Web application from scratch(external site)
Python: from sockets up to requests, responses and routing.
- PHP
Write your own MVC from scratch in PHP(external site)
PHP: a minimal MVC structure.
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.