AI in Action · Jul 14, 2026 · 13 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.
Most “sleep apps” ask for an account before they offer calm. I wanted the opposite: open the app, press play, and stay in the night — with the architecture matching that promise.
SleepCheck is AI in Action #2, after RetireCheck: a production 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 when the domain is sensory calm, not spreadsheet math.
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.

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.

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
A player-first PWA: studio-quality ambience loops, one-tap scenes, shareable mix links, guided stories via device speech synthesis, a fade-to-silence timer, and a local wind-down streak. Preferences and streaks stay in localStorage — no login and no cloud sleep database.
- Local-first experience
- Natural soundscapes + offline app shell
- Guided bedtime stories (browser TTS)
- Shareable mix URLs
- Installable Progressive Web App



Reference architecture
Unlike RetireCheck, which centered on deterministic financial calculations, SleepCheck centers on uninterrupted sensory experience. Different products deserve different architectures.
The critical path stays in the browser: Web Audio, speech synthesis, and on-device preferences. There is no account service and no backend required to press play — so a weak network at bedtime cannot break the core job. The service worker caches the shell and audio assets for offline install.

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.

Testing what matters at night
Users rarely notice exceptions. They notice:
- an audio click or gap in a loop
- an interrupted story
- a timer that ends abruptly instead of fading
- preferences that vanish after reload
- a shared mix link that does not restore levels
Quality therefore includes sensory experience, not just correctness. Manual QA on preview deployments covers preference persistence, mix-link restore, audio resume after tab backgrounding, timer fade, and offline install — open the build, press play, and listen.
Takeaways
- Define product philosophy before writing prompts.
- Architecture should follow the domain—not the technology stack.
- AI accelerates implementation.
- Engineers remain responsible for judgment.
- Quality includes both functional correctness and user experience.
- The highest leverage now comes from architecture, context engineering, validation, and continuous delivery.
Closing
RetireCheck, SleepCheck, and Readiness solve very different problems. Yet all three follow the same engineering philosophy: Build → Validate → Improve → Document → Share. That is the foundation of the AI in Action series.
Every 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.