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
- 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
- Java 17+
- Node.js
- Gradle
- Update application.properties with your OpenWeatherMap API keys:
weather.api.key=YOUR_WEATHER_API_KEY
weather.api.base-url=https://api.openweathermap.org- Run the backend:
./mvnw spring-boot:run- Backend runs on:
http://localhost:8080
- Install dependencies:
npm install- Start the development server:
npm run dev- Frontend runs on:
http://localhost:5173