Experience weather forecasting elevated to an interactive art form. Weather Forecast Pro fuses real-time global sat-link forecasts with Gemini-powered generative weather narratives, smart environmental wellness diagnostics, and voice-guided controls, all wrapped in a high-refraction glassmorphic cinematic user interface.
- Project Overview
- Futuristic Project Description
- Core & Advanced Features
- Weather X AI System
- Health & Weather Intelligence
- Natural Voice Assistant
- Weather-Reactive Particle System
- Tech Stack
- Installation & Local Setup
- Optimized Directory Structure
- Screenshots & Visual Previews
- Production Deployment Guide
- Future Expansion Scope
- Author & Contributions
Weather Forecast Pro is a cinematic, state-of-the-art climate intelligence platform. Built with React 18, Vite 6, and TypeScript, it is powered by tailwindcss v4 and modern motion graphics. The platform completely bypasses flat, uninspired grid layouts in favor of an immersive dashboard that responds organically to the weather itself.
By integrating the OpenWeatherMap API with Google Gemini 2.0 AI, Weather Forecast Pro transforms dry statistics (like barometric pressure, wind headings, and humidity decimals) into clear, conversational, actionable lifestyle advice.
Imagine stepping onto the bridge of an atmospheric command center.
Weather Forecast Pro delivers this precise aesthetic. It treats climate telemetry not as static columns of numbers, but as an interactive dashboard. As you search any city worldwide:
- The background morphs: Canvas-driven golden sun-rays sweep across your monitor on clear afternoons; misty fog blankets your screen at night; high-speed raindrops slice downward during storms; and light snowflakes drift gently on winter mornings.
- Refractive panels float: Custom glassmorphic cards refract the background canvas dynamically using high-performance hardware-accelerated
-webkit-backdrop-filterand advanced CSS grids. - Tactical widgets pulse: Smart alert cards highlight coastal flash fog or severe squalls, while interactive Leaflet radar globes trace wind vectors and cloud density in real-time.
This is not a utility app โ it is a cinematic, high-fidelity experience designed to make weather forecasting beautiful and interactive.
- Auto-location Detection: Detects your location via the browser Geolocation API with graceful fallback to Delhi if blocked.
- Instant Unit Conversion: Switch dynamically between metric and imperial scales, with all charts, summaries, and metrics updating instantly.
- Tactical Solar Readings: Sunrise/Sunset schedules calculated with precise local offset timers.
- Dual Trend Visualization: Hourly trends and daily High-Low forecasts visualized using beautifully animated SVG curves and ChartJS layouts.
- Adaptive Mesh Glows: High-performance multi-colored gradient blobs float in the background, rotating and scaling based on current conditions.
- Tactical Feed Indicator: A pulsing, neon-cyan live sat-link simulation indicator provides the high-energy feedback of active satellites.
- Interactive Hover Shimmers: Cards reflect a bright, sleek light shimmer when swept over by a cursor, guided by custom cubic-bezier transitions.
- Offline Caching: Built-in configuration options allowing instant offline viewing of cached weather.
- Local Storage Storage: Saves your home city and favorite locations automatically so they load immediately upon launch.
At the heart of the platform sits Weather X AI โ a premium futuristic weather concierge.
graph TD
A[User Search / Query] --> B(Weather Context Engine)
C[OpenWeatherMap API] --> B
B --> D{VITE_GEMINI_API_KEY Configured?}
D -- Yes --> E[Request Google Gemini 2.0 Flash]
D -- No --> F[Activate Premium Fallback NLP]
E --> G[Generate Cinematic Personalized Advice]
F --> H[Parse Interactive Fallback Matrix]
G --> I[Immersive Output UI]
H --> I
I --> J[Text-to-Speech Engine Speaks Narrative]
- Utilizes Gemini 2.0 Flash via a custom API connector inside geminiService.ts.
- Merges real-time weather metrics (temp, feels-like, wind headings, UV indices, air contaminants) with a highly specialized prompt matrix.
- Delivers conversational summaries, travel safety recommendations, outdoor viability reviews, and outfit advice.
- If no Gemini key is provided, the platform automatically switches to a complex local NLP generation engine. It processes 12 different weather states, dry/damp environments, cold transitions, and high-velocity wind headings to output realistic human-sounding advice.
- Handles target cities like Goa or Shimla with specialized micro-narratives tailored to high-altitude or coastal resort microclimates!
Weather Forecast Pro incorporates an advanced Environmental Wellness Dashboard inside HealthIntelligence.tsx.
It calculates an organic Environmental Wellness Score from 0 to 100 based on:
- Air Contaminants: Evaluates AQI levels, PM2.5 concentrations, and Ozone levels.
- Thermal Stress: Evaluates extreme temperature boundaries and "feels-like" temperature differentials.
- Moisture & Wind: Factoring in humidity and high wind fatigue factors.
- ๐โโ๏ธ Outdoor Activity Viability: Detailed evaluations on athletic training limits, running viability, and fatigue points.
- ๐ซ Respiratory Defense: Specific alerts on asthma triggers and dust thresholds when PM2.5 levels rise.
- ๐งด Dermal Shielding: Smart recommendations on UV sunscreen factors (SPF 30 vs 50) and moisturization requirements based on relative dry indexes.
No futuristic deck is complete without speech interaction. Weather Forecast Pro features a custom-engineered Voice Assistant hook useVoiceAssistant.ts.
- One-Touch Hands-Free Control: Connects directly to the Web Speech API for rapid Speech Recognition.
- Intelligent Speech Synthesis: Automatically converts generated markdown outputs into natural, clear speech.
- Voice-Filter Matrix: Filters out asterisks, hash characters, and backticks to deliver pure, fluid speech.
- Preferred Voice Selection: Scans the client system voices to bind to high-quality female English voices (Samantha, Zira, Hazel, Heather, Karen) for a sleek, responsive tone.
- Cinematic Pulse State: The Weather X AI avatar scales, glows, and rotates in sync with vocal input states (Listening, Thinking, Speaking).
Animations in Weather Forecast Pro run on a hardware-accelerated HTML5 Canvas particle loop within WeatherReactiveBackground.tsx.
| Weather Condition | Canvas Particle Style | Ambient Glow Colors | Special Overlay FX |
|---|---|---|---|
| Clear Day | Golden & cyan dust drifting slowly upward | #ff8a00 to #FFB800 |
Conic-gradient sweeping sun-rays |
| Clear Night | Sparkling blue celestial dust | #1e1b4b to #4f00d0 |
Starry night coordinates |
| Cloudy | Dense slate particles floating slowly | #6366f1 to #494455 |
Overcast ambient dim |
| Rainy | Fast-dropping vertical rain vectors | #004d66 to #001B4B |
Falling rain streaks |
| Thunderstorm | Rapid blue-cyan raindrops | #1a0a2e to #4f00d0 |
Random high-contrast light flashes |
| Snowy | Swirling fluffy white circles rotating 360ยฐ | #70d2ff to #cac3d8 |
Falling drifting snow flakes |
| Foggy | Heavy gray dust hovering in static states | #494455 to #333535 |
Mouse-interactive radial fog |
- Client Core Framework: React 18.3.1 (TypeScript v5)
- Build System & Tooling: Vite 6.3.5 (configured for ultra-fast Hot Module Replacement)
- Styling & Layout System: Tailwind CSS v4.1.12 (
@import 'tailwindcss'source system) - Interactive Dynamic Maps: React Leaflet 4.2.1 & Leaflet 1.9.4
- Motion Graphics & Physics: GSAP 3.15 & Motion (React)
- Charts & Telemetry Curves: Recharts 2.15.2 & Chart.js 4.4.9
- Developer Icons: Lucide React & Google Material Icons
Get your own weather intelligence platform running locally in under 3 minutes:
git clone https://github.com/javawithaaryan/Weather-Forecast-Pro.git
cd Weather-Forecast-ProWe recommend using npm or pnpm to resolve lock files cleanly:
npm installCreate a .env file in the root directory:
# OpenWeatherMap API Key (A default fallback key is included inside weatherService.ts)
VITE_OPENWEATHER_API_KEY=your_openweather_api_key_here
# Google Gemini API Key (Required for the Weather X AI Assistant)
VITE_GEMINI_API_KEY=your_gemini_api_key_herenpm run devOpen http://localhost:5173 in your browser.
Verify bundle sizes and build files cleanly:
npm run buildThe project has been cleaned, refactored, and organized to enforce absolute separation of concerns:
Weather-Forecast-Pro/
โโโ dist/ # Compiled production bundles
โโโ public/ # Static metadata assets
โ โโโ manifest.json # PWA manifest configurations
โโโ src/
โ โโโ ai/
โ โ โโโ WeatherXAI.tsx # Weather X AI chat panel component
โ โโโ animations/
โ โ โโโ effects.css # Canvas-particle weather style physics
โ โ โโโ WeatherReactiveBackground.tsx # Primary canvas animation orchestrator
โ โโโ app/
โ โ โโโ components/ # Primary Dashboard component modules
โ โ โ โโโ ui/ # UI design system components
โ โ โ โโโ AirQuality.tsx # AQI telemetry widget
โ โ โ โโโ BottomNavigation.tsx # Viewport quick-links bar
โ โ โ โโโ CurrentWeather.tsx # Hero temperature display
โ โ โ โโโ Header.tsx # Brand header with GPS toggle
โ โ โ โโโ HourlyForecast.tsx # Tactical timeline display
โ โ โ โโโ SearchCommandCenter.tsx # Relocated unified location command bar
โ โ โ โโโ SevenDayForecast.tsx # Orbital 7-day projection widget
โ โ โโโ App.tsx # Core Application layout orchestrator
โ โโโ charts/
โ โ โโโ WeatherCharts.tsx # SVG trend curves and telemetry charts
โ โโโ context/
โ โ โโโ WeatherContext.tsx # Unified state & caching context
โ โโโ health/
โ โ โโโ HealthIntelligence.tsx # Wellness and respiratory advisors panel
โ โโโ hooks/
โ โ โโโ useVoiceAssistant.ts # Web Speech API recognition & speech hook
โ โโโ maps/
โ โ โโโ WeatherMap.tsx # Interactive Leaflet dark radar map
โ โโโ services/
โ โ โโโ geminiService.ts # Gemini API query controller & fallback NLP
โ โ โโโ healthIntelligence.ts # Health score & advice generation engine
โ โ โโโ weatherService.ts # Axios OpenWeatherMap fetch & mapping adapter
โ โโโ styles/
โ โ โโโ fonts.css # Custom font weights & Material Symbols
โ โ โโโ index.css # Unified global style entry point
โ โ โโโ tailwind.css # Tailwind v4 import configs
โ โ โโโ theme.css # CSS variables & glassmorphism configurations
โ โโโ utils/
โ โ โโโ weatherHelpers.ts # Conversions, date parsing, icon mapping
โ โโโ voice/
โ โ โโโ VoiceWaveform.tsx # Sound waves indicator for Voice Assistant
โ โโโ weather/
โ โ โโโ types.ts # Core TypeScript interface declarations
โ โโโ main.tsx # React DOM compiler mount point
โ โโโ vite-env.d.ts # Vite TS definitions
โโโ .env.example # Env reference file
โโโ .gitignore # Git tracking exclusions
โโโ index.html # Core HTML mount page
โโโ package.json # Project scripts and dependencies
โโโ postcss.config.mjs # PostCSS configurations
โโโ vercel.json # Single-Page App redirect routing configuration
โโโ vite.config.ts # Custom Vite resolver & plugin setups
Weather Forecast Pro includes routing redirects optimized for Single-Page Applications deployed on modern platforms.
This project is configured out-of-the-box for Vercel via vercel.json:
- Push your code to GitHub.
- Go to Vercel Dashboard and click Add New Project.
- Import this repository.
- Add your Environment Variables in the Vercel Setup Wizard:
VITE_OPENWEATHER_API_KEYVITE_GEMINI_API_KEY
- Click Deploy. Vercel will automatically build the project using Vite and deploy it to a high-speed CDN.
The platform is designed to scale with these architectural additions:
- ESP32 Sensor Array Direct Link: Integrate real-time micro-climate metrics via domestic IoT sensors over WebSockets.
- Cinematic Precipitation Audio: Spatial atmospheric background sound loops (raindrops, wind chimes, distant thunder) synced directly to weather conditions.
- Interactive 3D Earth Globe: A WebGL/ThreeJS interactive planet model to trace worldwide global jet streams.
- Multi-location Dynamic Compare Grid: Cross-compare climate matrices of up to 4 global cities side-by-side.
Developed with โค๏ธ by Aryan Rathore
- Github: @javawithaaryan
- Project Repo: Weather Forecast Pro
This project has been thoroughly refactored, performance-optimized, and built to stand out as a top-tier hackathon-level portfolio piece. Contributions, issue reports, and stars are always welcome!
Powered by OpenWeatherMap API & Google Gemini 2.0 AI ยท Cinematic Intelligence Platform