A minimalist weather application built with Node.js and OpenWeatherMap API.
- Current Weather Dashboard: Real-time weather data with temperature, wind, humidity, and visibility
- 7-Day Forecast: Weekly weather outlook with high/low temperatures
- Detailed Metrics: Comprehensive weather metrics including pressure, UV index, sunrise/sunset times
- Location Search: Search for any city worldwide
- Geolocation Support: Automatically detect your location
- Responsive Design: Works on desktop and mobile devices
npm install- Go to OpenWeatherMap
- Sign up for a free account
- Generate an API key
Create a .env file in the root directory:
OPENWEATHER_API_KEY=your_api_key_here
PORT=3000Development mode (with auto-restart):
npm run devProduction mode:
npm startOpen your browser and navigate to:
http://localhost:3000
weather-app/
├── public/
│ ├── index.html # Main dashboard
│ ├── forecast.html # 7-day forecast page
│ ├── metrics.html # Detailed metrics page
│ └── js/
│ ├── main.js # Main dashboard logic
│ ├── forecast.js # Forecast page logic
│ └── metrics.js # Metrics page logic
├── server.js # Express backend server
├── package.json
├── .env # Environment variables (create this)
└── README.md
GET /api/weather/current- Get current weather dataGET /api/weather/forecast- Get 7-day forecastGET /api/weather/onecall- Get detailed metrics (requires lat/lon)GET /api/geocode- Convert city name to coordinates
- Backend: Node.js, Express
- Frontend: Vanilla JavaScript, Tailwind CSS
- API: OpenWeatherMap API
- Fonts: Inter (Google Fonts)
- Icons: Material Symbols
- Minimalist black and white aesthetic
- Inter font family with various weights
- Uppercase tracking for labels
- Smooth transitions and hover effects
- Mobile-responsive layout
- Clean borders and grid system
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
MIT