Suncloud is a simple and elegant weather application that provides real-time weather updates, hourly and daily forecasts, sunrise and sunset times, and additional weather-related data for any location worldwide. The app features a minimalistic design with vibrant colors to represent different weather conditions.
- Display current weather data:
- Temperature (Celsius and Fahrenheit)
- Feels like temperature
- Minimum and maximum temperatures
- Humidity, pressure, visibility
- Wind speed and direction
- Cloud cover description and icon
- Show hourly and daily forecasts.
- Sunrise and sunset times.
- Displays weather data for any city by entering the city name.
To run this application, ensure you have the following installed:
- Node.js (v18.x or above)
- npm (comes with Node.js)
git clone <repository-url>
cd suncloud
Run the following command to install required dependencies:
npm install
Create a .env
file in the root directory and add your OpenWeather API key:
API_KEY=your_openweather_api_key
Use the following command to start the application:
npm start
The application will run on http://localhost:3000.
/
: Renders the home page (index
)./suncloud
: Displays the weather details page with placeholders for weather data./weather
(POST): Accepts a city name, fetches the weather data using OpenWeather API, and renders the data on thesuncloud
page.
The application uses the OpenWeather API to fetch real-time weather data. Ensure you have a valid API key from OpenWeather.
routes/index.js
: Contains all route definitions and API logic.views/
: EJS templates for rendering UI components.public/
: Static files such as CSS and JavaScript.app.js
: Configures middleware and initializes the server.
- Express: Web framework for Node.js
- EJS: Template engine for rendering HTML
- Request: Simplified HTTP request library
- Body-parser: Middleware to parse incoming request bodies
- Morgan: HTTP request logger
- Cookie-parser: Parses cookies attached to requests
- Nodemon: Utility for automatically restarting the server during development
For deployment, ensure to:
- Set the environment variable
NODE_ENV=production
. - Use a process manager like PM2 for running the application in a production environment.
Add screenshots here to showcase the application’s interface.
- Add a weekly weather forecast feature.
- Enhance the UI with better animations.
- Implement geolocation-based weather updates.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to fork this repository and submit pull requests for any improvements or features you’d like to add.
Developed with ❤️ by Yash Kolte