Khoa Nguyen

All rights reserved © yunkhngn · v1.6.6

Work

Better Sleep

Better Sleep is a modern Chrome Extension designed to optimize your sleep schedule using 90-minute sleep cycles. It offers a smart sleep planner, reminders, and visual insights to help you wake up refreshed.

Better Sleep

Role

Solo — design & engineering

Year

2026

Stack

HTML5CSS3Vanilla JavaScriptChrome Extension Manifest V3
Source Live demo

Case study

Overview of Better Sleep

Better Sleep is a practical Chrome Extension engineered to help users achieve optimal sleep by leveraging the science of 90-minute sleep cycles. Its primary purpose is to guide individuals towards ideal bedtimes and wake-up times, ensuring they complete full sleep cycles and wake up feeling more refreshed and energized. The extension integrates seamlessly into the browser, providing a convenient tool for managing sleep habits.

Main Technologies and Rationale

The extension is built using standard web technologies: HTML5 for structuring content, CSS3 (with Variables, Flexbox/Grid) for styling and responsive layouts, and Vanilla JavaScript (ES6+) for all its interactive logic and calculations. This stack is ideally suited for a Chrome Extension due to its native browser support, ensuring high performance and a light footprint. Utilizing Manifest V3 ensures compliance with the latest Chrome Extension platform requirements, offering enhanced security and modern API capabilities.

Key Features

  • Sleep Cycles Calculation: Precisely determines optimal sleep and wake-up times based on 90-minute sleep cycles.

  • Comprehensive Sleep Planner: Features both 'Wake Up Mode' (plan bedtime based on desired wake-up) and 'Sleep Now Mode' (plan wake-up based on immediate sleep).

  • Smart Reminders: Delivers gentle notifications to help users wind down and prepare for sleep.

  • Simple Sleep Tracking: Allows for one-click logging of sleep duration and morning mood.

  • Visual Insights: Presents weekly sleep patterns and personalized data to understand sleep quality.

  • Multi-language Support: Offers broad accessibility with support for English, Vietnamese, Japanese, French, Chinese, and Korean.

  • Privacy-First Design: Ensures all user data is stored locally on the device, emphasizing data privacy.

Technical Challenges

Developing Better Sleep likely involved several technical hurdles. Accurately calculating sleep cycles and managing time-based reminders within the constraints of a browser extension required careful JavaScript implementation. Ensuring a smooth, intuitive user experience within a compact extension UI, while supporting multiple languages, added layers of complexity. Furthermore, handling local data storage efficiently and securely using Chrome Extension APIs was crucial for the privacy-first approach, requiring robust local storage management.

What I Learned

Insights from Developing Better Sleep

  • Chrome Extension Development: Gained deep understanding of Manifest V3, background scripts, content scripts, and UI integration within the browser ecosystem.

  • Time-Based Logic & Calculations: Mastered implementing complex time calculations and scheduling reminders, crucial for a sleep-planning application.

  • Local Data Management: Learned best practices for securely storing and retrieving user data locally using browser storage APIs, paramount for privacy-focused applications.

  • Internationalization (i18n): Implemented multi-language support, understanding the challenges and patterns for making an application accessible to a global audience.

  • UI/UX for Small Footprint Apps: Explored how to design an effective and user-friendly interface for a compact browser extension, balancing functionality with minimal screen real estate.

Complexity Label: Intermediate

Better Sleep is classified as an Intermediate project. This justification stems from its comprehensive feature set, which goes beyond basic browser extensions. It involves complex time-based calculations, local data storage and tracking, scheduled notifications, and multi-language support. While built with vanilla web technologies, the integration of these features into a robust and user-friendly Chrome Extension, especially adhering to Manifest V3, requires a solid understanding of JavaScript, Chrome Extension APIs, and thoughtful architectural design.

Keep exploring

Related work

2025

FPTU Schedule

A modern Chrome extension that helps FPT University students easily extract and manage their exam schedules from the FAP system, simplifying the tracking and export of academic deadlines.

2026

IG Tracker

A powerful Chrome Extension to track your Instagram followers, following lists, and detect unfollowers, providing comprehensive insights directly from your browser.

From the journal

2026-11-15

Beautiful on the Surface, Engineered Underneath - My Legacy Website

Building a Personal Website into a Microservice Platform. An engineering retrospective on building a design-driven personal website backed by a microservice architecture, computer vision experiments, automated Docker builds, and production infrastructure."

2026-11-16

Engineering Lawise: Building an AI-Powered LegalTech Platform

From legal documents to actionable intelligence — exploring the engineering behind an AI-powered legal platform built with Next.js, polyglot microservices, PostgreSQL, pgvector, and OpenAI.

2026-06-22

In the morning, I just need

"In the morning, I just need, want to hold, want to kiss, want to have breakfast, and brush teeth together."

Next project

Online Guestbook →