Procházet zdrojové kódy

:pencil: sketching out more indepth docs for backend match making and groupings

tags/0.0.1
j před 5 roky
rodič
revize
89a96fd7b4
2 změnil soubory, kde provedl 106 přidání a 0 odebrání
  1. 70
    0
      docs/backend/matching.md
  2. 36
    0
      docs/backend/membership.md

+ 70
- 0
docs/backend/matching.md Zobrazit soubor

@@ -0,0 +1,70 @@
1
+# Backend: Matching
2
+
3
+Plugin repsonsibe for finding, scoring, and matching `Profiles` for a proposing `User`. 
4
+
5
+```mermaid
6
+classDiagram
7
+    MatchPlugin ..> MatchMaker : dependency
8
+    MatchMaker  ..> ScoreKeeper : dependency
9
+    
10
+    class MatchPlugin {
11
+        +String owner
12
+        +Bigdecimal balance
13
+        +deposit(amount)
14
+    }
15
+    class MatchMaker {
16
+        +String owner
17
+        +Bigdecimal balance
18
+        +deposit(amount)
19
+    }
20
+    class ScoreKeeper {
21
+        +String owner
22
+        +Bigdecimal balance
23
+        +deposit(amount)
24
+    }
25
+```
26
+
27
+## Routes
28
+
29
+### `GET /match`
30
+```mermaid
31
+sequenceDiagram
32
+    participant D as db
33
+    participant A as match:route
34
+    participant B as match:plugin
35
+    participant C as MatchMaker
36
+    participant E as ScoreKeeper
37
+    
38
+    A->>B: START
39
+    
40
+    alt not cached
41
+        B->>D: SELECT Profiles
42
+        D-->>B: Profiles
43
+        B->>C: send Profiles | Profile | User    
44
+        loop Profile in Profiles
45
+            C->>E: Profile
46
+            E-->>C: scored Profile
47
+        end    
48
+        C-->>B: scored Profiles
49
+        B->>???: scored Profiles
50
+    else cached
51
+        B->>???: check cache
52
+    end
53
+    
54
+    
55
+    
56
+    ???-->>B: Profiles
57
+    B->>A: ordered Profiles
58
+```
59
+
60
+### `POST /match`
61
+```mermaid
62
+sequenceDiagram
63
+    participant D as db
64
+    participant A as match:route
65
+    participant B as match:plugin
66
+    participant C as MatchMaker
67
+    participant E as ScoreKeeper
68
+    
69
+    A->>B: START
70
+```

+ 36
- 0
docs/backend/membership.md Zobrazit soubor

@@ -0,0 +1,36 @@
1
+# Backend: Membership
2
+
3
+Plugin repsonsibe for creating `Memberships` for joining `Groupings`. 
4
+
5
+```mermaid
6
+classDiagram
7
+    class MembershipPlugin {
8
+        +String owner
9
+        +Bigdecimal balance
10
+        +deposit(amount)
11
+    }
12
+```
13
+
14
+## Routes
15
+
16
+### `GET /membership`
17
+```mermaid
18
+sequenceDiagram
19
+    participant D as db
20
+    participant A as membership:route
21
+    participant B as membership:plugin
22
+    participant C as membership:service
23
+    
24
+    A->>B: START
25
+```
26
+
27
+### `GET /membership`
28
+```mermaid
29
+sequenceDiagram
30
+    participant D as db
31
+    participant A as membership:route
32
+    participant B as membership:plugin
33
+    participant C as membership:service
34
+    
35
+    A->>B: START
36
+```

Načítá se…
Zrušit
Uložit