FAQ
Do I need a database?
No — Bialet works without one, but SQLite is built in if you do.
Can I still use JavaScript?
Yes. Bialet doesn't stop you — it just doesn't make you start there.
Small on purpose. ================= .. meta:: :description: Bialet is a small web framework in one executable: an HTTP server, SQLite, and the Wren scripting language. No package manager, no YAML, no build step. :keywords: Bialet, web framework, Wren, SQLite, file-based routing, zero dependencies, server-rendered ---- What you get ------------ One executable does the work: it serves HTTP, opens the SQLite file, and runs your Wren code. There is no stack to assemble around it. .. grid:: 1 2 2 2 :gutter: 2 .. grid-item-card:: :octicon:`package;2em` ^^^ **One executable** Copy the binary to a server and run it. No runtime to install, no ``node_modules``. 3.7 MB on Linux x86_64. .. grid-item-card:: :octicon:`database;2em` ^^^ **SQLite is included** The database is one file. No connection strings, no service to provision, no separate process. WAL mode is one flag. .. grid-item-card:: :octicon:`zap;2em` ^^^ **No build step** Save a ``.wren`` file and refresh the browser. No compiler, no bundler, no watch process. .. grid-item-card:: :octicon:`code;2em` ^^^ **HTML, CSS, and SQL** Server-rendered pages, standard HTML and CSS, and SQL you write yourself. Add JavaScript only if you want it. ---- What it costs ------------- .. admonition:: The tradeoffs :class: note Small means bounded. These are the limits that come with it. - **One worker per process, with instant queueing.** Requests are served sequentially per worker. For parallel concurrency on multi-core servers, spin up multiple local instances behind Caddy or nginx. See :doc:`deployment`. - **HTTP/1.0, no native TLS.** Bialet serves HTTP. Put nginx, Apache, or Caddy in front for HTTPS, HTTP/2, rate limiting, request buffering, and static-asset caching. See :doc:`deployment`. - **Wren, with basic tooling.** Apps are written in Wren. The VS Code and Vim plugins provide syntax highlighting; autocomplete and an LSP are on the roadmap. - **No WebSockets.** Request/response HTTP only. Use polling or an external service for realtime features. ---- Where it fits ------------- .. grid:: 1 2 3 3 :gutter: 2 .. grid-item-card:: :octicon:`beaker;2em` ^^^ **Internal tools and admin panels** One process, one SQLite file, and a few users on one small server. .. grid-item-card:: :octicon:`mortar-board;2em` ^^^ **Prototypes and small sites** One directory to deploy. Add a reverse proxy when the site goes public. .. grid-item-card:: :octicon:`heart;2em` ^^^ **Learning and teaching** HTML, SQL, and one scripting language. Nothing else to install. Not a fit if you need multi-server horizontal scaling, in-process TLS, WebSockets, or a package ecosystem. Bialet does not provide them. See :doc:`why-bialet` for the longer version. .. raw:: html
.. toctree:: :hidden: :maxdepth: 2 :caption: Before You Start self why-bialet html-first installation editor-support wren .. toctree:: :hidden: :maxdepth: 2 :caption: First Steps quickstart getting-started/index .. toctree:: :hidden: :maxdepth: 2 :caption: Data & Storage database file datetime .. toctree:: :hidden: :maxdepth: 2 :caption: User Interfaces template jsx-migration forms markdown errors .. toctree:: :hidden: :maxdepth: 2 :caption: Connecting Things advanced-routing external-modules rest-api http-calls .. toctree:: :hidden: :maxdepth: 2 :caption: Running It configuration usage live-reload security cron tests deployment .. toctree:: :hidden: :maxdepth: 2 :caption: Help & Reference reference examples faq ai-prompt ---- .. raw:: html # Why Bialet? Bialet makes a specific trade-off: **maximum simplicity for a narrow but common set of use cases**. This page explains what that means, when it's a good fit, and how it compares to other tools. ## The Philosophy Most web frameworks optimize for flexibility. They give you middleware stacks, ORM layers, routing DSLs, template engines, and configuration files — all designed to handle any scenario you might encounter. Bialet optimizes for **getting things done on a single server**. It bundles the HTTP server, the database, and the language runtime into one binary. Your app is a directory of `.wren` files and a SQLite database. That's it. If your needs fit within Bialet's scope, you get an experience no other framework can match: zero-config development, single-command deployment, and no dependency management. If your needs grow beyond that scope, you'll want a different tool — and that's okay. ## When to Use Bialet - **Prototypes and MVPs** — Go from idea to working app in minutes. No setup, no boilerplate. - **Internal tools and dashboards** — Admin panels, reporting UIs, data browsers. The database is already there. - **Simple CRUD applications** — Blogs, polls, task trackers, form-based apps. - **Learning web development** — Skip the configuration and focus on HTML, SQL, and basic programming concepts. - **Single-server deployments** — Small to medium traffic sites on a VPS or shared host. ## When NOT to Use Bialet - **High-traffic public sites** — Bialet is a single-process server. It can't distribute load across multiple machines. - **Real-time applications** — No WebSocket or Server-Sent Events support. Polling works for simple cases, but it's not ideal. - **Large teams with existing infrastructure** — If you already have PostgreSQL, Redis, and a CI pipeline, Bialet's simplicity isn't buying you much. - **Microservices** — Bialet is designed for monolithic apps on a single server. - **Complex auth flows** — Bialet supports basic auth and sessions, but not OAuth, SAML, or multi-factor authentication out of the box. ## Comparisons ### Bialet vs. PHP PHP is the closest philosophical relative. Both let you drop files in a directory and serve them immediately. Both embed logic in HTML. | | Bialet | PHP | | --------------- | -------------------------------- | --------------------------------- | | Language | Wren (object-oriented) | PHP | | Database | SQLite built-in, always present | Must install and configure | | Deployment | Single binary + app directory | PHP runtime + web server + DB | | Package manager | None (import from GitHub URLs) | Composer | | Template engine | Inline HTML strings (JSX-like) | Plain PHP or Twig/Blade | | Configuration | None | php.ini, .env, server config | Bialet wins on simplicity. PHP wins on ecosystem and scalability. ### Bialet vs. Flask / Express Flask and Express are minimalist frameworks, but they still need a database driver, a template engine, and often an ORM — all configured separately. | | Bialet | Flask / Express | | --------------- | -------------------------------- | --------------------------------- | | Setup | One binary, zero config | Install packages, configure DB | | Database | SQLite built-in | SQLAlchemy + driver (Flask) | | Routing | File-based | Decorators / router definitions | | Templates | Inline HTML + interpolation | Jinja2 / EJS / Pug | | Production | Single binary | gunicorn + nginx / pm2 + nginx | | Language | Wren | Python / JavaScript | Bialet eliminates the "glue code" phase entirely. Flask/Express give you more control over the stack but require more decisions up front. ### Bialet vs. Rails / Django Rails and Django are full-stack frameworks with ORMs, admin interfaces, migrations, and extensive ecosystems. Bialet is full-stack in a different way: it bundles the essentials, nothing more. | | Bialet | Rails / Django | | --------------- | -------------------------------------------- | ----------------------------------------- | | Learning curve | Hours | Weeks to months | | ORM | Raw SQL with Query objects | ActiveRecord / Django ORM | | Admin panel | Build your own | Built-in (Django admin) / gems | | Migrations | `_migration.wren` file | Versioned migration files | | Scaling | Multiple workers on one host (shared SQLite) | Horizontally via workers / load balancer | | Ecosystem | Minimal | Massive (gems / packages) | If you're building a complex, long-lived application with a team, Rails or Django are better choices. If you're building something simple today, Bialet gets you there faster. ### Bialet vs. Static Site Generators Static site generators (Hugo, Jekyll, Eleventy) produce HTML files at build time. Bialet generates HTML at request time and includes a database. If your site has no dynamic data and no forms, use a static site generator. If you need a database, forms, or user-specific content, Bialet is the lighter alternative to a full backend framework. ## The Trade-off Bialet is intentionally limited. It doesn't have: - Multi-server horizontal scaling - WebSockets - Background job queues (beyond Cron) - A plugin ecosystem - PostgreSQL / MySQL support - An ORM - OAuth or social login What it does have is **everything you need to build a data-driven website in a single binary**. For many projects, that's exactly the right trade-off. # HTML-First Bialet renders on every request. There's no client-side router, no hydration step, no state to keep in sync between server and browser. That model works best when the browser does what the browser already knows how to do, and JavaScript is reserved for the few things it genuinely can't. This isn't a new idea — see [You Might Not Need JS](http://youmightnotneedjs.com/) and [HTML Can Do That](https://chrisburnell.com/html-can-do-that/) for the wider case. This page is the Bialet-flavored version: which native HTML/CSS features replace common JS patterns, and how they look in a `.wren` file. ## Why this fits Bialet specifically Bialet has no bundler and no package manager. Every script tag you add is a file you wrote, by hand, that you now maintain forever — there's no `npm update` to carry it forward. That raises the bar for reaching for JS in the first place: a checkbox hack that ships zero bytes of script beats a hand-rolled toggle function you'll be debugging in a year. It also means the trade Bialet already made — render HTML on the server per request instead of shipping state to the client — pairs naturally with letting the *server* own things like sorting, filtering, and pagination via plain links and query params, instead of re-implementing them in JS on top of a JSON endpoint. None of this is a purity rule. If a feature genuinely needs JS — drag-and-drop, live validation against the server, anything real-time — write the JS. The point is to check whether HTML already does it first. ## Disclosure: `No — Bialet works without one, but SQLite is built in if you do.
Yes. Bialet doesn't stop you — it just doesn't make you start there.