Weather App is an application that allows users to view the current weather and forecasts for multiple cities using the OpenWeatherMap API. The app enables registered users to save their favorite cities. The project includes a backend for authentication (login and registration) and preference management.
-
🌍 View the current weather for any city.
-
🔮 5-day weather forecasts.
-
🔐 Authentication: login and registration system.
-
⭐ Save favorite cities for registered users.
-
💻 Responsive design for an optimal experience on mobile and desktop.
-
Frontend:
- React with Vite
- CSS3 (Flexbox per il layout responsive) Fetch (for API calls)
-
Backend:
- Node.js with Express
- MongoDB (for user and favorite city management)
- JWT (for authentication)
- Bcrypt (for password management)
-
API:
- OpenWeatherMap
Make sure you have Node.js, npm, and MongoDB installed on your computer.
- Clone the repository:
git clone https://github.com/nagcas/Weather-App.git
cd weather-appcd frontend
npm installcd ../backend
npm installCreate a .env file in the backend folder with the following content:
PORT=5000
MONGO_URI=<la tua stringa di connessione MongoDB>
JWT_SECRET=<una stringa segreta per i token>
OPENWEATHER_API_KEY=<la tua chiave API di OpenWeatherMap>cd backend
npm startcd frontend
npm run devContributing to the project is easy! If you want to participate, follow the instructions in the CONTRIBUTING.md file.
Create a new branch for your feature: git checkout -b feature/your-feature-name.
Commit your changes: git commit -m "Adds a new feature".
Push to the branch: git push origin feature/your-feature-name.
Submit a pull request.
Distributed under the MIT License. See the LICENSE file for more details.
Project created for Hacktoberfest 2024. 🎃
