https://github.com/shine-23/the-weather-app
A real-time Weather App where users can search for any city and receive live weather updates via WebSocket. Each user session manages its own city subscriptions, with automatic cleanup on disconnect. The system combines Spring Boot (REST + WebSocket) and a responsive React frontend.
https://github.com/shine-23/the-weather-app
java reactjs spring-boot weather-app webclient-springboot websocket
Last synced: 11 months ago
JSON representation
A real-time Weather App where users can search for any city and receive live weather updates via WebSocket. Each user session manages its own city subscriptions, with automatic cleanup on disconnect. The system combines Spring Boot (REST + WebSocket) and a responsive React frontend.
- Host: GitHub
- URL: https://github.com/shine-23/the-weather-app
- Owner: Shine-23
- License: mit
- Created: 2025-07-14T11:30:53.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-14T12:01:18.000Z (11 months ago)
- Last Synced: 2025-07-14T15:00:21.154Z (11 months ago)
- Topics: java, reactjs, spring-boot, weather-app, webclient-springboot, websocket
- Language: Java
- Homepage:
- Size: 90.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Weather App
A full-stack application to search cities and track real-time weather updates via WebSocket.
- Frontend: React.js + Vite
- Backend: Spring Boot with REST API & WebSocket/STOMP.
- External API: https://openweathermap.org
## Features
- Search Weather by City: Current weather fetched on search.
- Real-Time Weather Updates: Automatic updates pushed every 30 seconds.
- Multiple City Tracking: Subscribe to multiple cities simultaneously.
- Remove/Unsubscribe Cities: Stop tracking a city.
- Session-Based Tracking:Tracks subscriptions per WebSocket session
## Prerequisites
- Java 17+
- Node.js
- Gradle
## Setup Instructions
### Backend Setup
1. Update application.properties with your OpenWeatherMap API keys:
```bash
weather.api.key=YOUR_WEATHER_API_KEY
weather.api.base-url=https://api.openweathermap.org
```
2. Run the backend:
```bash
./mvnw spring-boot:run
```
3. Backend runs on: `http://localhost:8080`
### Frontend Setup
1. Install dependencies:
```bash
npm install
```
2. Start the development server:
```bash
npm run dev
```
3. Frontend runs on: `http://localhost:5173`