-
Notifications
You must be signed in to change notification settings - Fork 3
docs(PE-649): initial drafts of architecture/block diagrams for examples #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds architecture block diagrams in DrawIO format to 14 example directories to improve visual documentation and help developers understand the system design and data flow for each example.
- Adds comprehensive architecture diagrams showing component interactions and data flows
- Includes legends for visual consistency and clarity
- Provides flow notes and configuration details for better understanding
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/send-plugin-message/architecture.drawio | Architecture diagram showing plugin message flow from video widgets through BrightScript handler to HTML application |
| examples/self-signed-certs/architecture.drawio | Diagram illustrating Node.js communication with BrightSign player's DWS using self-signed certificates |
| examples/provisioning-server/architecture.drawio | Architecture showing provisioning server flow with player check-ins, database logging, and content downloads |
| examples/node-starter/architecture.drawio | Simple diagram showing BrightSign player launching autorun.brs which starts Node.js HTTP server |
| examples/node-simple-server/architecture.drawio | Architecture depicting Node.js server serving static files and device info API |
| examples/local-storage/architecture.drawio | Diagram showing HTML slideshow caching images in browser localStorage |
| examples/indexeddb-caching/architecture.drawio | Architecture illustrating video caching using IndexedDB for offline playback |
| examples/htmlwidget-iframes/architecture.drawio | Diagram showing iframe trust configuration and BrightSign API access patterns |
| examples/html-starter/architecture.drawio | Simple architecture showing basic HTML widget loading and static file access |
| examples/enable-ldws/architecture.drawio | Comparison diagram showing three methods to enable LDWS (BrightScript, Node.js, Registry) |
| examples/cec-interface/architecture.drawio | Comparison of two CEC implementation methods (BrightScript roCecInterface vs JavaScript @brightsign/cec) |
| examples/bs-sqlite-db/architecture.drawio | Architecture showing BrightScript/Node.js SQLite database operations via MessagePort |
| examples/bs-self-updater/architecture.drawio | Diagram depicting self-updating flow with bootstrap autorun and Node.js updater downloading new versions |
| examples/bluetooth-scan/architecture.drawio | Architecture showing Bluetooth scanning via HTML/JS Bluetooth API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,193 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| @@ -0,0 +1,110 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| </mxCell> | ||
|
|
||
| <!-- Flow annotation --> | ||
| <mxCell id="flow-note" value="Caching Strategy:<br>1. Create IndexedDB (videos_db/videos_os)<br>2. Check cache for existing videos<br>3. Play first video (cached or download)<br>4. Background download remaining videos<br>5. Store video blobs in IndexedDB<br>6. Subsequent playback from cache<br>7. Auto-advance & loop playlist" style="text;html=1;strokeColor=#333333;fillColor=#ffffff;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;strokeWidth=1;" vertex="1" parent="1"> |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text mentions "videos_db/videos_os" but "videos_os" appears to be a typo. It should likely be "videos_store" or "videos" (the object store name within the IndexedDB database).
| <mxCell id="flow-note" value="Caching Strategy:<br>1. Create IndexedDB (videos_db/videos_os)<br>2. Check cache for existing videos<br>3. Play first video (cached or download)<br>4. Background download remaining videos<br>5. Store video blobs in IndexedDB<br>6. Subsequent playback from cache<br>7. Auto-advance & loop playlist" style="text;html=1;strokeColor=#333333;fillColor=#ffffff;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;strokeWidth=1;" vertex="1" parent="1"> | |
| <mxCell id="flow-note" value="Caching Strategy:<br>1. Create IndexedDB (videos_db/videos_store)<br>2. Check cache for existing videos<br>3. Play first video (cached or download)<br>4. Background download remaining videos<br>5. Store video blobs in IndexedDB<br>6. Subsequent playback from cache<br>7. Auto-advance & loop playlist" style="text;html=1;strokeColor=#333333;fillColor=#ffffff;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=11;strokeWidth=1;" vertex="1" parent="1"> |
| @@ -0,0 +1,166 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| @@ -0,0 +1,131 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| @@ -0,0 +1,121 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |
| <mxfile host="app.diagrams.net" modified="2025-12-22T00:00:00.000Z" agent="Claude" version="22.0.0"> |
| @@ -0,0 +1,169 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |
| <mxfile host="app.diagrams.net" modified="2025-12-22T00:00:00.000Z" agent="Claude" version="22.0.0"> |
| @@ -0,0 +1,131 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| @@ -0,0 +1,90 @@ | |||
| <mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="22.0.0"> | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modified date is set to "2024-01-01T00:00:00.000Z" (January 1, 2024), which appears to be a placeholder or default value. Consider updating this to reflect the actual creation/modification date of the diagram.
| <mxCell id="arrow3" value="3. HTTP GET<br>Download autorun.zip" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#000000;strokeWidth=2;startArrow=classic;startFill=1;endArrow=classic;endFill=1;" edge="1" parent="1" source="nodejs" target="server"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This self-update flow shows index.js performing an HTTP GET to download autorun.zip from SERVER_URL and then replacing autorun.brs with its contents, but the implementation uses plain http:// and does not perform any cryptographic integrity or authenticity checks on the zip. If an attacker can spoof or intercept the connection to the update server (for example via network MITM or by compromising the server), they can supply a malicious autorun.zip and gain arbitrary code execution on the player. The update mechanism should require HTTPS with certificate validation and verify a strong cryptographic signature or pinned hash for the update package before unzipping and activating it.
blshukla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we create these as mermaid diagrams in markdown files? That way it can be viewed in github easily.
If it is easy enough to change to Mermaid, then let's use that since it is easier to read and review. |
|
Looked over a few of the examples. Couple bits of feedback. Otherwise looks good. Will continue to consult whether we best leverage drawio or mermaid, or other tools. |
📝 Description
This PR adds architecture block diagrams to each of the examples in this project.
Some of the diagrams may need some rearranging to best display design or sequence.
Issue: Url to Jira Issue
📋 List of Changes
✔️ Dev Complete Checklist