So far, each program you’ve written fits in one file. Bigger programs need files with one job each, and data that’s still there the next time they run. In this course, you’ll get both by helping Dana Reyes with her budget tracker.
Dana’s tracker starts as one script, with her expenses typed into the code. Every new expense means editing the program, and any change it makes to the data while it runs is lost once it ends.
By the end of the course, it’s a program in several files, each with one job, and her expenses live in a JSON file, a plain text file that holds data outside the code.
When she runs it, the tracker adds November’s expenses, totals her spending, and tries a what-if budget, a changed copy of her monthly limits. Its last line proves that the copy left her real budget alone:
Added 3 expenses for 2026-11
By category: { groceries: 174, transport: 90, utilities: 72, fun: 98 }
By month: { '2026-10': 271, '2026-11': 163 }
Left: { groceries: 334, rent: 1200, utilities: 88, transport: 45, fun: 112 }
What-if left: { groceries: 284, rent: 1200, utilities: 88, transport: 45, fun: 162 }
Real budget unchanged: true
What You’ll Learn
By the end of this course, you’ll be able to:
- Turn data into JSON text and back, fixing what JSON changes
- Save a program’s data in a JSON file and load it again
- Split a program into modules, with one job per file
- Predict how modules load and what their importers share
- Make deep copies and compare records value by value
- Build a program in several files that keeps its data in JSON
Before You Start
You should already be able to write small Node programs with functions, arrays, and objects, and copy objects with spread. If this is your first course here, you haven’t missed anything, because Dana’s story starts in this course.
You’ll need a terminal, any editor, and a current LTS version of Node. The examples in this course ran on Node 26.
How the Course Works
Lessons are text or short video, and you type along in the Node REPL and in your own scripts. Each of the first three sections ends with a coding exercise that runs in your browser and is checked by tests. Then you’ll build Dana’s tracker as a project, explain it in a chat with the course’s mentor, and take a quiz.
First up is a text lesson, Write Data as JSON Text.