L09 · Spec · 4 min
What is a database?
In one sentence
A database is an organized digital filing cabinet where your app remembers information between visits—such as user accounts, saved items, or orders—stored in structured tables on a server so the data stays safe even when visitors close their browser.
Think of it like this
Think of a spreadsheet cabinet in the back office: each drawer is a table (`users`, `recipes`), each column is a required field (`email`, `title`, `created_at`), and each row is a single record. Whenever someone saves a recipe, the backend files a new card in the right drawer.
How it works
Not every app needs a DefinitiondatabaseWhere your app remembers things between visits, like accounts or saved recipes.Open in the glossary →. A personal portfolio, a calculator, or a unit converter forgets everything when you refresh the page, and that is fine: no data stored means no database needed. You only add a database when your app must remember things across visits or across different people.
Inside a relational database (our stack uses Postgres hosted on Neon), information lives in tables. Each table has columns that define what kind of data is allowed (text, number, date, true/false) and rows for each saved item, so your app never stores messy or incomplete records.
Your DefinitionbackendThe part of an app that runs on a server: it keeps data, checks logins and talks to other services.Open in the glossary → connects to Neon using a single DefinitionsecretAnything that opens your accounts: API keys, passwords, tokens. Kept only in Vercel and `.env.local`.Open in the glossary → address stored in the DATABASE_URL Definitionenvironment variableA named slot, like `TOKENTIDE_API_KEY`, that holds a setting or secret outside your code.Open in the glossary →. When you connect Neon from your DefinitionVercelThe service that turns your code on GitHub into a live site, with a Preview for every change.Open in the glossary → project (Storage → Neon), Vercel sets DATABASE_URL online automatically, and your agent pulls a separate development connection into .env.local.
Just as DefinitionGitThe tool that keeps your repo's memory: it records every commit on your computer.Open in the glossary → has branches for code, Neon creates a separate database branch for local development and for each DefinitionPreviewA private test link Vercel makes for each change, so you can try it before it goes live.Open in the glossary →. That way, when you or your agent test adding or deleting items locally, you never touch real user data in DefinitionProductionThe live version of your app, the one everyone sees. It comes from `main`.Open in the glossary →.
What it looks like in your project
During ③ Spec, your agent asks what your app needs to remember. If nothing needs to be saved, it skips the database completely. If your app does need one, it waits until the plan reaches the database task, guides you click by click to connect Neon in Vercel, and writes safe, parameterized queries so user input can never tamper with your tables.
Copy for your agent
Based on my SPEC.md, tell me whether my app needs a database. If it does, list the tables and columns we need in plain words and confirm how we keep development data separate from production.
Quick check · 1 question