{% extends "base.html" %} {% block title %}ht_booking · Loco SaaS starter{% endblock title %} {% block page_title %}What this Loco app gives you out of the box{% endblock page_title %} {% block content %}
This page replaces the default Loco fallback screen. Every model, controller,
migration and route below was produced by cargo loco generate —
nothing here is hand-written boilerplate.
The SaaS starter ships a complete JWT auth flow in src/controllers/auth.rs.
It is a JSON API (no HTML login pages) — so here is a live console that calls those exact endpoints.
| Method | Path | JSON body | Purpose |
|---|---|---|---|
| POST | /api/auth/register | name, email, password | create an account |
| POST | /api/auth/login | email, password | returns a JWT token |
| GET | /api/auth/current | — (Bearer token) | info about the logged-in user |
| POST | /api/auth/forgot | start password reset | |
| POST | /api/auth/reset | token, password | set a new password |
| GET | /api/auth/verify/{token} | — | verify an email address |
| POST | /api/auth/magic-link | email a passwordless login link | |
| GET | /api/auth/magic-link/{token} | — | exchange the link for a JWT |
| POST | /api/auth/resend-verification-mail | resend the verification mail |
Sends the JWT from a successful login as a Bearer token.
Active JWT:
A model, SeaORM entity, migration, controller and Tera views, all generated with one command:
cargo loco generate scaffold court name:string surface:string indoor:bool --htmlOpen /courts →
Built-in, no code needed:
Tera templates plus Fluent translations. The same key hello-world,
resolved by the t() function in this template:
cargo loco generate worker <name>cargo loco generate task <name>cargo loco generate mailer <name> (the auth flow already uses one)cargo loco routes