{% 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.

1 · Authentication — JWT API

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/registername, email, passwordcreate an account
POST/api/auth/loginemail, passwordreturns a JWT token
GET/api/auth/current— (Bearer token)info about the logged-in user
POST/api/auth/forgotemailstart password reset
POST/api/auth/resettoken, passwordset a new password
GET/api/auth/verify/{token}verify an email address
POST/api/auth/magic-linkemailemail a passwordless login link
GET/api/auth/magic-link/{token}exchange the link for a JWT
POST/api/auth/resend-verification-mailemailresend the verification mail

Register


    

Login


    

Current user

Sends the JWT from a successful login as a Bearer token.


    

Active JWT:

2 · Database CRUD — Courts

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 --html
Open /courts →

3 · Health & ops endpoints

Built-in, no code needed:

4 · Server-side views & i18n

Tera templates plus Fluent translations. The same key hello-world, resolved by the t() function in this template:

5 · Also wired up (CLI-generated when you need them)

{% endblock content %} {% block js %} {% raw %} {% endraw %} {% endblock js %}