A complete app framework, built on standards.
Elements comes with a default app framework that gives you every building block an app needs: routing that serves pages and APIs alike, rpc functions, reactive HTML, sessions, sql and migrations, live tables, channels, jobs and email. It was engineered by necessity for production applications, not by committee, and it is a far better framework than Next.js and the other frameworks that accumulated their features as add-ons over the years: no bloat, no rendering modes, no hooks, no caching directives, and nothing in it an app does not need. The design philosophy is simple. Keep the framework's own abstractions to a minimum, so nothing gets in the way of you or your agent, and stick to the standards: HTML, TypeScript, SQL and CSS. Then give the primitives super powers. A server function is called from the browser like any function. A page is HTML that updates when its data changes. A query is SQL. A live table keeps every browser in sync.
- html
- Standard HTML, made reactive: the page updates when its data changes. It renders on the server, then runs entirely in the browser, where a fast reactive runtime patches only what changed. Interactive charts are SVG in the template, faster than React. The runtime is MIT licensed.
- ui
- A professional grade, extensible design system in standard CSS, and a complete library of pre-made UI templates, from dialogs and forms to data tables, charts and the chat templates for an AI app, written in Elements HTML at the quality of the best React libraries.
- rpc
- Call a server function from the browser like any other function. The compiler turns the call into a request and keeps the body out of the browser bundle.
- routes
- Declared in TypeScript with a typed request and response. Return a page, or return data.
- auth
- Login, logout and authorization primitives are built in. Works in routes, rpc functions, and reactively in Elements HTML.
- sql
- Write sql in your code. It is parameterized at build time, against the Postgres the install already gave you.
- migrations
- Applied by the build: the test database before the tests run, the app database after.
- live tables
- Real time publish and subscribe for your data, with optimistic mutations. Declare the set of rows a page needs and every browser subscribed to it stays current: insert, update or delete anywhere and the change arrives everywhere, painting locally before the server has answered.
- channels
- Broadcast from the server to every browser listening, on every app server.
- jobs and cron
- Queue work off the request path, or schedule it. A job server starts with the project, on your machine and on every machine you deploy to.
- email
- Write mail in the same Elements HTML as your pages. The compiler inlines the stylesheets so it renders in a mail client.
- files
- Bind a file input to a
File or File[] and the browser reads the bytes for you. An rpc stores them in Postgres or in any object store, and a route serves them back with content-hashed caching. - tests
- Run across child node processes with hot reload on, against a freshly migrated test database, as a phase of every build.