From c688e57184b99677a7368ca4ffb3eb80599a8722 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Wed, 1 Apr 2026 09:05:45 +0200 Subject: [PATCH] Plan erstellen --- plan.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 plan.txt diff --git a/plan.txt b/plan.txt new file mode 100644 index 0000000..b94f465 --- /dev/null +++ b/plan.txt @@ -0,0 +1,67 @@ +Plan: + Hardware: + Raspberry Pi 3/4 + Hacked Keymatic + Maybe RFID/NFC reader (RC522 is like 7€) + Software: + Frontend + By kali? + Backend + Python + Exposes REST API + By Ahtlon + + API Specification + /door + Current status + GET + With header: access token + + /door/unlock + Unlocks the door + POST + With header: access token (all) + restricted by schedule + /door/lock + Locks the door + POST + With header: access token (all) + not restricted by schedule + + /user + List users + GET + With header: access token (all) + + /user + Create users + POST + With header: access token (admin) + + /user/{name} + Get user details + GET + With header: access token (admin) + /user/{name} + Delete user + DELETE #Didnt even know this was a http method + With header: access token (admin) + /user/{name} + change user details + PATCH + With header: access token (admin) + + USER Parameters + { + "name": $name + "role": user or admin + "password": $password #dont send in answers + "schedule": siehe zeitplan + } + + zeitplan + Hier bin ich nicht sicher, ich denke an cron style für wiederholende dinge aber das kann nur zeitpunkte und keine blöcke. + Villeicht ne liste von cron zeiten [ "0 16 * * 2" "0 18 * * 2" ](Wäre dienstag 16-18 uhr) - Ist aber warscheinlich schwer zu parsen + Oder startzeit + länge in minuten [ "0 16 "* * 2" "120" ] + Ganz simpel ["wochentag(1-7)" "Startzeit" "Endzeit"] + Was ist mit "aller 2 wochen" oder "3. Sonntag im monat" \ No newline at end of file