From 91046d0e1c5a67427f33c67083f50a2882b47e0b Mon Sep 17 00:00:00 2001 From: Max Hohlfeld Date: Thu, 21 Nov 2024 23:16:34 +0100 Subject: [PATCH] doc: add design decisions document --- doc/design-decisions.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/design-decisions.md diff --git a/doc/design-decisions.md b/doc/design-decisions.md new file mode 100644 index 00000000..434e74c2 --- /dev/null +++ b/doc/design-decisions.md @@ -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