- Users (authentication and authorization by JWT):
- Register user
- Login user
- Refresh tokens(access and refresh)
- Change user email(used to log in)
- Customers:
- Register customer (allowed for registered user)
- managing address book (max. 3 addresses)
- managing wishlist (max. 10 products)
- Products:
- CRUD
- setting sale data (price, quantity, is active)
- CRUD for categories
- Orders:
- Placing order (by registered and logged in customers)
- setting order status (for admin)
- changing order line product quantity (for admin)
- changing delivery address (for admin)
- setting delivery tracking number (for admin)
- C# 11, .NET 7, ASP.NET Core - The language and frameworks that we love are becoming faster and more modern.
- CQRS - We re-implemented this known pattern to improve performance and gain a better understanding of how it works.
- FluentValidation for commands and queries validation and is widely used and popular validation framework.
- Entity Framework Core 7
- Object Relational Mapping tool that simplifies querying database.
- Used with Microsoft SQL Sever 2022.
- bcrypt.net for hashing user password
- Serilog for logging mechanism
- ApplicationCore
- Place for data-centric entities
- Implementation of commands and queries as use cases
- Application services interfaces, i.a. UserContextProvider
- Infrastructure
- Implements application services
- Provides logging, database access
- API
- Provides HTTP endpoints
- Interacts with application layer
- Implements application services
- The idea of using repository pattern with EF in most cases is just bad so we use
DbSet<TEntity>as repositories in interfaceIAppDbContextin application layers which is implemented in infrastructure layer using provider for SQL Server. - We do not use result types or similar to handle success or failure in commands or queries. C# is a language where errors are handled using exception mechanism so we use it to manage failures using
ExceptionMiddlewarein API layer. - We do not use mapper libraries (e.g. AutoMapper) because that may hurt performance. We use
recordwith static methods to map entities to read models or request to commands. - For authentication and authorization we use JWT tokens. Permissions are not stored in token for better security and always checked by middleware.
- We do not use MVC Controllers for mapping endpoints because we believe that minimal apis are more performant and better for maintaining.


