A modern, responsive weather application built with vanilla HTML, CSS, and JavaScript that displays current weather conditions and a 5-day forecast for any city worldwide.
REQUEST- The project requires refinement and there are several features that can be added, therefore you can contribute to the project and make it more efficient.
View the live demo here//Currently not working)
Note: GitHub Pages serves static files only. The app expects a small local (or hosted) Node server that proxies OpenWeatherMap so the API key stays on the server. For the public Pages demo to keep working, maintainers need either a deployed proxy (for example Cloudflare Worker, Vercel serverless, or this server.js on a host) or a separate demo URL that runs behind that proxy.
It is requested that users go for local development in order to access the app
npm install..env.example to .env and set OPENWEATHER_API_KEY to your OpenWeatherMap API key.npm start and open http://localhost:3000 (or the port shown in the terminal).Opening index.html directly in the browser (file://) will not work for weather requests, because the UI calls same-origin /api/* routes that are provided by server.js.
If an API key was ever committed to the frontend, revoke it in the OpenWeatherMap dashboard and create a new key. Only store the new key in .env (and in your hostβs environment variables), never in script.js or other tracked client files.
This app uses the OpenWeatherMap API for weather data. The browser only talks to same-origin routes:
GET /api/weather β OpenWeatherMap current weather (/data/2.5/weather)GET /api/forecast β 5-day forecast (/data/2.5/forecast)GET /api/geo β Geocoding (/geo/1.0/direct) for autocompleteThe server adds appid from the OPENWEATHER_API_KEY environment variable. The key is not shipped in script.js.
weatherify/
βββ index.html # Main HTML structure
βββ style.css # All styling and responsive design
βββ script.js # JavaScript functionality (calls /api/* only)
βββ server.js # Static files + OpenWeatherMap proxy
βββ package.json
βββ .env.example # Example env vars (copy to .env)
βββ README.md # This file
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Project Link: (https://ashujsrfox.github.io/weatherify/)