Design Smart Mirror

Medium35 min
1 / 30
understanding8 min read

Problem statement: ambient smart mirror platform

How Problem statement: ambient smart mirror platform (understanding) informs Smart Mirror architecture and interviewer depth.

Problem statement: ambient smart mirror platform

Design a bathroom/kitchen smart mirror that overlays calendar, weather, fitness, and news on semi-transparent glass while respecting privacy in a shared home.

Numbers to state early

  • Metric A: 8M installed mirrors
  • Metric B: p95 widget paint < 180ms
  • Metric C: local-first UI

Mechanism

The mirror runs Android Things on an edge SoC with a compositor that dims the LCD behind two-way glass; cloud only supplies widget payloads and OAuth tokens—never raw camera frames by default.

Failure and edge cases

Steam fogging the glass, mis-detected face switching to a child's calendar, and ISP outage during morning rush must not blank the mirror—cached layouts and offline clocks remain.

Open with privacy-by-default (camera shutter + on-device face embeddings) before listing microservices; cite 8M installed mirrors when challenged on fleet scale.

Design pressure (understanding)

Shared bathrooms need profile handoff under 400ms without storing video; proximity IR wakes the panel only when someone stands within 60cm.

Java

javaOne Dark Pro
1public final class MirrorSession {
2 private final String householdId;
3 private final String profileId;
4 private final long layoutVersion;
5
6 public MirrorSession(String householdId, String profileId, long layoutVersion) {
7 this.householdId = householdId;
8 this.profileId = profileId;
9 this.layoutVersion = layoutVersion;
10 }
11}

Python

pythonOne Dark Pro
1@dataclass(frozen=True)
2class MirrorSession:
3 household_id: str
4 profile_id: str
5 layout_version: int

TypeScript

typescriptOne Dark Pro
1export interface MirrorSession {
2 householdId: string;
3 profileId: string;
4 layoutVersion: number;
5}

Why interviewers care

Smart Mirror interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.

Interview checkpoint

Name one failure story for Problem statement: ambient smart mirror platform that proves you understand real outages, not happy-path diagrams.

Key Highlights

  • 8M installed mirrors
  • Resident → Cloud
  • Design a bathroom/kitchen smart mirror that overlays calendar, weather, fitness, and news on semi-transparent glass whil.
What interviewers want to hear
Lead Problem statement: ambient smart mirror platform with numeric SLOs and shutter-default-closed privacy.
Pro tip
Keep GPU compositor on-device; cloud ships JSON manifests only for sec-001.

Section Rescue Kit

Buzzwords to use:

Shutter-default-closedLayout version

Safe statements:

  • "Widgets render locally; WAN carries signed JSON, not pixels."
  • "Face embeddings stay in secure enclave unless household opts into backup."
Design Smart Mirror - System Design | WinJob | WinJob