# Backend: Matching Plugin repsonsibe for finding, scoring, and matching `Profiles` for a proposing `User`. ```mermaid classDiagram MatchPlugin ..> MatchMaker : dependency MatchMaker ..> ScoreKeeper : dependency class MatchPlugin { +String owner +Bigdecimal balance +deposit(amount) } class MatchMaker { +String owner +Bigdecimal balance +deposit(amount) } class ScoreKeeper { +String owner +Bigdecimal balance +deposit(amount) } ``` ## Routes ### `GET /match` ```mermaid sequenceDiagram participant D as db participant A as match:route participant B as match:plugin participant C as MatchMaker participant E as ScoreKeeper A->>B: START alt not cached B->>D: SELECT Profiles D-->>B: Profiles B->>C: send Profiles | Profile | User loop Profile in Profiles C->>E: Profile E-->>C: scored Profile end C-->>B: scored Profiles B->>???: scored Profiles else cached B->>???: check cache end ???-->>B: Profiles B->>A: ordered Profiles ``` ### `POST /match` ```mermaid sequenceDiagram participant D as db participant A as match:route participant B as match:plugin participant C as MatchMaker participant E as ScoreKeeper A->>B: START ```