The Library
a Vantage field guide,
in nine chapters
for anyone who ever loved a library
Contents
read in order, or turn straight to the chapter you need.
Your first app · a story in nine chapters
A little library still runs on paper cards — and you're going to fix that. Build a real app with Vantage UI and an AI assistant: no code, one story, every feature on the way through.
a Vantage field guide,
in nine chapters
for anyone who ever loved a library
read in order, or turn straight to the chapter you need.
The Hollow Lane Library keeps its whole world in a cabinet of little wooden drawers. Every book, every member, every loan — a paper card. It worked for eighty years, right up until it didn't: cards wander off, copies vanish, and nobody can say whether The Left Hand of Darkness is on a shelf, in a bag, or under somebody's bed.
You have a plan. The library is getting a real system, and you're going to build it yourself — this notebook is the guide.
First, the tools. Vantage UI is a native app: it runs on your machine and talks straight to your data. Nothing gets sent anywhere you didn't point it at.
Vantage runs on the Mac today; Windows, Linux and Web builds are on the way.
that's the whole install. chapter one: done.
Every catalogue starts empty. When Vantage opens, it greets you with a welcome
screen — choose Create New Project… and pick a fresh folder. Call it
library.
Vantage fills the folder with four drawers, and they'll feel familiar — they're the card catalogue's drawers, reborn:
datasource/ where the data lives
table/ what kinds of things exist
page/ what you see on screen
menu/ how you move around
Everything in them is plain YAML text. You can read it, change it, and keep it in git like any other work worth keeping.
Open the folder and look around. Each drawer holds a README.md explaining what
belongs inside — the notebook within the notebook.
already keep a project in git? git clone it, then use Open Project… and point at its folder.
You could write all that YAML by hand. You could also alphabetise eighty years of loan cards by hand. Neither is the plan.
Open a terminal in your library folder and start Claude Code —
or whichever coding agent you keep around. The project already carries agent skills:
instructions that teach your assistant exactly how Vantage projects work.
From here on, the rhythm is: you describe, the assistant writes, Vantage hot-reloads. You stay the librarian-in-chief; the assistant is the world's fastest typist.
Have a look around this Vantage project. What's here so far, and what can you help me build?
keep the app and the terminal side by side — changes appear the moment they're saved.
A catalogue needs somewhere safe to keep its records. The library has one waiting: a SurrealDB database in the cloud, already set up for this story.
A datasource is the connection card — one small YAML file that says where the data
lives and how to reach it. Secrets never go in the file itself: they live in the project's
.env, and the YAML refers to them as ${VARIABLES}.
Hand your assistant the connection below and let it write the card.
Create a SurrealDB datasource called library pointing at this instance:
url: wss://YOUR-INSTANCE.surreal.cloud
namespace: main
database: library
Put credentials in .env, not in the YAML.
The demo instance address and credentials for this tutorial will appear here.
green dot = connected. the library has a memory now.
Here's the first real librarian's insight, and it's subtle: “a book” means two different things. There is the title — Ursula K. Le Guin, 1969 — and there are the three battered copies of it on the shelf.
So we keep two tables. book holds the idea: title, author, year. physical_book
holds the objects: barcode, shelf, and which title each copy belongs to. Three copies, one book —
no card ever written twice.
A table file lists its columns and their types. A page file puts a table on screen. Ask, and both appear.
Create a book table (title, author, year, isbn) and a physical_book table (barcode, shelf, acquired_on) where each copy references its book. Add pages for both and put them in the menu.
say “add a few classic sci-fi books” — the assistant will happily stock the shelves.
A library isn't a list — it's a web. A member takes out a loan; the loan points at one physical copy; the copy belongs to one title. Four tables, holding hands.
In Vantage these are references: a column in one table that points at a row in another. Declare them, and the app understands the web — click a member and walk to their loans, from a loan to the exact copy, from the copy to its title.
This is the moment the drawers stop being drawers. Paper cards can't follow a thread; your catalogue now can.
Add a member table (name, email, joined_on) and a loan table. A loan belongs to one member and one physical_book, with borrowed_on and due_on dates. Show a member's loans when I open a member.
references are the plot of this whole book. everything else is set dressing.
Miss Odessa inspects returned books the way a jeweller inspects stones. Your columns can be just as particular.
Give each copy a condition that is a choice, not free text:
mint → good → worn → retired. Dates should be real dates. And a loan is never deleted
when a book comes back — returned_on simply gets filled in. An empty
returned_on is the definition of “still out”, and the filled ones are your
history, kept forever.
Columns can also compute: a little Rhai expression can mark a loan overdue by comparing
due_on with today — the table does the judging for you.
Give physical_book a condition dropdown: mint, good, worn, retired. Add returned_on to loans, and an is_overdue computed column — highlight overdue loans in red.
good data is opinionated data. dropdowns beat “pretty ok??” every time.
Tables answer questions one row at a time. Some questions are bigger: What do people actually borrow? Which shelves are wearing out? Was the summer reading club a hit?
For those, Vantage gives you charts and dashboards — pages that draw their answer instead of listing it. Loans per month as a line. Top titles as bars. Conditions as a pie you can worry about.
And views compose richer detail screens: a book's summary card — cover, copies, current borrowers — assembled from the web of references you built in chapter six.
Make a dashboard page: loans per month as a line chart, ten most-borrowed titles as bars, and a pie of copies by condition. Put it first in the menu.
this is the page Miss Odessa will leave open on the front desk all day.
One ritual remains. When a member borrows a book, Miss Odessa doesn't edit three cards — she stamps one. Your app deserves the same single, confident gesture.
Actions are buttons with meaning. Check out on a copy: pick the
member, and a loan appears, due in three weeks. Return on a loan: stamp
returned_on, and nudge the copy's condition if the river got to it.
Send to repair: worn becomes good again. Each action is a
few lines of Rhai in the inventory — written, of course, by your assistant.
And with that, the drawers close for the last time. The Hollow Lane Library runs on your app now — every copy accounted for, every loan remembered, every question one click away. Miss Odessa stamps the final paper card and pins it to the wall. For the museum, she says.
Add a "Check out" action on physical_book: choose a member, create a loan due in 21 days. Add "Return" on loan: set returned_on to today and ask about the copy's condition.
nine chapters. zero code. one very relieved librarian.
— and the beginning of your library.
Your library app is a folder of YAML — read it, commit it, share it. When you're ready for more:
thank you for reading. come back any time —
the library never really closes.