A simple, focused web application that compares weather data for any given date across multiple years. Select a date and location to see how the weather varied on that same date over the past years.
- Simple Inline Controls: Clean, minimal interface with inline buttons for quick access
- Today/Date Dropdown: Quick access to today's date or select a custom date
- City Dropdown: Searchable list of cities with quick-select options
- Year Range Dropdown: Choose from 10y, 20y, 30y, or 50y ranges
- Random Button: Instantly randomize date, location, and year range
- Search Modal: Comprehensive search with all inputs in one place
- Historical Comparison: View temperature, conditions, and precipitation for the selected date across multiple years
- Multiple View Modes:
- Grid View: Card-based layout with individual year cards
- Table View: Tabular data display
- Chart View: Visual chart/graph representation with color-coded bars
- Emoji View: Canonical format display matching share copy
- Single Column Layout: Clean, focused vertical layout
- Responsive Design: Optimized for desktop and mobile devices (breakpoints: 768px, 640px, 480px, 375px)
- Dynamic Weather Colors: Entire UI color scheme adapts to current weather conditions
- Temperature-based hue mapping (cold→blue/purple, warm→orange/red)
- Weather condition modifiers (sunny=vibrant, rainy=muted)
- Smooth transitions when changing selections
- Dark Mode: Toggle between light and dark themes with system preference detection
- Temperature Units: Switch between Celsius and Fahrenheit
- Loading States: Simple skeleton placeholders
- Error Handling: Retry buttons and user-friendly error messages
- Toast Notifications: CSS-only notifications for critical errors
- CSV Export: Download weather comparison data
- Share Feature: Copy canonical format with emoji grid to clipboard
- Format:
<MM/DD> <LOCATION> <N>Y <AVG_TEMP><UNIT>+ emoji grid - Color-coded emojis show temperature deviation from average
- Emoji grid order matches card display (newest year first)
- Supports both Fahrenheit and Celsius
- Format:
- White Christmas Mode: Toggle to explore Christmas Day weather history
- Automatically sets date to December 25th
- Special Christmas card view showing snow status for each year
- Snow effect animation when enabled
- Statistics showing years with/without snow
- Works in all view modes (Grid, Table, Chart, Emoji)
- Uses accurate snowfall data from Open-Meteo API
- Shows "Unknown" when snowfall data is unavailable
- Mobile Swipe Gestures: Navigate between days with swipe gestures
- Swipe left to go to next day
- Swipe right to go to previous day
- Only active on mobile devices
- Installable: Add to home screen on mobile and desktop
- Offline Support: Works offline after first load with service worker caching
- Standalone Mode: Runs as standalone app when installed
- Safe Area Support: Full iOS safe area support (notch, dynamic island, home indicator)
- Service Worker: Automatic updates with Workbox
- PWA Icons: 192x192 and 512x512 icons for app installation
- Optimized API Calls: 90-99% reduction in API requests through batching
- In-Memory Caching: 24-hour TTL cache for faster repeated queries
- Fast Load Times: 5-45x faster depending on feature
- Frontend: React with TypeScript, Vite
- Backend: Node.js with Express and TypeScript
- Weather API: Open-Meteo Historical Weather API (free, no API key required)
- Styling: CSS with responsive design
- Node.js (v18 or higher)
- npm or yarn
git clone <repository-url>
cd SameDaycd backend
npm installCreate a .env file in the backend directory (optional):
PORT=3001Note: No API key is required as the app uses the free Open-Meteo Historical Weather API.
Start the backend server:
npm run devThe backend will run on http://localhost:3001
Open a new terminal:
cd frontend
npm installCreate a .env file in the frontend directory (optional, defaults to localhost:3001):
VITE_API_URL=http://localhost:3001Start the frontend development server:
npm run devThe frontend will run on http://localhost:5173 (or another port if 5173 is busy)
SameDay/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── utils/ # Utility functions
│ │ │ ├── weatherBackground.ts # Dynamic color system
│ │ │ ├── exportUtils.ts # CSV/share exports
│ │ │ ├── temperatureUtils.tsx # Temperature conversion
│ │ │ └── trendAnalysis.ts # Weather trend analysis
│ │ ├── App.tsx # Main app component
│ │ ├── App.css # App styles & dynamic backgrounds
│ │ ├── index.css # Design system tokens
│ │ └── types.ts # TypeScript type definitions
│ └── package.json
├── backend/ # Express backend API
│ ├── src/
│ │ ├── routes/ # API routes
│ │ ├── services/ # Weather service logic
│ │ └── server.ts # Express server
│ └── package.json
└── README.md
Fetches historical weather data for a specific date across multiple years.
Query Parameters:
location(required): City name or coordinates (lat,lon)month(required): Month number (1-12)day(required): Day number (1-31)years(optional): Comma-separated list of years (defaults to last 10 years)
Example Request:
GET /api/weather/historical?location=New York&month=3&day=15&years=2020,2021,2022
Example Response:
{
"data": [
{
"year": 2020,
"date": "2020-03-15",
"temperature": {
"high": 65,
"low": 45
},
"condition": "Clear",
"precipitation": 0
}
],
"location": "New York"
}PORT: Server port (default: 3001)
VITE_API_URL: Backend API URL (default: http://localhost:3001)
- Start both the backend and frontend servers
- Open your browser to the frontend URL (typically http://localhost:5173)
- The app loads with "Today" and "New York" preselected
- Use the inline controls to:
- Today/Date: Click to open dropdown - select "Today" or "Select Date..." for custom date
- City: Click to open dropdown - search or select from quick options
- Year Range: Click to select 10y, 20y, 30y, or 50y
- 🎲: Randomize all settings (date, location, year range)
- 🔍: Open comprehensive search modal with all inputs
- Weather comparison results appear automatically when location is selected
This application uses the Open-Meteo Historical Weather API, which is free and requires no API key. The API provides historical weather data going back to 1940.
npm run dev: Start development server with hot reloadnpm run build: Build for productionnpm start: Start production server
npm run dev: Start development servernpm run build: Build for productionnpm run preview: Preview production build
- ✅ Simplified inline control bar (Today/Date, City, Year Range, Random, Search)
- ✅ Date comparison across multiple years
- ✅ Searchable city dropdown with quick-select options
- ✅ Year range selection (10y, 20y, 30y, 50y)
- ✅ Random button for instant exploration
- ✅ Comprehensive search modal with all inputs
- ✅ Grid view (card-based layout)
- ✅ Table view (tabular data)
- ✅ Chart view (visual charts with color-coded bars)
- ✅ Emoji view (canonical format matching share copy)
- ✅ CSV export functionality
- ✅ Share feature with canonical format and emoji grid
- ✅ Clipboard copy with toast notifications
- ✅ Dynamic weather-based color system (entire UI adapts to weather conditions)
- ✅ Dark mode support with system preference detection
- ✅ Temperature unit toggle (Celsius/Fahrenheit)
- ✅ Responsive single-column layout (mobile-optimized)
- ✅ Loading states with skeleton placeholders
- ✅ Error handling with retry buttons
- ✅ Toast notifications for critical errors
- ✅ Temperature trend analysis
- ✅ Accessibility features (ARIA labels, keyboard navigation)
- ✅ Default location setting (persisted in localStorage)
- ✅ Mobile swipe gestures for day navigation
- ✅ Optimized API calls (90-99% reduction)
- ✅ In-memory caching (24-hour TTL)
- ✅ Fast load times (5-45x faster)
- ✅ Service worker with Workbox
- ✅ Web app manifest
- ✅ PWA icons (192x192, 512x512)
- ✅ Offline support with API caching
- ✅ Safe area support for iOS devices
- ✅ Standalone mode support
- ✅ White Christmas mode with snow detection
- ✅ Christmas card view for December 25th
- ✅ Snow effect animation
- ✅ Mobile swipe gestures
ISC
Contributions are welcome! Please feel free to submit a Pull Request.