A modern desktop weather application built with Tauri (Rust backend) and React frontend, featuring a premium dark theme with glassmorphism design.
- Real-time Weather Data: Current weather conditions with temperature, humidity, and wind speed
- 3-Day Forecast: Extended weather forecast with daily predictions
- Air Quality Index: Comprehensive air quality monitoring with AQI categories
- Premium UI/UX: Dark theme with glassmorphism effects and smooth animations
- Responsive Design: Clean resizing for different window sizes
- Settings Management: Customizable location coordinates and temperature units
- Modern Components: Built with shadcn/ui and TailwindCSS
- Backend: Rust with Tauri
- Frontend: React + TypeScript
- Styling: TailwindCSS + shadcn/ui
- Icons: Lucide React
- APIs: Open-Meteo (free weather API) with mock air quality data
- Node.js (v16 or higher)
- Rust (latest stable version)
- npm or yarn
- Clone the repository:
git clone https://github.com/dynstat/Weather-Desktop-App-RUST.git
cd Weather-Desktop-App-RUST- Install dependencies:
npm install- Run the development server:
npm run tauri devnpm run tauri buildweather-dashboard/
├── src/
│ ├── components/
│ │ ├── ui/ # shadcn/ui components
│ │ ├── WeatherCard.tsx
│ │ ├── AQICard.tsx
│ │ ├── ForecastCard.tsx
│ │ ├── Sidebar.tsx
│ │ ├── Header.tsx
│ │ └── Settings.tsx
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ ├── lib/
│ │ └── utils.ts # Utility functions
│ ├── App.tsx # Main application component
│ └── App.css # Global styles with glassmorphism
├── src-tauri/
│ ├── src/
│ │ └── lib.rs # Rust backend with API endpoints
│ └── Cargo.toml # Rust dependencies
└── README.md
The application uses Open-Meteo API for weather data and mock data for air quality:
- Open-Meteo API: Free, no API key required
- Real-time weather data: Temperature, humidity, wind speed, precipitation, cloud cover
- 3-day forecast: Generated from hourly data
- Automatic fallback: Falls back to mock data if API fails
- Mock data: Currently uses simulated air quality data
- AQI categories: Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy, Very Unhealthy, Hazardous
- Pollutant levels: PM2.5, PM10, O3, NO2, SO2, CO
The app works out of the box with real weather data from Open-Meteo and mock air quality data, so no API keys are needed for basic functionality.
- Current weather display with temperature, conditions, and location
- Air quality index with color-coded categories
- 3-day weather forecast
- Responsive grid layout
- Location coordinates (latitude/longitude)
- Temperature unit toggle (Celsius/Fahrenheit)
- Air quality data enable/disable
- Persistent settings storage
- Sidebar navigation with smooth transitions
- Header with refresh and search functionality
- Tab-based content switching
The application uses a premium dark theme with glassmorphism effects:
- Background: Gradient from slate-900 to purple-900
- Cards: Semi-transparent with backdrop blur
- Borders: Subtle white borders with opacity
- Shadows: Premium shadow effects
- Animations: Smooth transitions and hover effects
- Update the
WeatherDatainterface insrc/types/index.ts - Modify the Rust backend in
src-tauri/src/lib.rsto fetch new data from Open-Meteo API - Update the
WeatherCardcomponent to display new data
- Global styles:
src/App.css - Component styles: Individual component files
- Tailwind configuration:
tailwind.config.js
npm run tauri dev- Start development servernpm run tauri build- Build for productionnpm run build- Build frontend onlynpm run preview- Preview built frontend
- Components: Reusable UI components with TypeScript
- Types: Centralized type definitions
- Utils: Shared utility functions
- Backend: Rust commands for API integration
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support or questions, please open an issue in the repository.