WeatherGPT is an AI-powered conversational weather platform designed specifically for India's diverse linguistic and agricultural landscape. Instead of complex meteorological graphs and raw numerical tables, WeatherGPT delivers role-specific, conversational briefings in 6 native Indian scripts with two-way voice speech (STT & TTS), live GPS locality detection, and dual-city side-by-side comparisons.
%%{init: {'theme':'dark', 'themeVariables': {'primaryColor':'#0EA5E9','primaryTextColor':'#fff','primaryBorderColor':'#0EA5E9','lineColor':'#0EA5E9','fontSize':'16px'}}}%%
flowchart TD
A["🛰️ Satellite Weather + 📍 Live GPS Coordinates"] --> B["🧠 Generative AI Meteorological Reasoning Engine<br/>Gemini 1.5/2.0 Flash • Claude 3.5 • GPT-4o-mini"]
B --> C["🗣️ Native Indian TTS Audio Stream + Local Script Output<br/>বাংলা • हिंदी • தமிழ் • తెలుగు • मराठी • English"]
style A fill:#0F172A,stroke:#0EA5E9,color:#fff
style B fill:#1E3A8A,stroke:#0EA5E9,color:#fff
style C fill:#0F172A,stroke:#0EA5E9,color:#fff
|
WeatherGPT dynamically tailors advice, tone, and focal parameters by role:
|
|
|
| Language | Native Script | Voice STT | Native Audio TTS |
|---|---|---|---|
| Hindi | हिंदी | ✅ | ✅ |
| Bengali | বাংলা | ✅ | ✅ |
| Tamil | தமிழ் | ✅ | ✅ |
| Telugu | తెలుగు | ✅ | ✅ |
| Marathi | मराठी | ✅ | ✅ |
| English | English (IN/Global) | ✅ | ✅ |
d:\Weather GPT\
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── chat/route.js # Multi-LLM dispatcher (Gemini, Claude, OpenAI)
│ │ │ └── tts/route.js # Serverless Native Indian TTS MP3 Audio Streamer
│ │ ├── globals.css # Weather tint design tokens & animations
│ │ ├── layout.jsx # Root layout with Noto Indian Google Fonts
│ │ └── page.jsx # Main WeatherGPT orchestrator
│ ├── components/
│ │ ├── Sidebar/ # Search, Persona selector, Weather widget
│ │ ├── Header/ # Live GPS indicator, city title, compare mode
│ │ ├── Chat/ # Message bubbles, TTS player, Quick chips
│ │ ├── Forecast/ # 7-day & 24-hour sliders
│ │ ├── Modals/ # Compare cities modal & GPS permission overlay
│ │ └── UI/ # Alert banner, Toast notifications, ErrorBoundary
│ ├── hooks/
│ │ ├── useGeolocation.js # GPS auto-detect state machine
│ │ ├── useWeather.js # Google Weather & Open-Meteo fallback
│ │ ├── useSpeechRecognition.js # STT voice recording
│ │ └── useSpeechSynthesis.js # Continuous audio streaming hook
│ └── lib/
│ ├── config.js # Environment variable manager
│ ├── constants.js # Indian cities DB, WMO weather table
│ ├── i18n.js # 6-language native UI dictionary
│ ├── geocoding.js # 4-tier reverse geocoding engine
│ ├── weatherApi.js # Google Weather & Open-Meteo normalizer
│ ├── llmService.js # Meteorological reasoning engine
│ └── speech.js # Clean audio script processor
├── .env.example # Environment variables template
├── package.json # Next.js 14 & React 18 dependencies
├── vercel.json # Vercel deployment configuration
└── README.md
|
1. Clone the Repository git clone https://github.com/devashishgorai/WeatherGpt.git
cd WeatherGpt2. Install Dependencies npm install3. Configure Environment Variables Copy cp .env.example .env.localFill in your API keys in # 1. Google Maps & Weather API Key
NEXT_PUBLIC_GOOGLE_API_KEY=your_google_maps_api_key
# 2. Google Gemini API Key (100% Free from https://aistudio.google.com/)
NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key
# 3. Anthropic Claude Key (Optional)
NEXT_PUBLIC_CLAUDE_API_KEY=
# 4. OpenAI Key (Optional)
NEXT_PUBLIC_OPENAI_API_KEY=4. Run Development Server npm run devOpen https://temp-gpt-ten.vercel.app/ in your browser. 5. Build for Production npm run build
npm start |
- Push your code to your GitHub repository.
- Go to vercel.com/new and import your repository.
- In Environment Variables, add:
NEXT_PUBLIC_GOOGLE_API_KEYNEXT_PUBLIC_GEMINI_API_KEYMONGODB_URIAUTH_SESSION_SECRETAUTH_DATA_ENCRYPTION_KEYTWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_VERIFY_SERVICE_SID
- Set the variables for Production (and Preview if you test preview deployments). Signup requires
MONGODB_URI,AUTH_SESSION_SECRET, andAUTH_DATA_ENCRYPTION_KEY; SMS login also requires the Twilio variables. - Redeploy after saving the variables — Vercel will automatically build and host the Next.js App Router application.
🛡️ Zero Location Tracking — GPS coordinates are requested strictly locally in the browser to query meteorological radar data and are never stored or shared.
📡 Local Fallback — WeatherGPT functions seamlessly with smart built-in meteorological intelligence even when offline or without an active LLM key.