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 · Developer tools and DevOps

Build your own Package Manager

A tiny npm: resolve version ranges from the registry, build the dependency tree, verify downloads and write a lockfile.

  • Intermediate
  • About 6–12 h
  • 4 checkpoints
  • 1 tutorial · TypeScript

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

Choose a tutorial

Why build it

Dependency resolution is a graph problem with security consequences. Building it explains lockfiles, version ranges, and why supply-chain attacks target installs.

You will be able to

  • Resolve semver ranges against registry metadata.
  • Build a dependency tree and handle conflicting versions.
  • Write a lockfile that makes installs reproducible.
  • Verify package integrity hashes before extracting.

Skills it exercises

Recommended on DevOps Engineer, Frontend Engineer and Cybersecurity Engineer.

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

    Resolve

    Done when: Given a package.json, your tool fetches registry metadata and picks a version that satisfies each range.

  2. Checkpoint 2Self-check

    Install

    Done when: Tarballs are downloaded, checked against their integrity hash and extracted into node_modules, and a small project runs.

  3. Checkpoint 3Self-check

    Lockfile

    Done when: A second install from the lockfile produces identical node_modules without resolving again.

  4. Checkpoint 4Self-check

    Conflicts

    Done when: Two dependencies that need incompatible versions of the same package both work.

Stretch goals

  • Parallel downloads with a local cache.
  • Refuse install scripts unless the package is allow-listed.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: TypeScript). 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.