Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 2.58 KB

README.md

File metadata and controls

53 lines (41 loc) · 2.58 KB

Build and test

Example of a web "Shopping portal" using microservice architecture

Run the app with HTTPS using Docker or Docker Compose 🐳

UI - Web Clients

  • Razor Pages
  • Angular (14.2.1) -> when running from docker compose it will use nginx as a reverse proxy

NOTE: It could happen that when running Angular app with docker compose you can't hit the Identity Server on initial loading, and that's because self signed certificate is not trusted, so the browser returns error. To fix this open new tab in a browser and paste Identity Server url https://host.docker.internal:8021, click on Advanced button so the browser continues to untrusted content, and then refresh the Angular home page and everything should work. Do the same for Ocelot Gateway as with Identity Server by pasting its url https://host.docker.internal:8006 in a different tab in browser.

Authentication & Authorization

  • Identity Server 4 for authentication and authorization of services using refresh tokens

Databases used in the solution:

  • Sql Server
  • Mongo DB
  • PostgreSql
  • Redis

Azure Functions ⚡

  • Used with SendGrid for sending emails
  • Integration with Azure Key Vault for retrieving secrets

Gateways 🚪

  • Ocelot Api Gateway which communicates with all the downstream services
  • Aggregator pattern used to communicate to downstream services and retreive specific response needed for the requested UI

MassTransit 🚌

  • Order saga orchestrator pattern using MassTransit Saga for long running operation like placing an order
  • RabbitMq implementation using MassTransit
  • Azure Service Bus implementation using MassTransit

Other things like... ⭐

  • Discount API implementation using gRpc
  • Correlation id implementation for tracking of requests in distributed system
  • Services Health Checks
  • Unit & integration tests using xUnit framework with fluent assertion
  • Fluent validation
  • DDD modeling in Order API using aggregates and value objects
  • Services resilience using Polly
  • Structured logging using Serilog, Elastic Search and Kibana
  • Nginx as reverse proxy
  • TestContainers for integration tests using docker
  • SpecFlow for automated BDD tests