Worldtimez is a modern, user-friendly timezone comparison application built with React and Material-UI. It allows users to easily compare times across different timezones with an intuitive drag-and-drop interface.
- π Compare multiple timezones simultaneously
- π Set specific date & time to compare
- π Drag-and-drop interface for reordering timezones
- π Dark/Light mode support
- π± Responsive design for all devices
- π Smart timezone search with city suggestions
- πΎ Persistent storage of user preferences
- β‘ Fast and efficient time conversions
- Clone the repository:
git clone https://github.com/ziarahman/worldtimez.git
cd worldtimez- Install dependencies:
npm install- Copy
.env.exampleto.env.localand fill in your API keys:
cp .env.example .env.local- Start the development server:
npm run dev-
Local Development
- Copy
.env.exampleto.env.local - Fill in your API keys in
.env.local - Run
npm run dev
- Copy
-
Production Deployment (Vercel)
- Go to your Vercel project settings
- Navigate to "Environment Variables"
- Add the following variables:
VITE_GEODB_API_KEYVITE_OPENCAGE_API_KEYVITE_OPENWEATHER_API_KEYVITE_TIMEZONEDB_API_KEY
- Click "Deploy" to rebuild with new environment variables
-
Managing Environment Variables and API Keys
- Create a new file named
.envin the root of your project - Add your API keys to the
.envfile, for example:VITE_GEODB_API_KEY=YOUR_GEODB_API_KEYVITE_OPENCAGE_API_KEY=YOUR_OPENCAGE_API_KEYVITE_OPENWEATHER_API_KEY=YOUR_OPENWEATHER_API_KEYVITE_TIMEZONEDB_API_KEY=YOUR_TIMEZONEDB_API_KEY
- Make sure to add the
.envfile to your.gitignorefile to avoid committing sensitive information
- Create a new file named
- Node.js (v18 or higher)
- npm (v9 or higher)
- Clone the repository:
git clone https://github.com/ziarahman/worldtimez.git
cd worldtimez- Install dependencies:
npm install- Start the development server:
npm run dev- Open http://localhost:4242 in your browser
- Create a production build:
npm run build- Start the production server:
npm start- Build the Docker image:
docker build -t worldtimez .- Run the container:
docker run -p 4242:4242 worldtimez- Frontend: React 18, TypeScript, Vite
- UI Components: Material-UI (MUI)
- State Management: Zustand
- Date/Time Handling: Luxon
- API Services:
- GeoDB Cities API: For city data and geolocation
- OpenCage Geocoding API: For geocoding and reverse geocoding
- OpenWeatherMap API: For weather data and geolocation
- TimezoneDB API: For timezone information
- Nominatim API: For additional geocoding capabilities
- React - UI Framework
- TypeScript - Language
- Material-UI - Component Library
- Luxon - DateTime Handling
- @dnd-kit - Drag and Drop
- Vite - Build Tool
worldtimez/
βββ src/
β βββ components/ # React components
β βββ data/ # Timezone data and utilities
β βββ lib/ # Helper functions
β βββ types/ # TypeScript type definitions
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
βββ public/ # Static assets
βββ server.js # Production server
βββ package.json # Project dependencies
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Timezone Database for timezone data
- Material-UI for the beautiful components
- @dnd-kit for the drag and drop functionality
Made with β€οΈ by Zia Rahman + Vibe Coding with AI π€ using Windsurf.