A modern, responsive weather dashboard built with React and Vite, featuring real-time weather data, geolocation, interactive maps, and theme customization.
- 🌍 Interactive world map for location selection
- 📍 Current location detection
- 🔍 Location search functionality
- 🌡️ Real-time weather data from OpenWeatherMap
- 🎨 Multiple theme options (Light, Dark, Winter, Summer)
- 📱 Fully responsive design
- ⚡ Built with modern React patterns
- 🗺️ Interactive maps using Leaflet
- 💾 Location favorites system
- Node.js >= 18.0.0
- npm >= 8.0.0
-
Clone the repository:
git clone https://github.com/xarlizard/weather-dashboard.git cd weather-dashboard
-
Install dependencies:
npm install
-
Configure environment variables:
- Copy
.env.example
to.env
- Add your OpenWeatherMap API key:
cp .env.example .env # Then edit .env and set VITE_APP_Key=your_api_key
- Copy
-
Run the development server:
npm run dev
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Lint the codebase
- React 19
- Vite
- React Router v7
- React Bootstrap
- React Leaflet
- Axios
- ESLint
src/
├── components/ # React components
├── contexts/ # React context providers
├── hooks/ # Custom React hooks
├── config/ # Configuration files
├── utils/ # Utility functions
├── mocks/ # Mock data
└── test/ # Test helpers
Variable | Description |
---|---|
VITE_APP_Key | OpenWeatherMap API key |
This project is licensed under the MIT License.
Charlie (@xarlizard)
Note: You need a free API key from OpenWeatherMap