This application, built with Next.js, React, TypeScript, and Tailwind CSS, provides weather, air quality, and UV index data for U.S. locations using the following public APIs:
- National Weather Service API for weather data.
- EPA AirNow API for air quality data.
- EPA UV Index API for UV index data.
The app includes a search bar that allows users to input their desired U.S. location and receive up-to-date information. Please note:
- The National Weather Service API is only available for U.S. locations.
- The APIs may occasionally return errors due to service availability.
The app is fully responsive, working across desktop and mobile devices.
git clone https://github.com/your-username/new-repo.git
Then create a .env
file in the root directory and add the following:
MAPBOX_TOKEN=your_api_key_here
TIMEZONEDB_API_KEY=your_api_key_here
Finally, install the dependencies and then run the development server:
npm install
npm run dev
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
- NWS API documentation: https://www.weather.gov/documentation/services-web-api
- EPA UV API documentation: https://www.epa.gov/enviro/web-services
- AirNow API documentation: https://docs.airnowapi.org/webservices
- TimeZoneDB API documentation: https://timezonedb.com/