Understanding the Architecture

Hello Jitsi community, thanks for you support.

First i am very new to the Jitsi and all related stuff, so when i’m researching,

  1. I have find the architecture of jitsi as below
    so while i am debugging and understanding the flow with running jitsi-meet on local and reading some IFrame API docs, there are certain events is firing when we make certain actions, like audio muting/unmuting etc…,
    and also JICOFO - it’s manages conference focus in between xmpp and videobridge.

Question:
when i’ve created a conference in jitsi-meet local, from the log i’ve seen default moderator role is assigned. when i am checking the JICOFO code , i’ve found snippet related to changing roles as below.
moderator related

so I want to understand how the internal flow is happening between the Iframe API and JICOFO code and everything.

please help @damencho, i’ve seen your comments. it’s really helpful
Thanks