Skip to content

RahulJanagouda/TimeZoneConvert

Repository files navigation

Timezone Converter (PWA)

Open source repo of the live Android app

A React + Vite Progressive Web App for comparing one selected moment across multiple time zones.

Features

  • Select a date and scroll minute-by-minute through a full day.
  • Compare the same timestamp across multiple cities.
  • Add/remove time zones with search and suggested options.
  • Highlight business hours (9:00-16:59 local zone time).
  • Jump to the current minute with Go to Now.
  • Installable as a PWA (offline-capable after first load).

Tech Stack

  • React
  • Vite
  • vite-plugin-pwa (Workbox-powered service worker)
  • Plain CSS (no runtime UI dependency)

Project Structure

src/
  components/      # Presentational UI components
  data/            # Time zone datasets and defaults
  hooks/           # Reusable stateful logic
  utils/           # Date/time formatting and helpers
  App.jsx          # Page composition and orchestration
  main.jsx         # App bootstrap + SW registration
public/            # Static and PWA icon assets

Getting Started

1) Install dependencies

npm install

2) Start development server

npm run dev

3) Build for production

npm run build

4) Preview production build

npm run preview

PWA Notes

  • Service worker is registered in src/main.jsx using virtual:pwa-register.
  • PWA manifest and Workbox behavior are configured in vite.config.js.
  • App icons are in public/.

Maintainability Improvements Made

  • Broke a single large component into focused, reusable modules.
  • Extracted all date/time logic into src/utils/dateTime.js.
  • Isolated time-slot generation into src/hooks/useTimeSlots.js.
  • Moved timezone data into src/data/timezones.js.
  • Added linting configuration and standard npm scripts.

Future Enhancements

  • Persist selected zones/date in local storage.
  • Add keyboard navigation for the time scroller.
  • Add tests for date/time utilities and core UI flows.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors