How juniorxxue/comp7503-tutorial-materials works
This repository packages a tutorial stack for polling Hong Kong Observatory (HKO) data, storing it in MongoDB, and displaying it in a Node-RED dashboard. The main workflow is: a student starts the stack, startup renders environment-specific settings into the demo flow, Node-RED polls HKO and updates the chart, and MongoDB provides persistent storage. The graph also shows documented setup, persistence, and first-boot user provisioning. Source excerpts are limited to Node-RED package and settings files; other relationships are based on the README, so implementation details beyond it are not inferred.
Main entry points: compose.yaml Compose stack · scripts Start scripts · HKO.Flow.json HKO polling flow · entrypoint.sh Node-RED entrypoint
Components 18
Stack operations
- Start scripts
scripts - Flow renderer
scripts - Stop scripts
scripts - Reset scripts
scripts
Node-RED flow
- Demo flow source
HKO.Flow.json - Rendered flow
nodered/flows.json - HKO polling flow
HKO.Flow.json - Dashboard chart
HKO.Flow.json
Runtime services
- Compose stack
compose.yaml - Node-RED entrypoint
nodered/entrypoint.sh - Node-RED runtime
nodered/package.json - MongoDB service
compose.yaml - App-user initialization
mongodb/init/01-create-app-user.sh
Configuration and state
- Environment template
.env.example - MongoDB data volume
compose.yaml - Node-RED data volume
compose.yaml
Other components
- Student
- HKO service
Connections 24
- Student → Start scripts: starts stack
README.md - Start scripts → Environment template: creates if missing
README.md - Start scripts → Flow renderer: runs
README.md - Flow renderer → Demo flow source: reads
README.md - Flow renderer → Environment template: reads settings
README.md - Flow renderer → Rendered flow: renders
README.md - Start scripts → Compose stack: starts
README.md - Compose stack → Node-RED entrypoint: starts service
README.md - Node-RED entrypoint → Rendered flow: seeds flow
README.md - Node-RED entrypoint → Node-RED runtime: launches
README.md - Node-RED runtime → HKO polling flow: runs
README.md - HKO polling flow → HKO service: polls
README.md - HKO polling flow → MongoDB service: stores data
README.md - HKO polling flow → Dashboard chart: updates chart
README.md - Compose stack → MongoDB service: starts service
README.md - MongoDB service → App-user initialization: initializes user
README.md - MongoDB service → MongoDB data volume: persists data
README.md - Node-RED entrypoint → Node-RED data volume: seeds persistent data
README.md - Compose stack → Node-RED runtime: configures service
README.md - Student → Stop scripts: stops stack
README.md - Student → Reset scripts: resets stack
README.md - Stop scripts → Compose stack: stops services
README.md - Reset scripts → MongoDB data volume: removes volume
README.md - Reset scripts → Node-RED data volume: removes volume
README.md