Update readme and plan
This commit is contained in:
18
README.md
18
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
|
||||
|
||||
|
||||
84
plan.txt
84
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"
|
||||
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"
|
||||
Reference in New Issue
Block a user