Contents
When you visit this site, it’s just a static blog. The unusual part is how it’s built and hosted. The content, the builder code and an AI assistant all live in one SQLite file, which you can share like a spreadsheet.
One file
The archive has two directories, and where a file lives says what it is:
app/- the site itself. The generated HTML pages, the CSS, the build scripts, and vendored libraries.data/content/- the source. Markdown files with frontmatter, and any.vuecomponents a post uses.
Nothing renders when you request a page. A build reads data/content/, renders everything, and writes finished HTML into app/. Visitors get plain pages that crawlers can read, and JavaScript is optional.
The build runs in your browser
The builder (js/build.js) is just another static file. When you open the site in the uapp editor shell, it registers a few named actions (build_site, build_page, list_pages). The admin UI and the AI assistant both call those, so a page builds the same way whether I click the button or ask the assistant.
A build goes roughly like this:
- Read every Markdown file under
data/content/and parse its frontmatter into a page graph. - Render the Markdown to HTML with markdown-it, and look for custom components.
- For pages with components, compile each Vue SFC with the real
@vue/compiler-sfcand server-render it with Vue’s SSR renderer. In the browser. - Wrap the result in the site layout (title, table of contents, footer, styles) and write it to
app/<slug>/index.html.
Pages without components ship no JavaScript. Pages with them get a small hydration script so the components work after load.
The pages are live in the editor
The components below are ordinary Vue islands. When this page runs inside the uapp shell, they use the same tools the assistant does. If you’re reading it as a regular visitor, you’ll just see placeholders.
Reading the database
uapp.query(sql) runs read-only SQL against the archive. This one counts the files and bytes in the sqlar table the site is stored in:
Calling the site’s actions
uapp.call(name, input) runs one of the builder’s actions. This one calls list_pages, which is what the assistant uses to check what’s built:
Running your own SQL
The page has every tool the assistant has, so you can type your own SQL and run it here. uapp.query is read-only, and the backend rejects anything that writes:
Writing to it
uapp.exec(sql, params) does a real write. It’s logged and synced to every user’s device. This guestbook is backed by a real demo_notes table in the site’s database. Leave a note in one editor window and the list updates in the other. (The onChange demo below ticks too.)
Who’s asking
Every uapp call is attributed. uapp.user and uapp.device say who made it and from where:
Reacting to other people’s edits
uapp.onChange(cb) fires whenever anyone’s write syncs to your device. Open this page in two editors and rebuild in one:
Stale pages
The admin page (“Site map” in the footer) compares modification times in the archive. A page is stale when its Markdown, or any component it uses, is newer than its output. There’s no separate metadata database.
Why bother?
It makes editing really simple. “Make the site dark mode and write a post about it” is one request against one file. The assistant edits the CSS and the Markdown and runs a build, and the output is the deployed site. If I send the file to someone, they get the content and the tooling.
That’s how the pages you’re reading were made.
