AllergyAlert is a web application designed to help users monitor allergens in their region. The app provides a list of active allergens based on the user's selected location and the number of days for the forecast. Users can view details about specific allergens, including images and additional information.
Caching: The application leverages Microsoft.AspNetCore.ResponseCaching to implement a 2-minute response caching mechanism for certain API endpoints, significantly improving performance on repeated calls. The first call usually takes around 1-1.5 seconds, while the second call benefits from caching, taking about 2 milliseconds. This update not only reduces latency for users, but also optimizes resource usage, leading to lower operational costs.
Frontend: Angular (Standalone Components, Angular CLI)
Backend: ASP.NET Core Web API
🌍Public APIs:
-
Geocoding API: https://api-ninjas.com/api/geocoding
-
Pollen API: https://developers.google.com/maps/documentation/pollen/forecast
-
Plant API: https://perenual.com/docs/api
AllergyAlert.mov
Follow these steps to run the application locally:
-
You will need to register with the API providers mentioned above to get API keys. After that, create three environment variables to securely store the API keys:
-
GEOCODING_ENV -
POLLEN_FORECAST_ENV -
PLANT_INFO_ENV
-
-
Node.js and npm installed on your machine
-
.NET SDK installed
-
Angular CLI installed globally
-
Clone the Repository:
git clone https://github.com/yourusername/allergyalert.git -
cd into project:
cd allergyalert/UI/allergyUI -
Install Dependencies:
npm install -
Run server:
ng serve -
The app should be running at http://localhost:4200.
-
Navigate to the Backend Directory:
cd ../allergyAPI -
Install Dependencies and Restore NuGet Packages:
dotnet restore -
Run the ASP.NET Core Web API:
dotnet run -
The API should be running at http://localhost:5269.