doc: add design decisions document

This commit is contained in:
Max Hohlfeld 2024-11-21 23:16:34 +01:00
parent dba95e1901
commit 91046d0e1c

12
doc/design-decisions.md Normal file
View File

@ -0,0 +1,12 @@
# Design Decision
## Communication between Browser and Server via REST-like Endpoints and HTMX
- https://htmx.org/essays/10-tips-for-ssr-hda-apps/
- Name of endpoints is plural
- "/locations" GET -> read all
- "/locations/new" GET / POST -> create
- "/locations/1" GET -> edit, POST -> update, DELETE -> delete CRUD
- "/locations/assign" GET / POST for custom action
- Modelling of models in code
- see vehicle.rs
- use of applicationError
- return Options, where queries are bound to id or search input