diff --git a/documentation/businessFlow.md b/documentation/businessFlow.md index 29478d59..3353d714 100644 --- a/documentation/businessFlow.md +++ b/documentation/businessFlow.md @@ -1,3 +1,4 @@ +```mermaid sequenceDiagram autonumber participant Outside Chat @@ -33,4 +34,5 @@ sequenceDiagram System->> User Bot: Trigger reply with corresponding response User Bot->> Citizen: "The message has been assessed to be..." end - end \ No newline at end of file + end +``` diff --git a/documentation/conversationFlow.yml b/documentation/conversationFlow.md similarity index 98% rename from documentation/conversationFlow.yml rename to documentation/conversationFlow.md index 90767796..ae5c0bcf 100644 --- a/documentation/conversationFlow.yml +++ b/documentation/conversationFlow.md @@ -1,3 +1,4 @@ +```mermaid sequenceDiagram actor citizen @@ -8,7 +9,7 @@ actor checker citizen ->> user bot: {fake news} alt there is a match alt vote not completed - user bot ->> citizen: Hello! 👋 Thank you for sending this in! Our *CheckMates🕵🏻 will be reviewing this message* and *providing you with the results soon*. + user bot ->> citizen: Hello! 👋 Thank you for sending this in! Our *CheckMates🕵🏻 will be reviewing this message* and *providing you with the results soon*. else is a scam user bot ->> citizen: ⛔⛔ Thank you for waiting! Our CheckMates have reviewed the message and think this is likely to be a *scam*!🚫\n\nWe recommend you do not engage further⛔️\n\nThank you for keeping Singapore safe! else is suspicious @@ -44,4 +45,5 @@ else no match checker bot ->> checker: No problem! If you wish to come back and assess the message, you may do so by clicking the "yes" button. See you soon!😊 end -end \ No newline at end of file +end +``` diff --git a/documentation/dataSchema.md b/documentation/dataSchema.md index 257d2842..103b23cb 100644 --- a/documentation/dataSchema.md +++ b/documentation/dataSchema.md @@ -1,3 +1,4 @@ +```mermaid erDiagram message { @@ -23,7 +24,7 @@ erDiagram boolean isInfo boolean isIrrelevant "Should message be considered assessed and ready for reply" number truthScore - string primaryCategory either "scam", "illicit", "irrelevant", "spam", "legitimate", "misleading", "untrue", "accurate", "unsure", or "error" + string primaryCategory "either scam, illicit, irrelevant, spam, legitimate, misleading, untrue, accurate, unsure, or error" string customReply "Not used for now" number instanceCount collection instances @@ -117,3 +118,4 @@ erDiagram user ||--|{ instance: sends message ||--o{ voteRequest: triggers factChecker ||--o{ voteRequest: responds_to +``` diff --git a/documentation/detailedFlow.md b/documentation/detailedFlow.md index f4327939..7704b6e7 100644 --- a/documentation/detailedFlow.md +++ b/documentation/detailedFlow.md @@ -1,3 +1,4 @@ +```mermaid sequenceDiagram actor Citizen participant User Bot @@ -59,10 +60,10 @@ sequenceDiagram webhookHandler->>Firestore: Update vote request Firestore->> onVoteRequestUpdate: Trigger onVoteRequestUpdate->> Checker Bot: call API with interactive poll - Checker Bot->>Checker: "On a scale of 0-5, how true...?" + Checker Bot->>Checker: "On a scale of 0-5, how true...?" Checker->>Checker Bot: "" Checker Bot->>webhookHandler: Trigger - webhookHandler->>Firestore: Update vote request + webhookHandler->>Firestore: Update vote request end Firestore->> onVoteRequestUpdate: Trigger onVoteRequestUpdate->>onVoteRequestUpdate: Determine isScam, isIrrelevant, isAssessed @@ -79,4 +80,5 @@ sequenceDiagram end end end - end \ No newline at end of file + end +```