https://github.com/zabavb/weather-forecast-app
Weather Forecast App is a modern full-stack web application that allows users to retrieve and search weather forecasts for today or the next three days across various cities. Built using a microservices architecture, the app showcases key backend and frontend practices like RESTful APIs, authentication, caching, async programming, and validation.
https://github.com/zabavb/weather-forecast-app
app asp-net dotnet jwt-authentication microservices ocelot-gateway react redis redux restful-api typescript weather-forecast zod-validation
Last synced: 5 months ago
JSON representation
Weather Forecast App is a modern full-stack web application that allows users to retrieve and search weather forecasts for today or the next three days across various cities. Built using a microservices architecture, the app showcases key backend and frontend practices like RESTful APIs, authentication, caching, async programming, and validation.
- Host: GitHub
- URL: https://github.com/zabavb/weather-forecast-app
- Owner: zabavb
- License: mit
- Created: 2025-03-02T12:04:56.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-05-22T17:59:11.000Z (5 months ago)
- Last Synced: 2025-05-22T18:39:09.810Z (5 months ago)
- Topics: app, asp-net, dotnet, jwt-authentication, microservices, ocelot-gateway, react, redis, redux, restful-api, typescript, weather-forecast, zod-validation
- Language: C#
- Homepage:
- Size: 244 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Weather Forecast Web Application
Weather Forecast App is a modern full-stack web application that allows users
to retrieve and search weather forecasts for today or the next three days across various cities.
Built using a microservices architecture, the app showcases key backend and frontend practices
like RESTful APIs, authentication, caching, asynchronous programming, and validation.
This project demonstrates integration with a remote weather API and efficient data handling
via Redis caching, database persistence, and optimized frontend performance.
π§± Architecture Overview
-
Backend: ASP.NET Core 8 with a microservice architecture
-
Frontend: React with TypeScript
-
Gateway: Ocelot API Gateway
π Backend Details
Microservices
-
UserAPI β Manages user accounts and authentication:
-
JWT-based role authentication
-
EF Core-based interaction with SQL database
-
Includes login and registration flows
-
-
ForecastAPI β Interacts with a remoteweather.apiservice to fetch:
-
Todayβs weather forecast
-
Forecasts for the next 3 days (inclusive of today)
-
Filtering based on city
-
-
Gateway β Ocelot-based API Gateway to route requests between services securely and efficiently
Common Backend Features
-
RESTful API structure using controller-service-repository pattern
-
JWT Authentication and Authorization
-
Redis caching for optimized forecast responses
-
Asynchronous programming (async/await) for non-blocking operations
-
Serilog for structured logging
-
Validation of incoming data
π₯οΈ Frontend Details
Architecture
api β repository β service β container β component
Main Features
-
React with TypeScript, Vite as the build tool
-
JWT token handling and role-based UI updates
-
Axios for HTTP requests to backend services
-
Zod for form and schema validation
-
Memoization of expensive operations for performance
π Authentication & Authorization
-
Secure login and registration
-
JWT-based authentication with protected routes
-
Tokens stored inlocalStorage
π οΈ Technologies Used
Backend
- ASP.NET Core 8
- Entity Framework Core
- Redis
- Ocelot API Gateway
- Serilog
Frontend
- React + TypeScript
- Vite
- Zod
- Axios
π‘ API Integration
This project consumes a remote third-party API for weather data:
- All forecast data is retrieved from the
www.weatherapi.com
remote server - Data is filtered and cached appropriately to reduce unnecessary API calls
π§ͺ Development Status
This project is a demonstration of microservice integration, JWT security, and caching. Payment systems
or admin panels are not part of the scope. Future improvements may include user dashboards, forecast
history, and enhanced UX features.