Skip to content

viveksharma2105/Zomato-weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒค๏ธ Zomato Weather App

๐Ÿ“Š View Project Presentation

Real-time weather data powered by Zomato Weather Union API ๐Ÿš€

Live Demo โ€ข Features โ€ข Installation โ€ข API


๐Ÿ“‹ Table of Contents


๐ŸŒ Overview

Zomato Weather App is a modern, responsive web application that provides real-time weather information across 577+ cities in India. Built with vanilla JavaScript and powered by Zomato's Weather Union API, it delivers accurate hyperlocal weather data from IoT sensors and rain gauge systems.

Why This App?

  • ๐ŸŽฏ Hyperlocal Accuracy: Get precise weather data from ground-level sensors
  • ๐Ÿ“ก Real-time Updates: Live data from AWS and rain gauge systems
  • ๐Ÿ—บ๏ธ Wide Coverage: Access weather info from 577+ Indian localities
  • ๐Ÿ“ฑ Mobile Friendly: Fully responsive design works on all devices
  • โšก Fast & Lightweight: No heavy frameworks, just pure performance

โœจ Features

Core Features

  • ๐ŸŒก๏ธ Real-time Temperature - Live temperature readings in Celsius
  • ๐Ÿ’ง Humidity Monitoring - Track moisture levels in the air
  • ๐Ÿ’จ Wind Data - Get wind speed and direction information
  • ๐ŸŒง๏ธ Rain Metrics - Monitor rain intensity and accumulation
  • ๐Ÿญ Air Quality Index - Check PM 2.5 and PM 10 levels
  • ๐Ÿ“ Dual Search Modes:
    • Coordinates (Latitude/Longitude)
    • Locality Code (e.g., ZWL001156)

UI/UX Features

  • ๐ŸŽจ Beautiful Animations - Smooth, modern interface with animated elements
  • ๐Ÿ• Live Clock - Real-time clock display
  • ๐Ÿ” Smart Search - Browse and search through 577+ locations
  • ๐Ÿ“Š Data Visualization - Clean, organized weather information display
  • ๐ŸŒˆ Responsive Design - Works seamlessly on desktop, tablet, and mobile

๐Ÿ› ๏ธ Tech Stack

Frontend

  • HTML5 - Semantic markup
  • CSS3 - Modern styling with animations
  • Vanilla JavaScript - Pure JS, no frameworks needed
  • Google Fonts - Poppins font family

Backend

  • Node.js - Runtime environment
  • HTTP/HTTPS modules - Native Node.js modules for server and API calls
  • File System (fs) - Serve static files

API

  • Zomato Weather Union API - Real-time weather data provider

Deployment

  • Render - Cloud platform for deployment
  • Git/GitHub - Version control

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js (v14.0.0 or higher)
  • npm (comes with Node.js)
  • Git

Quick Start

  1. Clone the repository
git clone https://github.com/viveksharma2105/Zomato-weather.git
cd Zomato-weather
  1. Install dependencies (if any are added in the future)
npm install
  1. Set up environment variables
# Create a .env file (optional, API key has fallback)
echo "API_KEY=your_zomato_api_key_here" > .env
echo "PORT=3000" >> .env
  1. Start the server
npm start
  1. Open in browser
http://localhost:3000

๐ŸŽฎ Usage

Method 1: Search by Coordinates

  1. Select ๐Ÿ“ Coordinates (Lat/Long) option
  2. Enter latitude (e.g., 12.933756)
  3. Enter longitude (e.g., 77.625825)
  4. Click ๐Ÿ” Get Weather

Method 2: Search by Locality Code

  1. Select ๐Ÿ˜๏ธ Locality Code option
  2. Enter locality code (e.g., ZWL001156)
  3. Click ๐Ÿ” Get Weather

Method 3: Browse Locations

  1. Click ๐Ÿ—บ๏ธ Browse All Locations button
  2. Search for your city or locality
  3. Click on any location to fetch weather data automatically

๐Ÿ”Œ API Reference

Base URL (Local)

http://localhost:3000

Endpoints

1. Get Weather by Coordinates

GET /weather/coordinates?latitude={lat}&longitude={lon}

Parameters:

Parameter Type Required Description
latitude float Yes Latitude coordinate
longitude float Yes Longitude coordinate

Example:

curl "http://localhost:3000/weather/coordinates?latitude=12.933756&longitude=77.625825"

Response:

{
  "status": "success",
  "message": "Locality weather data",
  "device_type": 1,
  "locality_weather_data": {
    "temperature": 28.5,
    "humidity": 65,
    "wind_speed": 3.2,
    "wind_direction": 180,
    "rain_intensity": 0,
    "rain_accumulation": 0
  }
}

2. Get Weather by Locality

GET /weather/locality?locality_id={id}

Parameters:

Parameter Type Required Description
locality_id string Yes Locality code (e.g., ZWL001156)

Example:

curl "http://localhost:3000/weather/locality?locality_id=ZWL001156"

๐Ÿš€ Deployment

Deploy on Render

  1. Push your code to GitHub
git add .
git commit -m "Initial commit"
git push origin main
  1. Create a new Web Service on Render

    • Go to Render Dashboard
    • Click "New +" โ†’ "Web Service"
    • Connect your GitHub repository
  2. Configure the service

    • Name: zomato-weather-app
    • Build Command: Leave empty (or npm install if you add dependencies)
    • Start Command: npm start
    • Environment Variables:
      • API_KEY = your_zomato_api_key
  3. Deploy!

    • Click "Create Web Service"
    • Wait for deployment to complete
    • Visit your live URL: https://your-app.onrender.com

Environment Variables

Variable Description Required
PORT Server port (auto-assigned by Render) No
API_KEY Zomato Weather Union API Key Recommended

๐Ÿ“ธ Screenshots

Desktop View

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐ŸŒฆ๏ธ Weather Union          Current Time: 14:30:45  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                      โ”‚
โ”‚         ๐ŸŒ Real-Time Weather Data                   โ”‚
โ”‚    Get accurate weather information powered by      โ”‚
โ”‚         Zomato Weather Union API                    โ”‚
โ”‚                                                      โ”‚
โ”‚    โ—‹ ๐Ÿ“ Coordinates (Lat/Long)                      โ”‚
โ”‚    โ—‹ ๐Ÿ˜๏ธ Locality Code                              โ”‚
โ”‚                                                      โ”‚
โ”‚    ๐Ÿ—บ๏ธ [Browse All Locations (577+ Cities)]         โ”‚
โ”‚                                                      โ”‚
โ”‚    [Latitude Input]    [Longitude Input]            โ”‚
โ”‚              [๐Ÿ” Get Weather]                       โ”‚
โ”‚                                                      โ”‚
โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚    โ”‚  ๐ŸŒค๏ธ Weather Information              โ”‚        โ”‚
โ”‚    โ”‚  ๐ŸŒก๏ธ Temperature: 28.5ยฐC              โ”‚        โ”‚
โ”‚    โ”‚  ๐Ÿ’ง Humidity: 65%                     โ”‚        โ”‚
โ”‚    โ”‚  ๐Ÿ’จ Wind Speed: 3.2 m/s              โ”‚        โ”‚
โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/AmazingFeature
  1. Commit your changes
git commit -m "Add some AmazingFeature"
  1. Push to the branch
git push origin feature/AmazingFeature
  1. Open a Pull Request

Contribution Ideas

  • ๐ŸŒ Add weather forecast (hourly/daily)
  • ๐Ÿ“Š Add charts and graphs for weather trends
  • ๐Ÿ—บ๏ธ Integrate interactive maps
  • ๐ŸŒ™ Add dark mode toggle
  • ๐Ÿ”” Add weather alerts and notifications
  • ๐ŸŒ Add internationalization (i18n)
  • ๐Ÿ“ฑ Create a mobile app version

๐Ÿ“ License

This project is licensed under the ISC License.


๐Ÿ‘จโ€๐Ÿ’ป Author

Vivek Sharma


๐Ÿ™ Acknowledgments

  • Zomato Weather Union - For providing the weather API
  • Google Fonts - For the Poppins font family
  • Render - For hosting services
  • Open Source Community - For inspiration and support

๐Ÿ“ž Support

If you have any questions or need help, feel free to:

  • Open an Issue
  • Contact: [Your Email]

๐ŸŒŸ Show Your Support

Give a โญ๏ธ if this project helped you!


Made with โค๏ธ and โ˜• by Vivek Sharma

About

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors