Compare time zones at a glance. Each location is a column with a day/night gradient that tracks the time of day, so you can see who's awake, who's asleep, and what hours overlap.
Live at tzgrid.com.
git clone https://github.com/sphereboy/tzgrid.git
cd tzgrid
npm install
npm run devOpen http://localhost:3000.
Other scripts:
| Command | What it does |
|---|---|
npm run build |
Production build |
npm run start |
Serve the production build |
npm run lint |
Next.js ESLint |
npm run type-check |
tsc --noEmit |
npm run validate |
type-check + lint + build |
- Framework: Next.js 14 (App Router) + TypeScript
- State: Zustand with
persistmiddleware →localStorage. Seesrc/store/timeZoneStore.ts. - Main view:
src/components/TimeZoneComparer.tsx— clock columns, editable hours, gradient backgrounds. - Time math:
Intl.DateTimeFormatwith IANA identifiers; helpers insrc/lib/timeFormatting.ts. - Styling: Tailwind CSS + a CSS Module (
src/styles/TimeZoneComparer.module.css) for the column layout. Radix UI primitives insrc/components/ui/. - SEO surface: programmatic
/compare/[slug]and/time-in/[city]routes for high-intent search traffic.
src/
├── app/ # routes (App Router)
├── components/ # TimeZoneComparer, dialogs, ui/ primitives
├── store/ # zustand store + persistence
├── lib/ # time formatting, colors, validation
├── constants/ # IANA timezone mapping
└── types/ # shared types
Deeper notes live in docs/:
architecture.md— component + data-flow overviewstate-and-persistence.md— store shape, hydration, schema driftstyling-and-theming.md— gradient palette, themingseo-and-tentacles.md— programmatic SEO routesanalytics-and-privacy.md— GA setup and dev guardmonetization-roadmap.md— speculative product directions