summaryrefslogtreecommitdiffstats
path: root/DESIGN.md
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-10-04 19:55:17 +0100
committerLibravatar cel 🌸 <cel@blos.sm>2023-10-04 19:59:53 +0100
commit5d395d4ed73061b247c32dc63db6ddfa2dd62d39 (patch)
tree084df0c83294123c6e884fa46d022f120ba5de86 /DESIGN.md
downloadpinussy-5d395d4ed73061b247c32dc63db6ddfa2dd62d39.tar.gz
pinussy-5d395d4ed73061b247c32dc63db6ddfa2dd62d39.tar.bz2
pinussy-5d395d4ed73061b247c32dc63db6ddfa2dd62d39.zip
initial commit
Diffstat (limited to 'DESIGN.md')
-rw-r--r--DESIGN.md113
1 files changed, 113 insertions, 0 deletions
diff --git a/DESIGN.md b/DESIGN.md
new file mode 100644
index 0000000..be60bf5
--- /dev/null
+++ b/DESIGN.md
@@ -0,0 +1,113 @@
+# endpoints
+
+## authentication
+GET /login
+POST /login
+GET /signup
+
+## user management
+POST /users
+GET /users
+GET /users/:user
+GET /users/:user/edit
+PUT /users/:user
+DELETE /users/:user
+
+## board management
+POST /boards
+GET /boards
+GET /boards/:board
+GET /boards/:board/edit
+PUT /boards/:board
+DELETE /boards/:board
+
+## pin management
+POST /pins
+GET /pins
+GET /pins/:pin
+GET /pins/:pin/edit
+PUT /pins/:pin
+DELETE /pins/:pin
+
+## files
+GET /files/:file
+
+# structures
+
+Enum Privacy {
+ Private
+ Unlisted
+ Public
+}
+
+User {
+ id int primary key
+ username string unique
+ email string unique
+ password string
+ bio text
+ site string
+ profile_picture string
+ privacy privacy
+ admin bool
+}
+
+board {
+ id int primary key
+ name string
+ description text
+ privacy privacy
+}
+
+board_ownership {
+ owner user_id
+ board board_id
+ primary key owner board
+}
+
+enum file_type {
+ image
+ audio
+ video
+ document
+ site
+ other
+}
+
+files {
+ id int primary key
+ thumbnail string (file path)
+ path string
+ type file_type
+ alt_text text
+ pin foreign key
+}
+
+// pins
+pin {
+ id int primary key
+ subject text optional
+ text text
+ notes text
+ source_url string
+}
+
+tags {
+ tag
+}
+
+pin_tags {
+ ids many to many
+}
+
+pins_boards {
+ pin pin_id foreign
+ board board_id foreign
+ primary key pin board
+}
+
+pins_owners {
+ owner user_id
+ pin pin_id
+ primary key (owner, pin)
+}