A modern, responsive world clock application built with React, TypeScript, and Vite. Features real-time updates, day/night indicators, and an intuitive interface for tracking time across multiple cities and time zones.
- π Real-time Clock Display - Live updates for multiple time zones
- π Day/Night Indicators - Visual cues based on local sunrise/sunset times
- π City Search & Selection - Easy-to-use search functionality
- π± Responsive Design - Optimized for mobile, tablet, and desktop
- π¨ Adaptive Typography - Dynamic text sizing based on available space
- β‘ Fast Performance - Built with Vite for lightning-fast development and builds
- π§ͺ TypeScript Support - Full type safety throughout the application
- π― Accessible UI - WCAG compliant interface
- Node.js 18.0 or higher
- npm 9.0 or higher (or yarn/pnpm)
-
Clone the repository
git clone https://github.com/hugomrvt/mrvt-timespot.git cd mrvt-timespot
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:3000
(or the port shown in your terminal)
- Features
- Quick Start
- Scripts
- Project Structure
- Architecture
- Environment Variables
- Deployment
- Contributing
- Tech Stack
- Credits
- License
Command | Description |
---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Create production build |
npm run preview |
Preview production build locally |
npm run typecheck |
Run TypeScript type checking |
npm run lint |
Run ESLint with error reporting |
npm run format |
Format code with Prettier |
src/
βββ components/ # React components organized by feature
β βββ layout/ # Layout components
β β βββ Header.tsx
β β βββ AppHeader.tsx
β β βββ ResponsiveAppHeader.tsx
β β βββ MobileNavigation.tsx
β βββ time/ # Time-related components
β β βββ PrimaryTimeDisplay.tsx
β β βββ ResponsivePrimaryTimeDisplay.tsx
β β βββ TimeZoneCard.tsx
β β βββ ResponsiveTimeZoneGrid.tsx
β β βββ TimeFormatToggle.tsx
β βββ city/ # City information components
β β βββ CityInfoSection.tsx
β β βββ ResponsiveCityInfoSection.tsx
β βββ common/ # Shared/common components
β β βββ AdaptiveText.tsx
β β βββ ApiDataMonitor.tsx
β β βββ Credits.tsx
β β βββ StatusNotification.tsx
β β βββ TimeSpotIcon.tsx
β βββ ui/ # UI library components (shadcn/ui)
βββ hooks/ # Custom React hooks
β βββ useTimeZoneData.ts
β βββ useSunData.ts
β βββ useAdaptiveTextSize.ts
β βββ useBreakpoint.ts
β βββ useRealTimeUpdates.ts
β βββ useServerConnection.ts
β βββ useTouchDevice.ts
β βββ useUserPreferences.ts
βββ lib/ # Library code
β βββ api/ # API services
β β βββ localTimeApi.ts
β β βββ supabaseTimeApi.ts
β βββ utils/ # Utility functions
β βββ timezoneUtils.ts
β βββ secureLogger.ts
β βββ validation.ts
βββ pages/ # Page components
β βββ Frame6.tsx
βββ types/ # TypeScript type definitions
β βββ index.ts
βββ constants/ # Application constants
β βββ timezones.ts
βββ styles/ # Global styles
β βββ globals.css
βββ App.tsx # Main application component
βββ main.tsx # Application entry point
TimeSpot follows a modular, hook-based architecture with a local data service:
- ResponsivePrimaryTimeDisplay: Main time display with adaptive sizing
- ResponsiveTimeZoneGrid: Grid layout for multiple time zones
- TimeZoneCard: Individual time zone display cards
- useTimeZoneData: Manages time zone information and real-time updates
- useSunData: Provides sunrise/sunset data from local cache
- useAdaptiveTextSize: Dynamic font sizing based on container width
- useBreakpoint: Responsive design breakpoint detection
No environment variables are required by default. Everything works locally with the bundled JSON data and localStorage.
-
Build the application
npm run build
-
Deploy the
dist/
folder to your preferred hosting platform:
None required.
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run quality checks
npm run typecheck && npm run lint && npm run format
- Commit your changes
git commit -m 'feat: add amazing feature'
- Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
We follow Conventional Commits:
feat:
- New featuresfix:
- Bug fixesdocs:
- Documentation changesstyle:
- Code style changesrefactor:
- Code refactoringtest:
- Adding testschore:
- Maintenance tasks
- React 18 - Modern React with concurrent features
- TypeScript - Type-safe JavaScript
- Vite - Next-generation frontend tooling
- Original Design Inspiration: Nixtio on Dribbble
- Implementation: Hugo Mourlevat
This project is licensed under the MIT License - see the LICENSE file for details.
β Star this repository if you find it helpful!
Made with Figma Make & Trae by Hugo Mourlevat