Daily Platform Operations Audit

Reading Progress68%

Chapter 33: Daily Platform Operations Audit

Operating a high-throughput event platform is not a one-time architecture exercise — it is a recurring discipline. Every production day, I run a structured audit across layout cohesion, accessibility, container security, tenant isolation, scheduler health, and documentation fidelity. The objective is not checkbox compliance; it is to catch drift before it becomes an incident or an audit finding. This chapter documents the operational playbook I execute on DEML and the invariants it enforces.

Responsiveness, layout harmony, and viewport height

Mobile-first is non-negotiable. Every stylesheet defaults to single-column layouts and scales up with @media (min-width: …) — never the reverse. The enforcement script node scripts/check_mobile_first.js scans Angular, Viking-UI, marketing, and Django static surfaces for forbidden desktop-first max-width breakpoints and fails CI when violations appear. Dashboard pages share one shell: .dashboard-page-container.dashboard-content-area.page-inner-wrapper at --viking-container-max-width (1260px). The public /status route uses the same container classes so navigation between Command Center, Analytics, Settings, and System Status produces zero horizontal layout shift. Full viewport height is managed intentionally: .dashboard-wrapper and .dashboard-page-container chain min-height: calc(100vh - var(--navbar-height)) with flex children that grow (flex: 1) so sidebars and main content initialize to full height without cropping scroll regions.

Framework cohesion and light/dark modes

Angular deml.app, Astro marketing, Django templates, and Swagger UI all load the same compiled viking-ui.css bundle synced from packages/viking-ui/src/styles/ via scripts/sync_design_system.py; external consumers can use the equivalent CDN assets from jsDelivr. Static CSS is built by packages/viking-ui/scripts/build-css.mjs, and Angular keeps includePaths pointed at the canonical package token directory for library component SCSS. Light mode shifts lightness only; semantic aliases (--viking-bg, --viking-surface, --viking-accent) preserve WCAG 2.1 AA contrast in both themes. node scripts/enforce-theme.js blocks hardcoded hex drift before merge.

Accessibility and Section 508

Keyboard navigation, visible :focus-visible rings (--viking-ring), semantic headings, explicit image alts, and aria-* on dynamic widgets are enforced mechanically. node scripts/run_axe.js targets marketing HTML and Astro output for WCAG 2.1 AA violations. Viking-UI form stacks compose through viking-field so labels, errors, and required states remain screen-reader coherent. Status alone is insufficient — automated gates run on every pre-commit pass.

Production deployment and distroless runtimes

Production hosts are Vercel for the Angular app (deml) and Fly.io for the Django API (deml-backend); the FORJD engine deploys from the FORJD repository (docs/VERCEL.md, docs/FLY.md). Railway is retired for the data plane and the Angular frontend; infrastructure/railway/services.json catalogs the retired services and scripts/railway_retire_dataplane.py performs cleanup. The Django API compiles dependencies and collectstatic in python:3.11-slim-bookworm, then runs from gcr.io/distroless/python3-debian12 as UID nonroot. No shell, no package manager, no opportunistic curl inside the runtime — the attack surface is the binary and its shared libraries, nothing else. Health checks hit /api/v1/ready on the API service.

Database ingestion, retention, and scheduler efficiency

Telemetry enters through /api/v1/ingest (and its batch form) as client-sealed envelopes. Django authenticates each call, resolves the tenant binding, and forwards to FORJD synchronously through the BFF adapters; FORJD owns the transactional outbox (Postgres outbox + Dragonfly streams), durable delivery, retries, and DLQ admission. FORJD projects idempotently into durable stream_results and analytics. Retention is enforced in FORJD: raw telemetry and audit evidence age out at 30 days, and outbox/DLQ windows are engine policy. Tenant data erasure flows through FORJD POST /api/v1/tenants/{id}/erase plus the DEML account lifecycle. FORJD's scheduler creates durable, unique UTC task buckets for analytics, reports, exports, threat intelligence, cleanup, and ML training. Email dispatches on the DEML side use durable queues—no fire-and-forget request threads. A DEML-local OpenTelemetry Collector → ClickHouse → Redpanda plane is retired; see Chapter 34.

Multi-tenant security and regulatory alignment

Every ORM query that touches tenant-owned rows filters by authenticated tenant UUID or explicit account_id from API key resolution. Background workers iterate Tenant.objects.all() symmetrically — Tenant0 is bootstrapped as is_platform_tenant=True, not hardcoded as a string FK. Field-level AES-256-GCM with GCP KMS envelope rotation protects integration secrets. Immutable Cloud Logging satisfies SIEM non-repudiation for SOC 2 CC7 and CMMC AU controls. CES aggregation is the sole exception to strict per-tenant siloing: FORJD analytics rollups feed Threat, SLA, and Stableness gauges with mathematically anonymized outputs — no raw user identifiers cross into the CES engine.

Code quality and test synchronization

Before any merge, I run uvx pre-commit run --all-files, npm run test:viking-ui, backend pytest on touched modules, and rebuild static CSS when tokens change. Dead dependencies are pruned from package.json and requirements.txt when enforcement proves them unused. Tests mirror security boundaries: mocked tenant contexts in API tests, idempotency keys in event contract tests, and Vitest coverage on chart math, auth signals, and icon resolution in Viking-UI.

Documentation as operational truth

When infrastructure or compliance posture changes, I update BOOK.md first, sync WHITEPAPER.md milestones, refresh the live /documentation Developer Portal on the marketing site, and run python3 scripts/sync_content.py so deml.app routes and search indexes stay aligned. Documentation is not marketing copy — it is the contract operators and auditors read when production behavior must be verified under stress.