Personal Case Study 05 // Local-First Photo Chronicle

Timeline — Photo Story Chronicle

A 100% client-side, privacy-preserving photo chronicle built in React 19, TypeScript 6, and IndexedDB that turns raw childhood and personal photo dumps into a chronological, map-pinned story—eliminating the hours of manual slide layout required by PowerPoint or Google Slides.

Initial JS Payload -70%

Cut from 1.93 MB to 584 KB (188 KB gzip) by dynamically importing heic2any on demand.

Date Resolution 3-Tier

EXIF DateTimeOriginal → regex filename parser → interactive Date Review Queue.

Worker Compression ≤ 1 MB

Pre-extracts EXIF & GPS DMS before Web Worker compression to 1920px binary Blobs.

Server & Cloud Cost $0 / mo

100% device-local IndexedDB storage keeps private childhood photos off third-party clouds.

00 // Interactive Sandbox Demo

Mini-App: 3-Tier Date Resolver, Timezone Guard & Chronicle

Interactive Pipeline Simulator
timeline_pipeline_sandbox.ts — EXIF + Local Date + IndexedDB
idb:hydrated (by-timestamp index · 4 photos)
01 // Origin & Product Scope

Replacing Slide-Deck Formatting With Automated Storytelling

01 // THE PERSONAL NEED

Sharing Childhood Stories Effortlessly

Born from helping two busy partners share childhood photos and life stories with each other without spending an entire weekend dragging pictures into PowerPoint slides and manually sorting years.

02 // PRIVACY BY DESIGN

100% Local IndexedDB Binary Blobs

Childhood and family photos are deeply personal. Storing compressed binary Blob objects inside browser IndexedDB removes cloud bucket costs and keeps sensitive memories strictly on the user's device.

03 // PRESENTATION MODE

Keyboard-Driven Chronicle & Maps

Once dropped, photos automatically sort along a Neo-Brutalist timeline featuring ArrowUp / ArrowDown stepping, an IntersectionObserver year minimap, lightbox zoom, and embedded Leaflet GPS maps.

02 // System Architecture

Metadata-First Ingestion & IndexedDB Pipeline

React 19 · TypeScript 6 · Vite 8
1. Pre-Compression Read

EXIF + Lazy HEIC

Extracts DateTimeOriginal & DMS GPS via exifreader before compression strips headers; lazy-loads heic2any only on .heic drops.

2. Date Resolution

3-Tier Fallback

1. EXIF timestamp → 2. Filename regex (IMG_YYYYMMDD) → 3. Flagged needsReview: true modal queue.

3. Local Persistence

IndexedDB (idb)

Web Worker compresses to ≤1 MB / 1920px and writes binary Blob records indexed on by-timestamp.

4. Story Surface

Chronicle & Leaflet

StrictMode-safe useObjectUrl previews, YearMinimap, keyboard stepper, and DMS-to-Decimal map pins.

03 // Hard Problems Solved

Engineering Highlights & Browser Edge Cases

Eliminating UTC Midnight Off-by-One Date Shifts

Native <input type="date"> controls emit strings like "2022-09-06". Passing that string to new Date("2022-09-06") parses as UTC midnight, shifting displayed dates backward by one full day (September 5, 2022) across Western Hemisphere timezones. Writing parseLocalDateInput to split YYYY-MM-DD and construct a local Date at noon (preserving existing time-of-day when editing) guarantees exact calendar dates everywhere.

StrictMode-Safe Blob ObjectURL Lifecycle Management

Creating preview URLs with URL.createObjectURL(blob) inside useEffect and calling setState synchronously triggers cascading renders and risks leaking or prematurely revoking URLs during React 19 StrictMode double mounts. A custom useObjectUrl hook defers creation to a microtask guarded by a cancelled flag, pairs each URL with its exact Blob reference, and deterministically revokes it on cleanup.

Cutting Initial Bundle Weight by ~70% While Preserving EXIF & HEIC

Bundling heic2any eagerly bloated the initial JS payload to 1.93 MB, while standard image compressors stripped EXIF metadata before timestamps or GPS coordinates could be read. Reading EXIF/DMS coordinates prior to Web Worker compression and switching heic2any to a dynamic import('heic2any') cut the main bundle to 584 KB (188 KB gzipped).

04 // Impact & Reflection

Why Local-First Personal Tools Are So Rewarding

Built for Us

More Time Reliving Memories, Zero Time Aligning Text Boxes

Instead of spending hours fighting slide templates, we can drop dozens of childhood scans and phone photos into Timeline, batch-verify only the undated pictures, and step through our shared story with keyboard shortcuts and live location pins.

Engineering Takeaway

Browser-Native Systems Engineering

Building without a backend forces disciplined engineering around binary Blob indexing in IndexedDB, Web Worker compression pipelines, DMS-to-Decimal coordinate math, and timezone-safe calendar parsing—verified end-to-end with zero ESLint/TypeScript errors and automated Playwright browser tests.

Explore More

See more personal builds or production full-stack systems

Explore Family Captions, ElizaPlaybill, BeeNight, JMF Survey, and my active MLPP internship.