Repository navigation
docs: redraw internal network connections diagram in Mermaid - #25983
antobinary merged 4 commits into
Conversation
Replace the outdated 22-connections.png in the "Internal network connections" section of the architecture page with a Mermaid flowchart, so the diagram lives as text next to the prose and can be updated in the same PR as the code it describes. Add @mermaid-js/layout-elk to the docs dependencies. Docusaurus' theme-mermaid enables the ELK layout automatically when the package is installed; without it the diagram falls back to the default dagre layout, which routes several edges through unrelated boxes. 22-connections.png stays in static/img because older doc versions still reference it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe development architecture page updates its service-connection diagrams and adds a Mermaid diagram of socket flows on one Ubuntu host. It documents browser routes, GraphQL and meeting-state traffic, Redis connections, media paths, and recording data flow. The documentation package adds Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains in the documented diagrams or docs installation path; the change is ready for normal merge checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Check every box and edge of the transcribed diagram against the v4.0.x-develop code and packaging, and fix what did not match: - Mutations go from graphql-middleware to graphql-actions over HTTP, not from Hasura; graphql-actions then publishes to Redis. - graphql-middleware reaches Hasura through the nginx load balancer on 127.0.0.1:8185; Hasura calls bbb-apps-akka's /userInfo auth hook. - LiveKit webhooks flow from livekit-server to bbb-webrtc-sfu on :3040; the sfu calls the LiveKit server API on :7880. - bbb-webrtc-sfu starts and stops bbb-webrtc-recorder via Redis. - Dial-in reaches livekit-sip through FreeSWITCH, which answers the call and prompts for the PIN. - FreeSWITCH, bbb-fsesl-akka and mediasoup are installed on every server; dashed now means "alternative or opt-in path". mediasoup is drawn, matching the high-level diagram at the top of the page. - Drop /var/mediasoup from the recording sources (nothing writes it with the packaged recordingAdapter) and the "six processes" count; draw which component writes each directory instead. - bbb-record-core watches the .done marker via inotify, reads events and its resque queue from Redis, and remuxes rather than rsyncs the WebRTC media before deleting the originals. - HAProxy terminates TLS on :443 and forwards to nginx; the notes route is /hocuspocus/collaboration; shared-notes-server uses the blocknote_app database. Lay the diagram out top-to-bottom so it fits the docs column, and mention the Redis pub/sub links that are left out for readability.
prlanzarin
left a comment
There was a problem hiding this comment.
Network diagram:
- Missing link between bbb-wertc-recorder and mediasoup (WebRTC/UDP)
- Missing link between bbb-webrtc-sfu and FreeSWITCH (SIP/5066, ESL/8021)
- Missing link between graphql-middleware and bbb-web (HTTP, 8090, checkGraphqlAuth)
- Missing link between graphql-middleware and akka-apps (HTTP, /userInfo, 8091)
- Missing link between LiveKit (server and sip) and Redis (see nitpick below as well)
- bbb-export-annotations is missing
- AFAIK there's a
hasura_appDB in Postgres as well. I might be misremembering this, so double check - Nitpick: either have everything tied to Redis be represented on the diagram, or nothing (all as a side note). Currently, there's a mix (actions, akka-apps, akka-fsesl in diagram, rest as a side note), which is confusing. I personally liked the previous' diagram representation of the bus, but I recognize how difficult it is to orchestrate this... assortment of components into a Mermaid diagram.
Arch diagram
- Missing link between bbb-wertc-recorder and mediasoup
- Missing link between FS and livekit-sip
- Missing link between bbb-webrtc-sfu and FreeSWITCH
- Missing link between gql-middleware and akka-apps/bbb-web
(direct connections that go outside of Redis establish a hard coupling, so might as well be represented) - Missing link between livekit-server and Redis
- Missing link between livekit-sip and Redis
…connections-mermaid
Address the review on bigbluebutton#25983. Every link was checked against v4.0.x-develop, bbb-webrtc-sfu v2.25.0-beta.2 and bbb-webrtc-recorder v0.14.0. Internal network connections: - graphql-middleware calls bbb-web's checkGraphqlAuthorization on :8090 and bbb-apps-akka's /userInfo on :8901 for session variables (bbb-graphql-middleware/config/config.yml). - bbb-webrtc-sfu reaches FreeSWITCH over SIP on ws :5066 and ESL on :8021 (freeswitch.port / esl_port in the sfu config). - With the mediasoup bridge, mediasoup sends the recorded streams to bbb-webrtc-recorder over WebRTC; the packaging sets recordingAdapter to bbb-webrtc-recorder. - livekit-server and livekit-sip both use Redis, which carries the psrpc bus between them (livekit.yaml, livekit-sip.yaml). - Add bbb-export-annotations, which is part of the bigbluebutton meta package: it pops export jobs and annotations from Redis, publishes status back, and uploads the PDF to bbb-web. - Hasura keeps its metadata in the hasura_app database (HASURA_GRAPHQL_DATABASE_URL), so list it on the PostgreSQL box. - Draw every Redis link instead of a mix of drawn links and a side note, purple so they read as one bus. sfu and recorder now meet through Redis, which is how they talk. The note under the diagram now covers only the opt-in packages (bbb-webhooks, bbb-transcription-controller) that also use Redis. - Invisible links from HAProxy keep graphql-middleware, bbb-web and shared-notes-server in the upper rows. Without them the new Redis edges pull those services toward the bottom and leave the top-left of the diagram empty. High-level architecture: add graphql-middleware to akka-apps and Web API, LiveKit server and LiveKit SIP to Redis, and the dashed bbb-webrtc-sfu to FreeSWITCH, webrtc-recorder to mediasoup and FreeSWITCH to LiveKit SIP links.
v4.0.x-develop's docs/ still declared Docusaurus ^3.3.2 with docusaurus-search-local 0.40.1 and no overrides; npm audit reported 67 advisories (19 critical) against its lockfile. Take develop's docs/package.json, package-lock.json and .nvmrc as they are today, which carries these develop commits: - 473ea74 docs: bump docusaurus to 3.10.1 - 5b52345 docs: pin serialize-javascript to ^7.0.5 to clear high-severity advisories - 19d4592 docs: build with Node.js 24 (bigbluebutton#25982) - .nvmrc, engines node >=24 and the README note - 218663a docs: update Docusaurus to 3.10.2 - 45bf274 resolve npm audit warnings in docs (mermaid override) The files are copied rather than cherry-picked because the lockfile has diverged here (dependabot bumps); develop's lockfile is consistent with its package.json. @mermaid-js/layout-elk ^0.1.9 from bigbluebutton#25983 (not on develop) is kept and resolved on top of develop's lockfile, which adds only layout-elk 0.1.9 and elkjs 0.9.3. search-local 0.52 needs the Worker fix from the previous commit. develop's lockfile itself has new advisories since 2026-10-06 (48 left, 17 critical); the next commit deals with those.

What does this PR do?
Replaces the outdated
22-connections.pngin the Internal network connections section of the architecture page (docs/development/architecture.md) with a Mermaid flowchart. The diagram now lives as text next to the prose, so it can be updated in the same PR as the code it describes.The diagram started from a hand-drawn redesign. Every box and edge was then checked against the
v4.0.x-developcode and packaging, plus the pinnedbbb-webrtc-sfuv2.25.0-beta.2 andbbb-webrtc-recorderv0.14.0, and corrected where it didn't match. The first commit is the transcription and the second is the corrections, so they can be reviewed separately.It also adds
@mermaid-js/layout-elkto the docs dependencies. Docusaurus'theme-mermaidenables the ELK layout automatically when that package is installed. Without it, Mermaid falls back to its default dagre layout, which routes several edges through unrelated boxes.static/img/22-connections.pngis not deleted, because the 3.0 docs still reference it.Screenshots
Rendered by the built 4.0 docs site (
docusaurus build+serve):Light mode
Dark mode
Corrections made to the original drawing
graphql-actionswas labelled "publishes to Redis" but had no edge to Redis. The edge is added.bbb-graphql-middleware/internal/gql_actions/client.go./var/mediasoup. Nothing writes/var/mediasoupwith the packagedrecordingAdapter: bbb-webrtc-recorder, so that path is dropped. The diagram now shows which component writes each directory.bbb-record-core: the inotify watch is on bbb-web's.donemarker file, and the recording events and the resque queue come from Redis. WebRTC media is remuxed with ffmpeg, not rsynced, before the originals are deleted.sfu -> livekit "API · webhook :3040"is split into two: sfu -> LiveKit server API on :7880, and LiveKit -> sfu webhooks on :3040.127.0.0.1:8185, not directly./userInfoauth hook; that edge was missing./hocuspocus/collaboration.blocknote_appdatabase.TODO
@mermaid-js/layout-elktodevelop'sdocs/package.jsonas well. The deploy workflow runsnpm ciondevelopand only copies the markdown in from the release branches, so until then docs.bigbluebutton.org will render this diagram with the fallback dagre layout.docs/development/recording.md("Captured files") lists audio only under/var/freeswitch/meetings. With LiveKit audio, the 4.0 default, it lands in/var/lib/bbb-webrtc-recorder/audio.How was this tested?
npm ci+npx docusaurus buildindocs/: PASSNODE_ENV=production npx docusaurus serve, then loaded/development/architecture/in Playwright (light and dark mode): PASS. All 21 nodes and 33 edges render, ELK is in the bundle, and the console has no "layout algorithm not registered" fallback warning.