routes
page — an HTML page: path, hbs (template name), optional view. A request with the HX-Request header (HTMX) gets the fragment without layout.
api, GET — serves view data: path, view, format (json | html).
api, method POST — a public form endpoint:
| key | description |
|---|---|
| insert_into | target table for INSERT |
| fields | fields a client may submit: name, required, max_length |
| auto_fields | server-side values: now | client_ip | client_user_agent |
| honeypot | bot-trap field name; a non-empty value means silent success, nothing stored |
| rate_limit | per_key_per_minute + key (ip | ip_ua); over the limit — 429 |
| on_success / on_error | redirect to a path, or render an hbs template |
| format | json — respond with JSON instead of html/redirect |
Paths under /cms are reserved for the admin UI.