Weidong Shi.

AI in Action · Jul 14, 2026 · 12 min read

AI in Action #2: From an Idea to SleepCheck

How product thinking, reference architecture, and AI-assisted engineering shipped a production-ready local-first PWA — with judgment remaining entirely human.

AI changes where engineers spend their time—not who owns the decisions.

SleepCheck is the demonstration. It is AI in Action #2, after RetireCheck: a real, production-ready, local-first Progressive Web App built around product thinking, architecture, testing, and continuous improvement. Live at sleepcheck.weidong-shi.com.

The engineering process — intent, boundaries, review, and shipping discipline — is the durable product. The application proves that process works.

Wellness disclaimer: SleepCheck is a wind-down companion, not medical advice and not a treatment for sleep disorders. It does not track sleep with a microphone or wearable.

SleepCheck desktop player — Tonight hero, sleep timer, and scene grid
Player-first first viewport: scenes, timer, and one clear play affordance.

The product journey

Every AI in Action application follows the same methodology: Build → Validate → Improve → Document → Share. SleepCheck is one full pass through that loop — from a calm-night idea to a live PWA and a public write-up.

SleepCheck product journey diagram from idea through live app and feedback
From idea → constraints → AI-assisted build → live app → feedback loop.

The problem

Most “sleep apps” ask for an account before they offer calm. They push dashboards, streaks behind a login wall, and cloud narration that needs a network at the worst possible moment — when you are already in bed.

I wanted the opposite: open the app, press play, and stay in the night. No signup. No tracking server. Natural soundscapes and soft stories that feel like a finished product—not a demo of an API key.

Design principles

  • Local-first before cloud-first
  • Player-first before feature-first
  • Calm before analytics
  • Privacy before accounts
  • Progressive Web App (PWA)
  • One codebase across desktop and mobile

These principles became the architectural constraints that guided every engineering decision and every AI prompt.

What shipped

  • Local-first experience
  • Natural soundscapes
  • Guided bedtime stories
  • Browser speech synthesis
  • Progressive Web App
  • Offline capability
SleepCheck with a soundscape scene selected
A selected scene — the mix stays on-device and can be shared as a URL.
SleepCheck Stories tab with guided bedtime stories
Guided bedtime stories via browser speech synthesis — no cloud TTS at bedtime.
SleepCheck mobile Progressive Web App player
One codebase — installable Progressive Web App on mobile.

Reference architecture

Unlike RetireCheck, which centered on deterministic financial calculations, SleepCheck centers on uninterrupted sensory experience.

Different products deserve different architectures.

SleepCheck intentionally keeps its core domain entirely inside the browser.

SleepCheck reference architecture — user experience, application domain, browser platform, and engineering platform
Reference architecture for a local-first Progressive Web App — no backend in the critical path.

Engineer and AI Assistant

The workflow is intent-driven. The engineer owns product direction, architecture and boundaries, trade-offs, validation, accountability, and sensory QA. The AI assistant accelerates scaffolding, refactoring, UI exploration, tests and docs, and debugging support—never production judgment. Typecheck, build, and deploy gates dispose of every meaningful change.

Engineer and AI Assistant responsibilities diagram
Engineers own judgment and outcomes; the AI assistant accelerates inside constraints.

Testing what matters at night

Users rarely notice exceptions.

They notice:

  • an audio click
  • an interrupted story
  • a timer that ends abruptly

Quality therefore includes sensory experience, not just correctness. Preview deployments make review concrete—open the build, press play, and listen.

Takeaways

  1. Define product philosophy before writing prompts.
  2. Architecture should follow the domain—not the technology stack.
  3. AI accelerates implementation.
  4. Engineers remain responsible for judgment.
  5. Quality includes both functional correctness and user experience.
  6. The highest leverage now comes from architecture, context engineering, validation, and continuous delivery.

Closing

RetireCheck and SleepCheck solve very different problems. Yet both follow the same engineering philosophy: Build → Validate → Improve → Document → Share. That is the foundation of the AI in Action series.

Every future application explores a different domain while demonstrating the same engineering discipline. AI accelerates software delivery. Experienced engineering judgment shapes the final product.

If you're also exploring AI-assisted software engineering, I'd enjoy hearing how you're approaching architecture, testing, and product design.