The Spec — Part 2: Sketching the Data & API
maang.io AI-Native Builder Series
What is this?
Think about how a library works. There's a room full of shelves that hold the actual books — that's where the information lives. And there's a front desk where you go to do things: check out a book, return one, ask what you have on loan. You never wander into the back and rummage through the shelves yourself. You make a request at the desk, and the librarian fetches or files things for you, following the same rules every time.
Every app is built exactly like that library. The shelves are the data model — the organized place where all the information lives (your users, their habits, every "done" mark). The front desk is the API — the small set of requests the app knows how to handle ("create a habit," "mark this one done"). The web app and mobile app are just visitors at the desk; they never touch the shelves directly. They ask, the desk responds.
In this chapter you'll sketch both for StreakUp: the shelves (the data model) and the front desk (the API). This is the technical heart of 101 — and the exact thing 201 will build for real.
The one-line idea: an app is shelves plus a front desk — a data model that stores the information and an API that handles the requests for it — and the spec sketches both before anyone writes code.
A quick word before we start: this is a sketch, not a deep dive. You'll learn databases and APIs properly in 201 (the Data Modeling and Backend API topics). Right now you just need to plan them clearly enough to build. We'll define every new term gently as it shows up.
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson