To run this project, follow the following instructions.
Install Postgresql and the vector extension. Create 2 databases:
rookie_shopwith the vector extension enabled.quartzwith this schema.- Update connection strings.
- Install
dotnet-eftool, go toRookieShop.WebApidirectory and migrate database with the followingDbContext:ProductCatalogDbContextImpl,ImageGalleryDbContextImpl,ShoppingDbContext, andOrderingDbContext.
2.1 Install Keycloak and bootstrap its.
- In
rookie-shoprealm, create an OIDC client with the namerookie-shop-web-api. - To use Swagger authentication feature, enable the
Client authenticationand theStandard flowoptions for Authorization Code Flow. - Add
Audiencemapper type to its dedicated scope withrookie-shop-web-apias an included client audience. - Copy the
Idand theSecretof this client toKeycloak:Swaggersetting inRookieShop.WebApiproject.
- In
masterrealm, create an OIDC client with the namerookie-shop-admin. - To use Keycloak's Admin API, enable the
Client authenticationand theService accounts rolesoptions. - In
Service accounts rolestab, addadminrole. - Copy the
Idand theSecretof this client toKeycloak:ServiceAccountsetting inRookieShop.WebApiproject.
- In
rookie-shoprealm, create an OIDC client namedrookie-shop-front-store-mvc. - Enable the
Client authenticationand theStandard flowoptions for Authorization Code Flow. - Add
Audiencemapper type to its dedicated scope withrookie-shop-web-apias an included client audience. - Add
Real Rolesmapper type to its dedicated scope withAdd to Id tokenenabled to make the MVC's authorization middleware works. - Copy the
Idand theSecretof this client toKeycloak:ClientSettingssetting inRookieShop.FrontStoreproject.
Download an ONNX model of all-MiniLM-L6-v2, place it in the RookieShop.WebApi/model directory with the name model.onnx.
Install RabbitMQ and start it.
Install Azurite and start it.