Skip to content

ZainAliYousaf/Smart-Weather-App

Repository files navigation

🌤 Weather App (React + Node.js + Express + MongoDB)

A full-stack Weather Application built using React.js (frontend) and Node.js + Express + MongoDB (backend).
The application allows users to search weather conditions, view 5-day forecasts, and save favorite cities.

🚀 Features

✅ User Authentication

  • User Registration
  • Login with plain-text credentials
  • Session stored in localStorage

✅ Weather Search

  • Search weather by city
  • Login required before accessing weather
  • Displays current weather
  • Displays 5-day weather forecast

✅ Premium Featured Cities

  • Predefined major cities
  • “View Details” redirects to the weather details page
  • Login required before accessing weather details

✅ Favorite Cities

  • Logged-in users can save cities
  • Saved cities stored in MongoDB
  • Accessible through dashboard
  • Among saved cities, user can favorite anyone

✅ Protected Routes

  • Weather search
  • Weather details
  • Favorite cities
  • Dashboard

All protected and redirect to login when the user is not authenticated.

🛠 Tech Stack

Frontend

  • React.js
  • React Router
  • Custom CSS
  • Fetch API

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • OpenWeather API

Here is the Database link "mongodb://localhost:27017/myDBTest".

  • For Frontend, run "npm run dev"
  • For backend "Nodemon index.js"

Note : First run backend in one terminal and then run Frontend in another Terminal.

Download folder completely as zip from Github.

Smart Weather App 3

About

Full-stack weather application with authentication, 5-day forecasts, favorite cities, and MongoDB integration.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors