SkyCast is a full-stack weather application built with Next.js that delivers real-time weather conditions, hourly and daily forecasts, air quality information, and interactive map-based location search. By combining Server-Side Rendering (SSR) and Client-Side Rendering (CSR), it provides fast performance, improved SEO, and a seamless user experience.
Integrated WeatherAPI to provide current weather conditions, hourly forecasts, daily forecasts, and air quality information.
Implemented location search with a customized Leaflet map, allowing users to search for locations or select them directly from the map to view weather information.
Leveraged Next.js Server-Side Rendering (SSR), Client-Side Rendering (CSR), pre-rendering, and dynamic metadata generation to improve performance and search engine optimization.
Implemented server-side and client-side data fetching using React Query and Axios to enable efficient API communication and improved application performance.
Enhanced the user experience with smooth Framer Motion animations, reusable animation HOCs, and flexible React Icons for an engaging interface.
Managed application state using the Context API and utilized Next.js API Routes to securely handle client-server communication.
Next.js, React.js, Typescript, Tailwind CSS, Framer Motion, Leaflet.js, React Query, Axios, React Icons
Create a .env file in the root directory and add the following variables:
WEATHERAPI_APIKEY=your_api_key_here # (Create one at https://www.weatherapi.com/)
# Enable API to get real data or use mock data
# 1: true, 0: false
ENAPI=1 # set to 1 to enable API, 0 to use mock data| Variable | Description | Values |
|---|---|---|
WEATHERAPI_APIKEY |
Your API key from WeatherAPI | String |
ENAPI |
Toggle between live API data and mock data | 1 = enabled, 0 = disabled |
# Clone the repository
git clone https://github.com/prabinb50/SkyCast-WeatherApp.git
# Navigate into the project directory
cd SkyCast-WeatherApp
# Install dependencies
npm install
# Run the development server
npm run devContributions are welcome!
- Fork the repo
- Create your feature branch
git checkout -b feature/YourFeature
- Commit your changes
git commit -m "Add feature" - Push to the branch
git push origin feature/YourFeature
- Open a Pull Request
This project is open source and available for learning purposes.