Elements Manual

elements man Read as markdown

Elements is a project server, build tooling, and an app framework, engineered from the ground up to work together. The project server is always running in the background while you work, and answers build queries in microseconds. The build tooling installs, compiles, migrates, tests, and deploys. The app framework is the code you build your app against.

Topics

start What Elements is and how to build an app. Start here.cli Every command, and the -json every one of them takes.build The build loop: an always-on project server that installs, compiles, migrates and tests on save.browser Look at the page you changed: screenshots, phone widths, and driving Chrome over the DevTools Protocol.packages The installer: part of the build, and local packages watched like source.typescript The TypeScript compiler, compiled into the binary, checking HTML and config too.html Real HTML with typed constructor attributes, built into the TypeScript compiler, patched surgically at runtime.rpc Call a server function from the browser. No fetch, no endpoint, no client, checked end to end.router Routes, route handlers, and request/response.session Signed cookie sessions, signin, and reactive session state.database Postgres in the box, inline SQL parameterized at build time, transactions that nest.migrations SQL files the project server applies as you save. No migrate step, and editing one replays it.livetable Rows that stay in sync with every browser watching, with optimistic writes, from one declaration.channel Server-to-browser message channels for realtime features.jobs Background jobs and cron schedules.email Sending mail from an app.json Serializing values across the RPC and channel boundary.async Write straight-line code. The compiler propagates await, so there are no colored functions.style The design system: tokens, themes, components, and utilities.jsoc The configuration language: JSON plus comments, env(), types, and a per-target projection.config config.jsoc: app configuration and environment substitution.tests Part of the build, rerun only when their code changes, each in a transaction that rolls back.deploy Peer to peer over SSH, only what changed, a few hundred milliseconds hot.vim Editor setup for vim and neovim.recipes Worked end-to-end examples that compose several primitives.licenses How Elements is licensed.purchase Buying a license.