go-bazzinga / hot-or-not-web-leptos-ssr

Other
1 stars 3 forks source link

Add Report Button and Report Flow #203

Closed rosarp-gobazzinga closed 3 weeks ago

rosarp-gobazzinga commented 2 months ago
rosarp-gobazzinga commented 2 months ago
---
title: Report a video on YRal
---
sequenceDiagram
    autonumber
    participant ssr as SSR
    participant ext as External Service/SideCar
    participant chat as Google Chat
    participant script as Google App script

    ssr--)ext: Sends id of the <br> post to report
    ext--)chat: Using lib viz. google-chat <br> send request on <br> google group
    script--)chat: App script monitors <br> for new responses <br> posted by service
    script--)ext: When for server message <br> respons is found, <br> send count to service <br> for further processing
    ext--)ext: Takes appropriate action on the post

This is basic workflow possible. I have checked the feasibility, using Google App Scripts (GAS) this is possible.

rosarp-gobazzinga commented 2 months ago

There is one more possible solution as I was checking. This will be real time. Need to check in details about Events API to confirm.

---
title: Report a video on yral
---
sequenceDiagram
    autonumber
    participant ssr as SSR
    participant agent as Off Chain Agent
    participant chat as Google Chat
    participant we_api as Google Workspace Events API

    ssr--)agent: Sends id of the <br> post to report
    agent--)chat: Using google-chat lib <br> send request on <br> google group with <br> emojis for voting
    agent--)we_api: Subscribes to the <br> Workspace Events API <br> for notifications about <br> message interactions
    chat-->>chat: User interacts with <br> emojis to the message
    chat--)we_api: Event is triggered
    we_api--)agent: Send notification <br> about user <br> interaction with data
    agent--)agent: Parses response <br> & takes appropriate <br> action on the post
komal-rs commented 1 month ago

Canister Changes

Frontend

Offchain

PubSub to Offchain call configure

Note: Exclude deleting/marking in CF


flowchart TD
    IndividualCansiter1[(Individual User <br>Canister 1)]
    IndividualCansiter2[(Individual User <br>Canister 2)]
    PostCache[(Post Cache)]
    OffChainAgent[OffChain Agent]
    FESSR[Frontend SSR]
    CFStream[Cloudflare Stream]
    GChat[Google Chat <br>Space]
    GWorkspace[Google <br>Workspace]
    PubSub[[Google Pub/Sub]]
    User((User))
    Moderator((Moderator))

    User --[1.report]--> FESSR
    FESSR --[1.report(gRPC)]--> OffChainAgent
    OffChainAgent --[1.msg]--> GChat

    Moderator --[2.react]--> GChat
    GChat --[2.event]--> GWorkspace
    GWorkspace --[2.event]--> PubSub
    PubSub --[2.remove call]--> OffChainAgent

    OffChainAgent --[3. mark video]--> IndividualCansiter1
    IndividualCansiter1 --[3. update feed]--> PostCache
    OffChainAgent --[3. delete in CF/<br>mark metadata?]--> CFStream

    subgraph OnChain
        PostCache
        IndividualCansiter1
        IndividualCansiter2
    end
komal-rs commented 3 weeks ago

closed by #241