Skip to content

Repository files navigation

🌀️ SSUET Weather App

🌀️ Live SSUET Weather App

A responsive full-stack weather web app with map integration, dashboard, blog, events, and newsletter system. Built using HTML, CSS, JavaScript, Node.js (Express), and SQL Server.

Screenshot 2025-06-16 011920 Screenshot 2025-06-16 011629 Screenshot 2025-06-16 011120

🧭 Table of Contents


🌦️ Overview

Weather Dashboard Pro provides real-time weather information with a sleek interface, integrated world map, and content-driven features. It combines data, design, and interactivity to create a complete platform for weather insights, user engagement, and content updates.


πŸš€ Features

🌍 Core Modules

βœ… Real-Time Weather: Fetches data from OpenWeatherMap API. βœ… Caching System: Reduces redundant API calls via SQL Server. βœ… Dynamic UI: Displays live temperature, wind, humidity, and conditions.

πŸ—ΊοΈ Map Integration

βœ… Interactive Leaflet.js map with city weather markers. βœ… Click any location to instantly view current weather. βœ… Pan and zoom support with real-time updates.

πŸ“Š Admin Dashboard

βœ… Displays most-searched cities and recent activity. βœ… Logs weather requests and API usage metrics. βœ… (Optional) User roles & JWT authentication.

πŸ“° Blog & Events

βœ… Blog posts about climate awareness and technology. βœ… Event scheduler for weather-related conferences or updates. βœ… Both managed through SQL Server with CRUD APIs.

πŸ“© Newsletter Subscription

βœ… Users can subscribe to weather alerts via email. βœ… Stored securely in SQL Server. βœ… Integrated with Nodemailer or SendGrid.

πŸ“± Responsive UI

βœ… Works seamlessly on desktop, tablet, and mobile. βœ… Clean, minimal, and modern CSS design. βœ… Uses Flexbox + Grid layout.


πŸ› οΈ Tech Stack

Layer Technology
Frontend HTML5, CSS3, Vanilla JS
Backend Node.js, Express
Database Microsoft SQL Server
APIs OpenWeatherMap, Leaflet.js
Libraries axios, mssql, cors, dotenv, nodemailer
Deployment GitHub Pages (frontend) + Render / Vercel (backend)

βš™οΈ Setup Guide

🧩 Prerequisites

  • Node.js (v16 or higher)
  • Microsoft SQL Server
  • API key from OpenWeatherMap

🧰 Installation

# Clone repository
git clone https://github.com/your-username/weather-dashboard-pro.git
cd weather-dashboard-pro/server

# Install dependencies
npm install

# Configure environment
cp .env.example .env

🧾 Example .env file

PORT=4000
WEATHER_API_KEY=your_openweather_api_key
DB_USER=sa
DB_PASSWORD=YourPassword
DB_SERVER=localhost
DB_DATABASE=WeatherPro
DB_PORT=1433
MAIL_USER=your_email@example.com
MAIL_PASS=your_app_password

▢️ Run Application

# Run backend
npm run dev

# Access in browser
http://localhost:4000

πŸ—ΊοΈ Map Integration

  • Uses Leaflet.js for open-source map visualization.
  • Dynamically adds markers showing temperature and weather icons.
  • Clicking a marker displays detailed data for that location.

Example snippet (client/js/map.js):

const map = L.map('map').setView([24.8607, 67.0011], 6);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  attribution: '© OpenStreetMap contributors'
}).addTo(map);

πŸ“Š Dashboard & Database

  • Backend logs every search request in SQL Server.
  • Cached weather results are stored in CityWeather table.
  • Subscribers, BlogPosts, and Events tables handle user and content data.

πŸ“° Blog & Events

  • Admin can add new blog posts and upcoming weather events via the dashboard.
  • Blog posts are dynamically fetched from the backend API.
  • Events display with date, location, and description.

πŸ“© Newsletter Subscription

  • Email subscription form with validation.

  • Backend endpoint:

    POST /api/subscribe
    { "email": "user@example.com" }
    
  • Data stored in Subscribers table and confirmation emails sent using Nodemailer.


πŸ“± Responsive Design

  • Optimized for all devices.
  • Built using modern CSS Grid and Flexbox.
  • Includes smooth animations, shadows, and transitions.

πŸ’‘ Future Improvements

  • Add 7-day forecast view.
  • Add user authentication and profile system.
  • Integrate Chart.js for temperature trend visualization.
  • Add dark/light mode toggle.

πŸ“œ License

This project is licensed under the MIT License β€” you are free to modify and use it.


🌟 Author

Syed Muhammad Azan

About

A responsive weather forecasting website built using HTML, CSS, JavaScript, Node.js, and SQL Server. It displays real-time weather data, interactive maps, and a clean dashboard for city-based forecasts. Includes blog, events, and newsletter subscription for user engagement. 🧩 Tech Stack: HTML, CSS, JS, Node.js, Express, SQL Server, OpenWeather API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages