From 72aa859af02e48b98c1131f04d3d8384d228bdf3 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Thu, 23 Apr 2026 22:51:20 +0200 Subject: [PATCH] Update readme and plan --- README.md | 18 ++++++------ plan.txt | 84 +++++++++++++++---------------------------------------- 2 files changed, 31 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index 2a97cdb..25dcd16 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -Gatekeeper - Door access system +## Gatekeeper - Door access system Status: WIP - not prod ready -Dev with `nix develop` -start dev server `uv run fastapi dev` -Swagger UI @ http://127.0.0.1:8000/docs +Dev with `nix develop` +start dev server `uv run fastapi dev` +Swagger UI @ http://127.0.0.1:8000/docs start prod server `uv run fastapi run` Issues: - `nix run` currently broken - timeslot not implemented - no auth - no door state - card system is dummy until I get hardware + - `nix run` currently broken + - timeslot not implemented + - no auth + - no door state + - card system is dummy until I get hardware diff --git a/plan.txt b/plan.txt index 953fd8a..3294030 100644 --- a/plan.txt +++ b/plan.txt @@ -5,82 +5,42 @@ Plan: Nuki Smart Lock Go ESP32 + Nuki hub Models - User + User (Interacts with api) ID int Name str Email str Password str (hashed) IsAdmin bool + Group (Interacts with physical access system) + ID int + Name str + Cards List[Card] + Accessauths List[AccessAuthorization] Card ID int UUID str - UserID int + GroupID int AccessAuthorization Name str - CardID list[Card] IsActive bool - Timeslot list[Timeslot] - Door - Name str - IsLocked bool - IsClosed bool + Timeslots list[Timeslot] Timeslot Name str WeekDay int Starttime str(HH:MM) Duration int (min) - - 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 + Door + Name str + IsLocked bool + IsClosed bool + + API Specification + - See http://127.0.0.1:8000/openapi.json or swagger ui + + 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