a sheet is a database.
Your first database can be a Google Sheet. It is free with any Google account, you already know how to use it, and your site can read it. Below are the books I read while building unparty, read from a sheet. Ask them something:
These books are references to research I used at the start of building unparty. I have no relationship with their authors or publishers, I am not selling them, and they were not used to train any AI.
every filter is a question.
Each pill asks the same rows something different, the way you query a database: which books are missing a quote, which are written in all caps, which have a publisher, which are available. Fix a row in the sheet and the answer changes on your site. No code, no database to run.
this is a work in progress
Make it.
One row of headings, one row a book.
Publish.
Turn the sheet into a link.
Connect.
One line in .env.
Make it.
One row of headings, one row a book.
Success.your site reads your sheet.
1️⃣ Make the Sheet
Go to sheets.new to start a blank sheet. Type these headings across the first row, then one book per row under them. Only title and author are needed; leave any other cell empty.
title,author,quote,page,publisher,publisher link,available,conditionOr start from mine: download the sample, then in your blank sheet choose File → Import → Upload and pick the file.
2️⃣ Publish It
- In your sheet, choose File → Share → Publish to web
- Under Link, pick the tab that holds your books
- Change Web page to Comma-separated values (.csv)
- Click Publish, confirm, and copy the link it shows
The link ends in output=csv. Anyone who has it can read the sheet, so it only ever holds what your site shows anyway.
3️⃣ Connect It
Open .env in your copy and add the link on its own line:
BOOKS_SHEET_CSV_URL="https://docs.google.com/spreadsheets/d/e/your-link/pub?gid=0&single=true&output=csv"Open this article on your own site: under the table it now says read from your google sheet. For your live site, add the same line in Vercel under Settings → Environment Variables, then redeploy.
“Rows you can already edit, read by a site you own.”
— unparty-app
✍️ Write to It (Optional)
Reading needs nothing else. To add books from your site instead of the sheet, give your site its own Google account to write with, called a service account. It is free too.
- At console.cloud.google.com, create a project
- In APIs & Services, enable the Google Sheets API
- In Credentials, create a service account, then add a JSON key to it and download the file
- In your sheet, click Share and add the service account's email as an Editor
# The id is the long part of your sheet's address, between /d/ and /edit
GOOGLE_SHEETS_ID="your-sheet-id"
GOOGLE_SERVICE_ACCOUNT_EMAIL="client_email from the JSON file"
GOOGLE_PRIVATE_KEY="private_key from the JSON file"⚠️ Before You Rely on It
- Published means public — anyone with the link reads every cell. Keep emails, addresses and anything private out of it
- Edits take a few minutes — Google republishes the link, then your site reads it again every five minutes
- The first row is the headings — rename one and that column goes blank on your site
- The JSON key is a password — it goes in .env, which never leaves your computer, and in Vercel. Never in the sheet or in Git
🧯 If It Looks Wrong
- It still says sample sheet — .env was not saved, or npm run dev was not restarted
- The sheet did not answer — the link is not the published CSV one. It ends in output=csv, not /edit
- A column is empty — its heading is spelled differently. Check the first row
- add a book. never shows — writing needs all three Google lines in .env, and you signed in as yourself
- Adding says it could not write — the sheet is not shared with the service account email as an Editor
🌱 When You Outgrow It
A sheet is a great first database for a list you show: books, events, products, links. When your site needs sign-ins, private data, or people saving their own progress, that is a real database: create your database. This site's own /books page made that move and reads Postgres. Both work; pick the one your build needs.
🤖 Ask Your LLM
I keep a list of [what you keep] in a Google Sheet. Suggest the column
headings for it, one row per item, and which ones my site should filter by.
(In Claude Code, inside your copy)
Add BOOKS_SHEET_CSV_URL to my .env with this link: [paste it].
Then open /article/setup-google-sheet and tell me what the table reads from.✅ You Are Done When
- Your sheet has a row of headings and at least one book
- The table on this article, on your site, says read from your google sheet.
- Each filter shows the rows you expect, and a fix in the sheet shows up within a few minutes
- (Optional) Signed in, add a book. puts a new row in your sheet
“Start with the database you already have.”
— unparty-app