The Weather App is a full-stack application that fetches and displays current and historical weather data based on the user's location. It utilizes an Express server to handle API requests and a React front-end to present the data in a user-friendly interface.
- Fetches current weather data including temperature and wind speed.
- Displays weekly maximum and minimum temperatures with weather codes.
- Retrieves historical weather data from the past years.
- Interactive line chart visualizing maximum temperatures and weather conditions.
- Dynamic background based on current weather conditions.
- Frontend: React, Material-UI (MUI)
- Backend: Rust
- APIs: Open Meteo, IPinfo
/Burzowy
│
├── src # React application
│ ├── App.js # Main application component
│ ├── index.js # Application entry point
│ ├── img # Folder containing weather icons
│ └── App.css # CSS styles for the application
│
└── backend
├── src
│ └── main.rs # Express server for handling API
└── Cargo.toml # Build information
Make sure you have the following installed:
- npm (Node Package Manager)
- Rustc (Rust Compiler)
- Cargo (Rust Build System)
- Rustup (Optional, but recommended)
-
Clone the repository:
git clone https://github.com/TallenPeli/Burzowy cd Burzowy -
Navigate to the root directory and install the server dependencies:
npm install
-
Navigate to the
srcdirectory and install the frontend dependencies:cd src npm install
-
Start the backend server:
Compile Backend
cd backend cargo build --releaseRun Backend
./target/release/weather-api
The server will run on
http://localhost:5000. -
Open a new terminal, navigate back to the
srcdirectory, and start the React application:npm start
The React app will run on
http://localhost:3000.
To create a production build of the React application, follow these steps:
-
Navigate to the
srcdirectory:cd src -
Build the application:
npm run build
This will create an optimized production build in the
buildfolder. -
You can serve the built application using a static file server, or you can integrate it into your backend server by serving the
builddirectory.
Upon starting the application, the Weather App will fetch the user's location using their IP address and display the current weather conditions along with a chart visualizing the weekly temperatures and conditions. The app will also show historical weather data for comparison.
If you would like to contribute to the project, please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.