Your first app · a story in nine chapters

The Library

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.

scroll to beginarrow_downward

The Library

a Vantage field guide,
in nine chapters

for anyone who ever loved a library

chapter one

Getting the tools

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.

  1. Fetch Vantage UI from the download page.
  2. Open the disk image.
  3. Drag Vantage into your Applications folder, then launch it.

Vantage runs on the Mac today; Windows, Linux and Web builds are on the way.

Dragging Vantage into the Applications folder
dragging Vantage into Applications

that's the whole install. chapter one: done.

chapter two

A blank ledger

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.

The welcome screen with Create New Project
the welcome screen — create your project

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.

chapter three

A very fast assistant

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.

say to your assistant

Have a look around this Vantage project. What's here so far, and what can you help me build?

Claude Code opened inside the library project
your assistant, reporting for duty

keep the app and the terminal side by side — changes appear the moment they're saved.

chapter four

Opening the vault

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.

say to your assistant

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.

The datasource connected in Vantage
the vault, open

green dot = connected. the library has a memory now.

chapter five

Cataloguing the books

Here's the first real librarian's insight, and it's subtle: “a book” means two different things. There is the titleUrsula 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.

say to your assistant

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.

The book table rendered as a browsable page
the first table, alive on screen

say “add a few classic sci-fi books” — the assistant will happily stock the shelves.

chapter six

Everything is connected

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.

say to your assistant

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.

Drilling from a member into their loans
member → loans → copy → title

references are the plot of this whole book. everything else is set dressing.

chapter seven

Judging books by their covers

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.

say to your assistant

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.

Configuring the condition field as a dropdown
condition, as a proper dropdown

good data is opinionated data. dropdowns beat “pretty ok??” every time.

chapter eight

The whole library at once

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.

say to your assistant

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.

The library dashboard with charts
the library, at a glance

this is the page Miss Odessa will leave open on the front desk all day.

chapter nine

The librarian's stamp

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.

say to your assistant

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.

The Check out row action in the copies table
the stamp, reinvented

nine chapters. zero code. one very relieved librarian.

The End

— and the beginning of your library.

where the road goes next

Keep exploring

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.