A static timezone visualization tool for easy sharing and collaboration. Visualize timezone overlaps across the globe with daylight indicators and responsive design. All configuration is stored in the URL for easy sharing.
The code in this codebase, from v0.0.1-PrePublicSetup through v1.0.0 (and onwards!), was created nearly 100% by GitHub Copilot Agent Mode. The intuitive timezone visualization, responsive site design, comprehensive test suite, automated CI/CD, and modern TypeScript architecture were all generated in collaboration with AI.
Development Metrics:
What AI Created:
- β Core TypeScript timezone logic with comprehensive timezone handling
- β Sophisticated CSS with theming system for responsive design
- β Comprehensive test coverage with robust test suite
- β Responsive design supporting 6 screen sizes
- β Theme system with 6 color themes and light/dark modes
- β Build system with TypeScript, linting, and CI/CD
- β URL-based configuration for easy sharing
- β Astronomical calculations using SunCalc library integration
Direct Human Contributions:
- Some merge commits and repository setup
- Minor README updates and Copilot instruction refinements
- Project architecture, planning and coordination, and code feedback
- Interactive timezone visualization: Select and display multiple timezones with hour-by-hour timeline
- Daylight/night indicators: Shows sunrise/sunset periods using SunCalc library
- Working hours highlighting: Visual indicators for business hours (9 AM - 5 PM)
- Responsive design: Adapts timeline layout based on screen size
- Theme system: Multiple color themes with light/dark mode support
- URL-based configuration: All settings stored in URL parameters for easy sharing
- Static deployment: No server required - runs entirely in browser
- TypeScript-based: Modern development with type safety and ES2022 modules
Node.js 22.0+, npm, Git, and a modern web browser.
- Clone the repository
git clone https://github.com/tsmarvin/EveryTimeZone.git
cd EveryTimeZone
- Install dependencies
npm install
# or if you prefer yarn
yarn install
- Start development server
./dev-server.sh # Build and serve at http://localhost:8000
npm run dev # Alternative using TypeScript watch mode
- Open your browser
Navigate to
http://localhost:8000
EveryTimeZone/
βββ .devcontainer/ # Codespaces configuration
βββ .github/ # GitHub workflows and configs
β βββ workflows/ # CI/CD workflows
β βββ ci.yaml # Pull Request Actions
β βββ deploy.yaml # Deploys the built static site to GitHub pages on merges to main
β βββ release.yml # Publishes GitHub releases on merges to main
βββ .husky/ # Git hooks
βββ src/ # Source code
β βββ index.html # Main HTML file
β βββ styles/ # CSS styles with theme system
β βββ scripts/ # TypeScript modules
β βββ app.ts # Application coordinator
β βββ index.ts # Main timezone logic and timeline rendering
β βββ settings.ts # Settings panel and theme management
βββ test/ # Test suite (Vitest + jsdom)
βββ dist/ # Built files (auto-generated)
βββ .gitignore # Git ignore patterns
βββ .prettierignore # Prettier ignore patterns
βββ .prettierrc # Prettier configuration
βββ CODESPACES.md # GitHub Codespaces documentation
βββ LICENSE # MIT license
βββ commitlint.config.cjs # Commit message linting
βββ dev-server.sh # Development server script
βββ eslint.config.js # ESLint configuration
βββ gitversion.yml # GitVersion configuration
βββ package.json # Dependencies and scripts
βββ package-lock.json # Dependency lock file
βββ tsconfig.json # TypeScript configuration
βββ vitest.config.ts # Vitest test configuration
βββ README.md # This file
npm run build
- Build the project for production (TypeScript compilation + asset copying)npm run dev
- Start TypeScript watch mode for developmentnpm run clean
- Remove dist directorynpm run copy-assets
- Copy HTML, CSS, and external libraries to distnpm run test
- Run full test suite (lint + type-check + unit tests)npm run test:watch
- Run tests in watch modenpm run test:coverage
- Run tests with coverage reportnpm run lint
- Run ESLint on TypeScript filesnpm run lint:fix
- Run ESLint with auto-fixnpm run format
- Format code with Prettiernpm run format:check
- Check code formattingnpm run type-check
- Run TypeScript type checking without compilation
This project uses several tools to maintain code quality:
- TypeScript - Type safety and better development experience
- ESLint - Code linting and style enforcement
- Prettier - Code formatting
- Commitlint - Enforces conventional commit messages
- Husky - Git hooks for pre-commit checks
- Frontend: HTML, CSS (with CSS custom properties for theming), TypeScript (ES2024 modules)
- Timezone Logic: Native browser Intl APIs for timezone detection and formatting
- Astronomical Calculations: SunCalc library for sunrise/sunset times
- Build Process: TypeScript compiler (tsc) with asset copying - no bundling required
- Testing: Vitest with jsdom for DOM environment simulation
- Code Quality: ESLint + Prettier + TypeScript strict mode + Commitlint
- Development: Native ES modules with HTTP server for local development
- Deployment: GitHub Pages with automated deployment via GitHub Actions
- Versioning: GitVersion with conventional commits for semantic versioning
Timeline Visualization (index.ts
)
- Manages timeline display and selected timezones
- Provides searchable timezone selection with wheel navigation
- Responsive calculations based on screen size
- Daylight indicators using SunCalc library
Settings System (settings.ts
)
- Manages appearance settings (theme + light/dark mode)
- URL persistence for appearance sharing
- CSS custom properties with 6 different color themes
Application Coordination (app.ts
)
- Initializes components in correct order
- Handles DOM ready state and module loading
The application automatically deploys to production when code is merged into the main
branch:
- π Continuous Integration: Full test suite (lint + format + type-check + unit tests) runs on every pull request
- π Release Pipeline:
release.yml
GitHub Action publishes the built site as a GitHub release with automatically generated release notes from conventional commit messages - π Web Deployment:
deploy.yml
GitHub Action publishes the built site directly to GitHub Pages using the modern deployment API
The application uses GitVersion for semantic versioning:
- π·οΈ Runtime Version: Dynamically injected into the site before deployment (package.json maintains static version
1.0.0
) - π Version Display: Injected into built HTML and displayed in footer
- π Branch Strategy: Main branch deploys live releases, feature branches get prerelease versions
The repository supports a development workflow for previewing changes before they reach production:
Branch Structure:
main
- Production branch (deploys to https://everytimezone.net/)develop
- Development branch (deploys to sub-directories for preview)
Workflow Process:
- Create PR targeting
main
- Standard development flow - If Copilot screenshots are sufficient β
- Merge directly to
main
- If preview needed π - Change PR target to
develop
branch:- Merge PR to
develop
- GitHub Actions automatically deploys to
https://everytimezone.net/test-PR{number}/
- Review and iterate on the preview site
- When ready, merge
develop
βmain
(triggers cleanup of preview sites)
- Merge PR to
Preview Deployment:
- Trigger: Push to
develop
branch - URL Format:
https://everytimezone.net/test-PR{number}/
(PR number extracted from merge commit) - Manual Trigger: Workflow can be manually triggered with custom PR number
- Cleanup: All preview sites (
test-PR*
) are automatically removed whendevelop
is merged tomain
Benefits:
- β Preview complex changes that can't be verified via screenshots
- β Share preview links with stakeholders for feedback
- β Test deployments in production-like environment
- β Automatic cleanup prevents orphaned preview sites