Get started

Templates

Start from a working app instead of a blank one. berth init downloads a template, creates the app, its tables, starter rows and functions, fills in the site's API URL and publishable key, and deploys the site. It takes under a minute.

berth templates
berth init waitlist
berth init booking my-studio --site my-studio
berth init todo --app todo_demo

Each template lands in a folder with template.json, the site/ it deployed and any functions/. Edit them and redeploy with berth sites deploy site or berth functions deploy. The new app becomes your default, so later commands can leave out --app.

Waitlist

A launch page that collects emails. The page posts to a public join function, which writes to the private signups table with the app's secret key, so the key never reaches the browser. Joining twice with the same email is not an error, so the page never reveals who is on the list.

berth init waitlist
berth rows list signups

Booking

Services, open times every 30 minutes and a booking form. services is public to read; bookings is private. The book function lists taken times for a day without names and creates bookings. A unique starts_at column blocks double bookings in the database itself.

berth init booking my-studio
berth rows add services name="Haircut" minutes=30 price=35
berth rows list bookings --order starts_at

Todo with accounts

Email and password sign up and sign in, and a list each person sees only for themselves. todos uses the owner policy, so Postgres row level security enforces it, not the page.

berth init todo
berth auth users list

Need more than a template?

We also design and build sites and apps on Berth. Tell us what you need for a free quote.