Get started

From nothing to a running admin.

Laterite ships a command-line tool that scaffolds a project, sets up the database, and creates the first administrator in one guided step.

Prerequisites

  • Rust (stable), installed with rustup.
  • One of PostgreSQL, MySQL/MariaDB, or SQLite. SQLite needs nothing extra; it is just a file.

1. Install the CLI

This installs the lat binary. It bundles every database driver, so one binary works with any supported database.

cargo install laterite-cli

2. Create an application

Run lat new and answer the prompts: the application name, a display timezone, a database and its connection details, and the first administrator.

lat new

It scaffolds the project, applies the framework migrations, and creates the administrator.

3. Run it

cd acme
lat serve

Open 127.0.0.1:8080/admin and sign in. lat serve is cargo run with a bind-address override when you want one: lat serve --port 3000.

Check the setup

lat doctor, run from anywhere inside the application, verifies it is ready to serve: the configuration loads, the timezone is valid, storage/ is writable, the database is reachable, and the framework tables are present. It exits non-zero if anything fails, so it can gate a deploy.

lat doctor

Manage administrators

The first administrator is created during lat new. To add one later, or to recover a forgotten password, use the CLI. Inside the application it reads the database from the app's own configuration; elsewhere pass --database-url.

lat admin create editor --email editor@acme.test --first-name Editor
lat admin reset-password editor

The full guide is the handbook, generated with the project. Browse the source on GitHub.