A modern, responsive weather application built with React and Express.js that provides real-time weather information for cities worldwide. Features a beautiful animated Earth background and comprehensive weather data display.
- 🌍 Real-time Weather Data - Get current weather conditions for any city worldwide
- 🎨 Modern UI/UX - Beautiful animated Earth background with glassmorphism design
- 📱 Responsive Design - Optimized for desktop, tablet, and mobile devices
- 🔍 City Search - Search for weather information by city name
- 📊 Comprehensive Data - Temperature, humidity, wind speed, visibility, pressure, and cloud cover
- ⚡ Fast Performance - Built with Vite for lightning-fast development and builds
- 🎯 Live Status - Real-time updates with live status indicator
- React 19.1.1 - Modern UI library
- Vite 7.1.2 - Fast build tool and dev server
- Tailwind CSS 4.1.11 - Utility-first CSS framework
- Lucide React - Beautiful icon library
- ReactJS Popup - Modal and popup components
- Express.js 5.1.0 - Web application framework
- Axios - HTTP client for API requests
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- OpenWeather API - Weather data provider
- Node.js (v16 or higher)
- npm or yarn
- OpenWeather API key
-
Clone the repository
git clone https://github.com/yourusername/weather-application.git cd weather-application -
Install frontend dependencies
cd frontend npm install -
Install backend dependencies
cd ../backend npm install -
Environment Setup
Create a
.envfile in the backend directory:OPENWEATHER_API_KEY=your_openweather_api_key_here PORT=5000
Get your free API key from OpenWeather
-
Start the backend server
cd backend npm startThe server will run on
http://localhost:5000 -
Start the frontend development server
cd frontend npm run devThe application will be available at
http://localhost:5173
weather-application/
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Header.jsx/
│ │ │ └── Footer/
│ │ ├── pages/
│ │ │ └── HeroPage/
│ │ ├── apis/
│ │ │ └── weather.js
│ │ ├── assets/
│ │ │ └── earth-rotating.mp4
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── globals.css
│ ├── package.json
│ └── vite.config.js
├── backend/
│ ├── index.js
│ ├── package.json
│ └── .env
└── README.md
- Search for Weather: Type any city name in the search bar and press Enter
- View Weather Data: The application displays:
- Current temperature and "feels like" temperature
- Weather description and location
- Humidity percentage
- Wind speed in m/s
- Visibility in kilometers
- Atmospheric pressure in hPa
- Cloud cover percentage
- Real-time Updates: The status indicator shows when the data was last updated
GET /weather?city={cityName}- Fetch weather data for a specific city
Example:
curl "http://localhost:5000/weather?city=London"- Animated Background: Rotating Earth video background
- Glassmorphism UI: Transparent cards with blur effects
- Color-coded Metrics: Different colors for different weather parameters
- Responsive Grid: Adaptive layout for various screen sizes
- Live Status Indicator: Real-time update timestamp
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
npm start- Start production servernpm run dev- Start development server with nodemon
- Build the frontend:
npm run build - Deploy the
distfolder to your hosting platform
- Ensure your
.envfile is configured with production variables - Deploy the backend directory to your hosting platform
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
J R Kokatam
- Email: jrkokatam.09@gmail.com
⭐ Star this repository if you found it helpful!