Choosing a path: what to learn next for frontend, backend, or tooling
Put everything Bonus A showed on one map of where TypeScript runs, tell frontend, backend and tooling apart by who uses what you build, choose one by trying an evening of each on TaskKit, and leave with what to learn next on your path.
TypeScript
Choosing a path: what to learn next for frontend, backend, or tooling. Read this lesson at .
Tested with TypeScript 7.x · Node.js LTS
You open a page of job listings, and three of them catch your eye. The
first asks for "React, Vite, components and state". The second wants
"Node.js, request handlers, JSON" (JavaScript Object Notation, the
text a server answers with). The third says "build tools, linters,
checks on every pull request, packages to publish". A few months ago
half of those words meant nothing to you. Now you have used every one
of them on TaskKit: you drew it on a page, answered its requests from
a server, and published it as a package.
Those three listings are three paths through TypeScript work: frontend,
what people see and click; backend, the server behind it; and tooling,
what other developers run. In this lesson you put everything Bonus A showed
you on one map, see which part of it each path lives in, try one evening on
each, and come away with a short list of what to learn next on the path you
pick.
The map of where TypeScript runs
Bonus A took one language to many places, one lesson at a time. Put
together, they make a map. Your TypeScript sits in the middle, checked
by tsc, the TypeScript compiler, and by Biome, the linter and
formatter of lesson A2.2; many other projects use ESLint with
typescript-eslint and Prettier for the same two jobs (lesson A2.3).
Around it are the places it runs: a browser, a server, a phone or a
desktop, and scripts on your own computer. Between the middle and each
place are the tools and steps that take it there. Vite, GitHub, which
also runs CI (continuous integration, the checks that run on every
pull request), and npm (the Node package manager) have cards of
their own; the other tools are the labels on the lines. Press Next
step to walk the lines one at a time, or let it play:
PagesBrowser
DataServer
AppsPhone,desktop
BuildsVite
Your codeTypeScript
ToolsScripts
Git, CIGitHub
Packagesnpm
Your TypeScript in the middle, the places it runs round it,
and the tools that take it there
All 7 steps shown.Step 1 of 7: TypeScript calls GitHub — pushStep 2 of 7: TypeScript calls Vite — buildStep 3 of 7: Vite calls Browser — distStep 4 of 7: TypeScript calls Server — NodeStep 5 of 7: TypeScript calls Phone, desktop — Electron, ExpoStep 6 of 7: TypeScript calls Scripts — npm linkStep 7 of 7: Scripts calls npm — publish
All 7 steps shown.
Most lines are a lesson you did. Every change goes up to GitHub, where CI runs
tsc, Biome and the tests (lessons A2.1 and A2.5). Vite builds the page into
dist, the files a browser loads (A2.4). Node, Deno or Bun run the server
(A1.3). Electron puts your page in a desktop window, and React Native draws
your components with the phone's own buttons and text (A1.5). npm link made
TaskKit a command on your computer (A1.6), and npm publish sent it to
everyone else's (A2.6 and A2.7). Lesson A1.7 added two more ways to run, not
drawn here: cron starts your scripts at set times, and a serverless function
is a handler that a platform runs for you whenever a request arrives.
What changes from place to place is what the code may touch. A page has
document and no disk. A server has the disk and no screen. A command
has your terminal and its working directory.
Three paths through the map
Nobody works on the whole map at once. You get good at one part of it
first, and one question tells the parts apart: who uses what you build?
Frontend
Does: Builds what people see and click: pages, forms, apps
Does: Lessons A1.1, A1.2, A1.5 and A2.4 were this path
Backend
Does: Answers requests, and keeps the data right and safe
Does: Lessons A1.3, A1.4 and A1.7 were this path
Tooling
Does: Builds what other developers run: commands, packages, CI
Does: Lessons A1.6 and Part 2, A2.1 to A2.7, were this path
Three paths through the map, told apart by who uses what
you build
On the frontend path, the users are people: with a mouse, with a
finger, or with a screen reader, the program that reads a page aloud to
someone who cannot see it. Your day is spent on what they see: a list
that redraws when the state changes, a form that says what is wrong
before it sends anything, a page that works on a phone. TypeScript
checks that every component gets the props it needs, as TaskCount did
in lesson A1.2.
On the backend path, the users are other programs: the page, the
phone app, someone else's script. Nobody sees your work, and everybody
notices when it is wrong. Your day is spent on requests and data: what
a route answers, what happens when the body is not a task, where the
tasks are stored so that a restart loses none. TypeScript checks your
handlers, and the checks at the edge, as in lesson A1.3, catch what
arrives from outside.
On the tooling path, the users are other developers, often your own
team. Your day is spent on what they run all day without thinking about
it: a command, a package, a tsconfig.json that fits the project, a CI
workflow that tells them in two minutes what broke. TypeScript is both
your language and one of the tools you look after.
Every path uses the tooling path's work every day: whatever you build,
you run the check, commit with Git and wait for CI. On the tooling
path you are the one who sets them up.
The borders between the paths are soft, and two lessons sit on a
border. A2.4 is on both the frontend and the tooling path: Vite is a
tool, and what it builds is a page. A1.4, listed under backend above,
was full-stack work, both the page and its server, and full-stack
developer is a job of its own. On a small team, everyone may do a
little of the tooling. A path is not a room you are locked in; it is the
part of the map you get good at first.
One type on every path
The middle of the map is the same on every path, and you can see it in
code. Here is one Task and three small functions, one for each path:
the text of an item in the page's list, the server's answer to
GET /tasks, and the line the taskkit command prints. Press Run:
Three jobs for three different users, and every one of them reads the
same Task. The types, the narrowing, the check and the questions at
the edge carry over from path to path; what is new on a path is its
place on the map and the tools that live there.
Try one evening on each path
Reading about a path tells you little about whether you will enjoy it.
Doing a small piece of its work tells you a lot. So before you choose,
give each path one evening, on TaskKit, starting from where Bonus A
left it. Pick a tab, and switch tabs on the next evening:
Open the Vite page from lesson A2.4 and start the dev server with npm run dev. In App.tsx, keep the tasks in state, each with a title and a done,
and draw each one with the TaskItem you wrote in lesson A1.2's last
exercise. Then add a button that hides the tasks that are done, and shows them
again on the next click: one more piece of state, a boolean, and filter on
the list before it is drawn.
You are on the right path if you liked watching the page change as you
saved, and you kept wanting to fix how it looks.
Open the server from lesson A1.3. Make POST /tasks refuse a task
whose title is already in the list: answer 400, with a message that
says why. Then send it the same task twice, and a title of spaces only,
and decide what each should get back.
You are on the right path if you liked thinking about every request
that could arrive, and the moment the answer was exactly right.
Open TaskKit's command from lessons A1.6, A2.6 and A2.7. Add a command,
taskkit count, that prints how many tasks are left, and make it end
with exit code 1 when the list cannot be read (lesson A1.6). Do it on a
branch, add it to the README, push it and open a pull request (lesson
A2.1), and check that its CI passes (A2.5).
You are on the right path if you liked that one small command will save
someone else a minute every day, and you cared that the README and CI
were right.
After three evenings, ask yourself one question: which one did you not
want to stop? Not which was easiest, and not which pays best this year,
but which problem you kept thinking about when you were done. That is
the path to go deeper on first.
What to learn next
On every path, the first next step is the same: if you have not done
Level 2: Practical TypeScript, do it first once it is out (it is
not published yet; see below). Every path uses its narrowing, generics
and checks at the edge every day. After it, each path has its own
list. The Bonus B parts are this course's catalog of libraries, each
lesson one library or two and what they are for. Level 2, Level 3 and
Bonus B are not published yet: their lessons are being written, and
the names below are the ones they will have. Until then, the links
marked Outside this course are where to start.
Bonus B, UI Ecosystem, UI meaning user interface: TanStack
Query for data from a server, Zustand for state many components
share, React Hook Form for forms.
Bonus B, Testing: Playwright, which clicks through your page in
a real browser, and MSW (Mock Service Worker), which stands in
for the server in tests.
Level 2, Module 7, Designing with Types: a request as loading,
success or error, which is how every page that waits for data is
written.
Outside this course: React's own guide,
Quick Start, Vite's
guide, and
Learn web development
from MDN (once the Mozilla Developer Network), Mozilla's web
documentation. It teaches HTML (HyperText Markup Language, the
text of a page) and CSS (Cascading Style Sheets, how it looks),
which this course does not.
Bonus B, Web Servers: Express, Fastify, Hono and NestJS, four
ways to write the handlers of lesson A1.3 for a real application.
Bonus B, Databases: Prisma and Drizzle, which give TypeScript
types to the tables of a database, where a server keeps its data.
Bonus B, Server Essentials: Pino for logs, and jose for the
tokens that say who sent a request.
Level 2, Module 11, Data at App Boundaries: checking everything
that arrives, which a server does on every request.
Outside this course: Node.js's own
Learn pages, and the guide to
HTTP from MDN.
HTTP (HyperText Transfer Protocol) is the set of rules every
request and answer follows.
Bonus B, Command Line and Scripts: @inquirer/prompts for
questions in the terminal, and execa for running other programs.
Level 2, Module 13, How TypeScript Finds and Runs Code: how
import finds the file it names, and building with tsc, the
settings behind every tsconfig.json you have copied.
Level 3, Modules 14 to 16: sharing types in a package, keeping
the check fast, and projects too big for one tsconfig.json.
Learn one item at a time, and build something with it before you move
to the next. A library you used once on TaskKit stays with you; a list
of ten you read about does not.
Predict before you run
Here is the tooling path's function from paths.ts again, given a task
that is done.
Predict
What does this program print?
The common mistake: a page that reads the disk
The places on the map have different powers, and people who move to a
new path trip on that first. A frontend developer wants the page to
show the tasks in tasks.json, a JSON file, and reaches for what
Level 1 taught for reading a file. Lesson A1.4 met the error the check
gives and warned against the way out it suggests. Here is what happens
to the page when you take it anyway.
Common mistake
Silencing TS2591 by adding node to the page's types
In the Vite project of lesson A2.4, a new file in src:
npm run build stops at the check. Long lines are broken to fit, as in
lesson A2.4; the message is one line in your terminal:
Add "node" to types in tsconfig.app.json, as the message says,
and the check passes: Vite's template already installed @types/node
for vite.config.ts (checked with create-vite 9.4 on 26 November
2026; templates change). The check now believes the page has Node.
Then start the dev server with npm run dev and call loadTasks from
App.tsx. As soon as the page imports src/tasks.ts, the page stops,
and the browser's console (lesson A2.4) shows the error above, after
Uncaught Error: and before a link to Vite's troubleshooting page.
Module "node:fs/promises" has been externalized for browser compatibility. Cannot access "node:fs/promises.readFile" in client code.
The fix
Leave types as Vite wrote it, ["vite/client"]. A page has no disk
to read: reading the file is the server's job. The same function moves
to the server of lessons A1.3 and A1.4, in its own folder with its own
tsconfig.json, where node belongs in types:
The server's handler answers GET /tasks with what loadTasks read,
and the page asks the server for it, as the page of lesson A1.4 did. A
real page on another port also needs the server to allow its address
with an Access-Control-Allow-Origin header, as in lesson A1.4's
footnote.
TS2591 inside src means the page is reaching for something only Node
has. The code may be right; it is in the wrong place on the map. Ask
which place should do the work, and move the code there, instead of
adding the types that silence the check.
Pass all four tasks to complete the lesson with practice. Reach the end without them and it counts as read only.
Exercises
Each exercise is checked in your browser. One asks which path a piece
of work is on, one writes who uses each path, and two are about what
each place on the map may do.
Recap
Recap · 3 questions
Check yourself
On the map, what takes a page's TypeScript to the browser?
Check yourself
How does this lesson say to choose a path?
Check yourself
Which of these does every path use?
0 of 0 answered.
A cheat sheet to keep
Cheat sheet
Choosing a path
What things are
Word
What it means
Frontend
Pages and apps; used by people
Backend
Servers that answer requests; used by other programs
Tooling
Commands, packages and checks; used by other developers
Path
The part of the map you get good at first
What to learn next
Path
Next
Every path
Level 2 first
Frontend
Bonus B's UI Ecosystem and Testing; react.dev
Backend
Bonus B's Web Servers, Databases, Server Essentials
Tooling
Level 2 Module 13; Level 3 Modules 14 to 16
Rules
Rule
What it means
Choose by trying
One evening on each path, on TaskKit
The language carries over
Only the place and its tools are new
A page has no disk
Ask the server; no node in the page's types
One item at a time
Build something with it before the next
Bonus A on one page
Cheat sheet
Bonus A: TypeScript in the Real World
A1.1 In the browser
Code or rule
What it means
["es2023", "dom"]
Check code that runs in a browser
querySelector("#add")
Find by id: Element | null
instanceof
Check an element's type on the page
addEventListener
Call a function on every click
A1.2 UI frameworks and React
Code or rule
What it means
interface Props {…}
Say what a component takes
useState<string[]>([])
Make state, with its type
setTasks([...tasks, text])
Replace the state with a new list
Draw from the data
Change the state, never the page
A1.3 On the server
Code or rule
What it means
(request: Request)
Type a handler; it returns a Response
Response.json(tasks)
Answer 200 with JSON
let body: unknown
Keep the body until it is questioned
201, 400, 404
Created, bad request, not found
A1.4 Full-stack: sharing types
Code or rule
What it means
export interface Task {…}
Write the type once, in
Where to go next
You can now find any piece of Bonus A on one map, tell the three paths
apart by who uses the work, and choose one by trying it rather than by
reading about it. You also know the first thing to learn on each.
That closes Bonus A. Bonus B comes next and is not published yet; it
will start with How to use this catalog, and the questions to ask
before adding any dependency, which shows how to tell a good library
from one you will regret before you add the first one your path needs.
Before you move on, give each path its evening, in any order, and
after each one write down what you wanted to do next.
shared/task.ts
parseTasks(data)
Check the server's answer on the page
npx tsc -p server
Check the server with its tsconfig.json
One type, two checks
A change fails on every side that uses it
A1.5 Mobile and desktop apps
Code or rule
What it means
React Native
React for phones, with native components
Electron
Your page in a desktop window, with Node beside it
Bridge
What the preload gives the page: window.taskkit
The page asks, main does
Only the main process touches the disk
A1.6 Scripts and command-line tools
Code or rule
What it means
process.exitCode = 1
End with 1 once the script is done
"name", "bin"
Name the package, and its command and file
npm link
Make that command work in every folder
import.meta.dirname
The folder of the running file
A1.7 Automation and serverless functions
Code or rule
What it means
0 0 * * *
cron's time: minute, hour, day, month, weekday
satisfies ExportedHandler
Check the handler against Cloudflare's type
"tsc && wrangler deploy"
Check before every upload
A copy may be new
Nothing in memory lasts between requests
A2.1 Git and GitHub
Code or rule
What it means
git switch -calmost-full
Make a branch and move onto it
git revert --no-edit 1df6245
Undo a pushed commit with a new one
gh pr create --fill
Open a pull request for this branch
gh pr merge --merge--delete-branch
Merge it and delete the branch
A2.2 Linters and formatters: Biome in TaskKit
Code or rule
What it means
"lint": "biome lint ."
Check every file against the rules
biome format --write .
Lay out every file and save it
"noFloatingPromises"
Set it to "error", under "nursery"
Four commands before a commit
check, lint, format and test
A2.3 typescript-eslint and Prettier
Code or rule
What it means
npx eslint .
Report every likely mistake
npx prettier --check .
List the files Prettier would change
typescript@npm:…typescript6
TypeScript 6 under the name typescript
Files name the tools
biome.json, eslint.config.mjs, .prettierrc
A2.4 Bundlers and dev servers (Vite)
Code or rule
What it means
npm run dev
Serve the page at localhost:5173
npm run build
tsc -b, then vite build into dist
npm run preview
Serve dist at localhost:4173
The page is not a check
The dev server strips types, never reads them
A2.5 CI: running your checks on every pull request
Code or rule
What it means
pull_request:
Under on: every pull request and its new commits
run: npm ci
Install exactly what package-lock.json names
gh run view --log-failed
Read what the failed step printed
Red in CI, green at home
Something is not in Git: run git status
A2.6 A package for npm
Code or rule
What it means
"files": ["dist"]
Pack only the build; Biome puts it on three lines
npm install -g ./ana-taskkit-1.0.0.tgz
Install it as she will
Try the tarball first
The one step that runs it as she will
A2.7 Publishing a package to npm
Code or rule
What it means
npm publish
Send the package to the registry
npm version patch
Raise the version, commit it and tag it
A version is used once
A fix needs a new number
A3.1 Choosing a path
Code or rule
What it means
Frontend
Pages and apps; used by people
Backend
Servers that answer requests; used by other programs
Tooling
Commands, packages and checks; used by other developers
The language carries over
Only the place and its tools are new
Exercise · Read the code
Which path is this ticket
A ticket on TaskKit's GitHub says: "Add a taskkit list --json
command, so our team's scripts can read the list." It would print the
list as JSON. Which path is this work?
Exercise · Read the code
After the check passes
In the Vite page's tsconfig.app.json you add "node" to types, and
npm run build passes. The page imports a file that calls readFile.
What happens when you open the page with npm run dev?
Part of the outputtext
src/tasks.ts:1:26 - error TS2591: Cannot find name 'node:fs/promises'.Do you need to install type definitions for node? Try `npm i--save-dev @types/node` and then add 'node' to the types field in yourtsconfig.
handle.ts
Response.json(tasks)
package.json (part)
"name": "@ana/taskkit","version": "1.0.1",
paths.tsts
interface Task { title: string; done: boolean;}const task: Task = { title: "Buy milk", done: false };// Frontend: the text of one item in the page's listfunction itemText(task: Task): string { return task.done ? `✓ ${task.title}` : task.title;}// Backend: the server's answer to GET /tasksfunction answer(tasks: Task[]): Response { return Response.json(tasks);}// Tooling: the line the taskkit command printsfunction line(task: Task): string { const status = task.done ? "done" : "todo"; return `[${status}] ${task.title}`;}console.log(itemText(task));console.log(await answer([task]).text());console.log(line(task));
import { readFile } from "node:fs/promises";export async function loadTasks(): Promise<unknown> { const text = await readFile("tasks.json", "utf8"); return JSON.parse(text);}
server/tasks.tsts
import { readFile } from "node:fs/promises";export async function loadTasks(): Promise<unknown> { const text = await readFile("tasks.json", "utf8"); return JSON.parse(text);}
Exercise · Write the code
Who uses each path
Path names the three paths, and usedBy should say who uses each
one, as the section on the three paths did: "people",
"other programs" and "other developers". Fill in the two that are
missing, and print one line for each path, in the order of the type.
Loading the editor…
Exercise · Fix the error
A server with no screen
This handler answers GET /tasks, and also tries to update a count on
the page. A server has no page, so it cannot run. Make it do only the
server's job, and keep the last two lines as they are.