Section 11: FastAPI and WebSocket for Realtime
Query once and broadcast to every viewer, and skip queries when nobody is watching
LISTEN dashboard_changed, debouncing, heartbeats and a cache for new clients
REST endpoints for the first load and for downloading report files
Section 12: Lab: A Vue 3 Dashboard with TypeScript and ECharts
A WebSocket composable with exponential backoff reconnects
The executive view: today's sales against last week, a 30-day trend, subsidiaries and latest orders
A pipeline and data quality status panel for the IT team
Light and dark themes, mobile support and readable chart colours
Section 13: Lab: Excel and Thai-Language PDF Reports
Building Excel files with openpyxl that use real formulas, charts and a metric definitions sheet
Rendering PDFs from HTML templates with Jinja2 and WeasyPrint, with embedded Thai fonts
Writing key findings automatically from the numbers
Section 14: Report Gate, Email and Scheduling
A three-level gate: data freshness, reconciliation with Oracle by currency and the share of quarantined records
Pass and the report goes to executives; fail and an ALERT goes to the data team, with duplicate sends prevented
Sending email over SMTP (STARTTLS, SSL, AUTH) and testing with Mailpit
Scheduling with APScheduler cron triggers and logging runs in ops.report_runs
Section 15: The Path to Production
Read-only Oracle accounts, requesting indexes from the DBA and keeping passwords in a secret manager
When to move to CDC with Debezium (LogMiner) and what it requires on the Oracle side
Scaling the dashboard across instances with Redis Pub/Sub, Nginx and authentication
Backups, monitoring and connecting Power BI or Excel to the mart layer
Section 16: Master Workshop: Regional Sales Data Platform
Open the dashboard to watch data flow in realtime and send the weekly report to Mailpit
Simulate a large batch of bad data until the report is held back and an ALERT is raised
Trace the cause in the issues table, fix the data at the source and rerun the report until it reaches executives
Present a plan for applying the platform to your organisation's own systems