Use Google’s official APIs
OAuth gave me calendar creation, email starring and Gmail’s own Important signal without storing app passwords or relying on private calendar links.
Independent product · Windows 11

A little clarity, right on your desktop.
I built a Windows desktop widget that brings two Gmail inboxes, two Google calendars and local notes together, with AI-assisted inbox-to-calendar syncing.
Interactive demo · Sample data · Nothing connected
01 / Try it
Peek into a week, read a conversation, capture a thought. This is the real interface running in your browser with fictional accounts, events and emails.
Interactive demo with sample data: click around, nothing is connected.
Open the demo in a new tab ↗Try moving to next week, opening an email or adding an event. Changes reset when you reload.
02 / The problem
My day was split across personal and work Google accounts. Meetings hid in email threads, calendars needed separate tabs, and quick notes ended up somewhere else again. I wanted one quiet place to see what mattered before opening the rest of my work.
Windows Widgets did not give me the combination of two Gmail inboxes, Google calendars and local files I needed. I designed PeekIn around a morning glance: what is happening, what needs attention, and what do I need to remember?
03 / Starting point
I started with a “My day” panel: account chips, a weekly calendar, important emails and local notes. The first build followed that hierarchy closely. Before building, I settled the choices that would determine how useful it could become.
OAuth gave me calendar creation, email starring and Gmail’s own Important signal without storing app passwords or relying on private calendar links.
I initially combined Important and Unread. Real use later showed why this missed recent conversations; I changed the list to Important, read or unread.
I chose the desktop layer with optional pinning. Showing the desktop should reveal the widget, not minimise it with every other window.


The experience
Blue means personal and purple means work throughout the widget. I kept that language consistent across chips, calendar bars, inbox columns and tabs, so switching context does not mean relearning the interface.
Event bars reveal busy days before you click. Week arrows and Today make planning ahead easy; + Event adds directly to the chosen calendar.
Important and Starred mirror Gmail. Conversations appear newest first, unread in bold. Open a safe preview, star a follow-up, or scroll older mail in the full inbox page.
The quick note auto-saves as a Markdown file. New notes open in the default editor, and the folder list updates when files change outside PeekIn.
Email, settings and AI prompt panels sit over the widget. Back returns to the previous view; Escape closes panels and visible focus rings support keyboard use.




04 / Architecture
Electron let me turn a web layout into a desktop app while reaching Google APIs and Windows through Node.js. I separated the interface from credentials and native operations instead of giving the renderer access to everything.
HTML, CSS and JavaScript. Sandboxed, context-isolated, with Node integration disabled.
Only explicitly exposed operations cross the bridge; the main process validates every IPC input.
Google API requests, encrypted tokens, local files and Win32 window behaviour.
Refresh tokens are encrypted using Windows DPAPI through Electron safeStorage. If encryption is unavailable, PeekIn refuses to save them.
Previews use a sandboxed iframe with no scripts, an opaque origin and their own content policy. Remote images load only when requested. A hostile test email confirmed scripts and handlers could not run.
Google integration
I enabled Gmail and Calendar in Google Cloud, configured test users and created a Desktop OAuth client. Bundling that client removed a setup step: users just sign in. Under Google’s installed-app model, the bundled client is not a confidential secret; PKCE and user consent protect the exchange.
Sign-in opens the default browser. A temporary loopback server receives the response; PeekIn checks a random state value and exchanges the code using PKCE before encrypting the tokens. Each account refreshes independently, and a rejected token becomes “Sign in again” instead of a silent failure.
Google’s Testing mode restricts access to listed users and expires refresh tokens after seven days. Publishing unverified removes that expiry but retains a consent warning and a 100-user cap. Managed Workspace accounts may need administrator approval.
| API / scope | Purpose |
|---|---|
| Gmail · gmail.modify | List Important or Starred threads, preview messages and change stars. PeekIn never sends or deletes mail. |
| Calendar · calendar.events | Read primary-calendar events and create new ones. |
| Identity · openid email | Identify the account shown in each slot. |
On Windows
I used koffi to call Win32 and made Progman, the Windows desktop window, the widget’s owner. That keeps PeekIn visible after Win+D. On blur it drops to the bottom without stealing focus; Pin switches to always-on-top when I need it beside my work.
The frameless window has a draggable header, remembered size and position, and no taskbar button. A tray menu handles show/hide, pinning, startup and quit. A single-instance lock brings the existing widget forward rather than opening another copy.

05 / Iterations
I iterated against real daily use, from the first working layout to v1.4.0. The sky background and frosted cards made the utility feel at home on the desktop; the cloud drift respects reduced-motion preferences.
| Version | What changed | Why |
|---|---|---|
| 1.0.0 | Calendar, inboxes and notes | Prove the mock-up and data plumbing. |
| 1.1.0 | Clouds, glass, logo, event bars, two inbox columns and email preview | Make the week readable and triage possible in place. |
| 1.2.0–1.2.2 | Account addresses, AI prompt, Back fix and newest Important threads | Remove account ambiguity and correct issues found in use. |
| 1.3.0 | Week carousel and Today | Plan beyond the current week. |
| 1.4.0 | Important / Starred and full inbox with infinite scroll | Keep follow-ups close without crowding the main card. |
Blockers & fixes
Browser-level automation helped, but desktop behaviour needed real Windows checks too. These were the fixes that most changed how I tested the app.
I kept Windows protection enabled. The development shortcut uses the trusted Electron runtime; distributing the unsigned installer remains a limitation on protected PCs. Code signing is the next step.
A separately isolated iframe did not lay out inside the transparent window. Disabling IsolateSandboxedIframes fixed rendering while retaining the iframe sandbox. I retested hostile email content.
The button overlapped Electron’s draggable header. I marked overlay panels no-drag and verified with real mouse clicks; synthetic clicks had missed the problem.
Important AND Unread excluded recent mail I had already read. Switching to all Important conversations, newest first, brought the widget into line with Gmail.
Launching from an MSIX-packaged parent redirected AppData into private storage. Launching through Explorer restored the normal user context; signing in there made the tokens available on later launches.
AI-assisted syncing
PeekIn does not run an AI model. It builds a prompt for an assistant that already has Gmail and Calendar access, filled with the account addresses, date and time zone.
The prompt searches both inboxes for upcoming commitments in the last 30 days, extracts the event details, checks the matching calendar for duplicates and flags reschedules or cancellations. Unclear items stay separate rather than being guessed.
The assistant must show a table and wait for confirmation before creating events. Confirmed events go to the matching account, with the source email in the description. The prompt explicitly forbids adding guests or sending invitations.

06 / Daily impact
The result is a working Windows app connected to two live accounts, with a per-user NSIS installer for sharing. I can show the desktop, scan the week, triage an email and capture a note in one place. The AI prompt gives me a repeatable way to review commitments that have not reached the calendar.
These are practical observations from my own use, not measured time savings or a user study. I checked live ordering against Gmail, exercised navigation and paging through automated UI checks, tested hostile email content, and verified desktop layering and drag regions in Windows.
What comes next
Building a desktop utility taught me to treat operating-system behaviour as part of the product, and to test where the user actually clicks.
The app currently supports primary calendars and a light theme. Previewing does not mark email as read, and replying or archiving still belongs in Gmail.
Unsigned builds and an unverified Google app add friction. Those are real product limitations, even when the widget itself works.