Skip to content
publr-orgPublic

About

Build and run websites and web apps with AI, by hand, or in code. One small binary, sandboxed plugins, runs anywhere

Resources

Stars

10 stars

Watchers

0 watching

Forks

Repository files navigation

Publr

Build and run enterprise-grade websites and web apps. With AI, by hand, or in code.
A full platform in one small binary: content, users, plugins and a real admin for all of it.
Every plugin sandboxed. Fast, accessible, SEO-ready pages by default. Runs anywhere.

Written in Zig macOS · Linux · Browser License: Apache-2.0 Status: early access

publr.app · Docs · Releases


The Publr admin listing a tea shop's products, the shop's storefront beside it, and an agent chat that turned the site into a shop

Agents, admin, code · Output · Admin · One contract · Sandboxed plugins · Code · Runs anywhere


🤖 Agent-ready

Bring any agent you like. It can build apps and plugins, model the schema and manage content: anything you can do, under your permissions.

⚡ Quality by default

Static pages with islands, optimized images, accessible and made for search. Nothing to configure. Just build.

🗂️ A real admin

Your data gets a proper home: content, structure, media, people and roles, made for the people who run the site every day.

🛡️ Sandboxed plugins

Every installed plugin runs sealed off, with only the access you grant. Inside one small binary: no extra server, no vendor cloud.


Work the way the task wants

Some changes are faster to ask for. Some are faster to click. Some you want to write and review yourself. Publr never decides for you: every part of it is open to every way of working.

Ask your agent Use the admin Write code CLI and API
Define content types and fields ✓ ✓ ✓ ✓
Write, edit and translate content ✓ ✓ ✓ ✓
Publish, review, roll back ✓ ✓ ✓ ✓
Add a shop, bookings, a newsletter ✓ ✓ ✓ ✓
Manage people and roles ✓ ✓ ✓ ✓

"Your agent" means whichever one you already use: Claude Code, Codex, Cursor or any other that runs commands. One skill teaches it Publr, and from there it builds apps and plugins, models the schema and manages content, with exactly the permissions you give it. Agents

Build the whole site with a prompt and fix one typo by hand. Design the schema yourself and let the agent fill in a hundred products. Script a change, then check it in the admin. All of it lands in the same place, under the same rules.

Just build. The output takes care of itself.

Whoever builds it, the agent or you, what comes out is fast, accessible and ready for search engines. Nothing to configure, no checklist to work through.

Static first

Every page is built to a plain HTML file and served as a file: instant to load, cheap to host, cacheable anywhere. The stylesheet is inline, holding only the classes the page uses.
A build folder of plain HTML files, one per page, with their sizes

Islands where it matters

What must be fresher than a file, or interactive, is an island: built once and shared, or rendered for each visitor. A component's script loads only where an island needs it.
A page with a per-visitor island, a shared island and an interactive part marked on it

Instant updates

When a record changes, only the pages that read it are rewritten. Live at once: no build queue, no cache to purge.
A publish that rewrote the two pages reading the changed record and left the rest untouched

Accessible and responsive

Semantic markup on components made to meet WCAG, usable by keyboard and screen reader, fitting every screen from a phone to a wide monitor.
The same card at phone and desktop width with visible focus rings, beside passing WCAG checks

Optimized images

Each image is resized on the server to the size the page asks for, as WebP, cropped around its focal point. Upload once, never export a thumbnail again.
One uploaded photo served at three requested sizes as WebP, cropped around its focal point

Made for search

Real HTML on every URL and a sitemap per app. With languages, each language's pages live at their own address, linked with hreflang.
A search result, the page's head with hreflang links, and its sitemap

A real home for your data

Your content is not rows in a database you inspect with a separate tool. Publr ships an admin built for the people who live with the site every day.

Content in forms or visually

One control per field, or a block editor for pages written like documents. Lists you can filter, sort and act on in bulk.
The content list: a status filter, search, and posts with their authors and statuses

Structure you can see

Content types, fields, taxonomies and their rules, made and changed from the admin. Every write is checked against them, whoever makes it.
A content type's fields with their kinds, handles and rules

Publishing with a process

Drafts, statuses, and who may move a record from one to the next. Work on a branch, review every change, merge it as one deployment, roll back at once.
A post in review, its Draft to In review to Published flow, and its history

Media library

Folders, tags, alt text and focal points, with every size the site needs made on the server.
A media file with its focal point, alt text, folder, tags and sizes on request

People and roles

Roles that say exactly what each person may see and change, shown as a table of the admin's parts. Plugins bring roles of their own.
The Editor role as a table of admin areas with View, Change and Delete for good

Every language

Mark a field Translate and it holds a value per language. Switch languages in the editor; the site serves each one at its own address.
A class edited in Polish with a language switch and a field shared by every language

An agent beside you, if you want one

Ask from any page and watch it work, step by step, with Undo. Or don't: the admin is complete without it.
A classes list with a new Price column, beside the agent chat that added it, with Undo

Why it works: one contract

Every capability in Publr, from creating a record to signing in, is one operation. The admin, the CLI, the REST API, plugins and agents are all thin doors onto the same operations, through one pipeline that checks permissions, validates input, runs in a transaction and records what happened.

So nothing is AI-only and nothing is UI-only. A feature added once is there for every door, documented. An agent can do exactly what its person may do, no more, and there is no back door for anyone. Architecture

Sandboxed plugins

Every installed plugin runs in its own WebAssembly sandbox, inside the Publr binary.

Permissions you approve

Each plugin lists what it needs and why. You switch each one on or off. An update that asks for more waits for you.
Enabling a plugin: each permission it asks for, with its reason, risk and a switch

Sealed off

No access to the database, files or other plugins. One way out: the same checked operations as everyone else. Acting for an editor, never more than that editor.
The Publr binary holding the core and built-in plugins, with installed plugins in sandboxes reaching it through operations only

Failures stay contained

Every call has limits on time and memory. A plugin that crashes or loops stops alone. The site keeps running.
A plugin's limits, and its log where one call was stopped while the site kept serving

Secrets it never sees

Publr adds the API key as the request leaves. Calls go only to the domains you approved.
A secret the plugin names but never sees, filled in only as the request leaves

Extends everything

Content types, operations, roles, jobs, webhooks, admin pages, columns, field editors, site pages. Everything it draws is sanitized or framed.
A plugin's column in the posts list and its settings, inside the admin

No rebuild, no extra server

Install, update, roll back and remove from the admin. No VM, no container, no vendor cloud.
The plugin list with an update to review, a roll back, a remove and a built-in plugin
No sandbox Developer's server Platform VMs Wasm functions Publr
Every plugin sandboxed ✗ ✓ ✓ ✓ ✓
Failures contained ✗ ✓ ✓ ✓ ✓
Open source, self-hosted ✓ ✗ ✗ ✗ ✓
No vendor lock-in ✓ ✗ ✗ ✗ ✓
No extra server or VM ✓ ✗ ✗ ✓ ✓
Extends everything, UI included ✓ partly partly ✗ ✓

Under the hood, plain code

What an agent writes is what you would write: readable code you can review and own.

A content type: a Zig struct, its fields and rules
/// Post
///
/// An article on the blog, with a page of its own.
pub const Post = struct {
    /// Title
    title: []const u8,
    /// Slug
    slug: ?[]const u8 = null,
};

pub const Posts = publr.record.define(Post, .{
    .name = "blog.post",
    .public = true,
    .fields = .{
        .title = .{ .validation = .{ .min_len = 1, .max_len = 120 } },
        .slug = .{ .kind = "slug", .options = .{ .source = "title" } },
    },
});

pub const plugin = publr.plugin.define(manifest, .{ .records = &.{Posts} });

The doc comments become the labels and help in the admin. The same type can be made in the admin, no code needed. Plugin API

A page: a .publr template, built to a static file
---
import Base from '../../layouts/base.publr';
import LatestPosts from '../../components/latest-posts.publr';
const post = Publr.build.getEntry();
---
<Base title={post.title}>
  <article>
    <h1>{post.title}</h1>
    <LatestPosts heading="More posts" island />
  </article>
</Base>

content/posts/[slug].publr is one page per published post. Publish a post and only the pages that read it are rewritten. Apps

A query: GROQ, nested records in one read
*[_type == "product" && slug == $slug][0]{
  title,
  "variants": *[_type == "variant" && product == ^._id] | order(price.GBP) { title, price }
}

The same query runs in templates, from the CLI and at GET /api/record.query. Queries

Enterprise grade, small core

  • Many apps, one project. A marketing site, a members area, a product people pay for, its docs: each an app over the same content and plugins. Fix it once, every app gets it.
  • Built-in back office. Database, sign-in, users, roles, media, queued jobs, schedules and webhooks. Nothing to wire up, no separate bills. SDK
  • Permissions decided once. Every call, from a person, a plugin, a token or an agent, is judged by the same policies. When in doubt, Publr does not allow. Auth
  • Updates you can trust. Every update backs the whole site up first, and a failed one rolls back and says why. Updates

Runs anywhere, exactly the same

Where How
Your computer One process, one port, one file of data.
Your server Copy the binary and the site's folder. A $5 VPS is plenty.
Publr Cloud Hosted, with changes made on a branch before they reach the live site.
A browser tab The same binary as WebAssembly, behind a service worker. No server.
Any static host Every app built to plain files.

Leave whenever you like. Your site is a folder: take it with you.

We own every layer

Publr is Zig from the HTTP server to the templates, the CSS engine and the admin. No npm, no bundler, no framework, no build-time network access. Three libraries (SQLite, stb, libwebp), vendored as-is. When something is slow, wrong or insecure, the fix is in this repository, not on someone else's roadmap.

The core stays small enough to read in an afternoon. Workflows, environments, languages and integrations are plugins on the same SDK any third party uses, so the plugin API stays honest: Publr is its heaviest user. Philosophy · Dependencies

Status

v0.2, early access. Publr is moving fast, and formats may still change between releases. Updates

Learn more

Running a site Building on it How it works
Content Agents Philosophy
Admin Apps Architecture
Authentication Plugins SDK
Queries Plugin API Database schema
CLI REST API Publr in the browser
Updates Streaming islands Build reference

License

Apache 2.0.

About

Build and run websites and web apps with AI, by hand, or in code. One small binary, sandboxed plugins, runs anywhere

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages