diff --git a/ht_booking/assets/views/base.html b/ht_booking/assets/views/base.html new file mode 100644 index 0000000..1c28e1f --- /dev/null +++ b/ht_booking/assets/views/base.html @@ -0,0 +1,65 @@ + + + + +
+ + +| + {{"name" | capitalize }} + | ++ {{"surface" | capitalize }} + | ++ {{"indoor" | capitalize }} + | ++ Actions + | +
|---|---|---|---|
| + {{item.name | escape }} + | ++ {{item.surface | escape }} + | ++ {{ item.indoor }} + | ++ Edit + | +
+ 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 --html+ Open /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