This is the GitHub repo for the backend services of the Codebreaker solution.
See these repositories for clients:
See this repository for the book covering the backend solution:
Pragmatic Microservices with C# and Azure
This repository has been updated with the source code from the book, but is updated and enhanced continuously.
The new Games API service with access to SQL Server and Azure Cosmos DB. Currently, you need to run this locally. A hosted version will be available at a later date.
The analyzers library CNinnovation.Codebreaker.Analyzers is used in the backend to return results based on a game move. This library is used by the games API, and you need it creating your own custom games. Ths source code is available in this repository.
NuGet: https://www.nuget.org/packages/CNinnovation.Codebreaker.Analyzers
This backend models library CNinnnovation.Codebraker.BackendModels contains models for the Codebreaker app. Reference this library when creating a Codebreaker service, or use it from data access libraries.
NuGet: https://www.nuget.org/packages/CNinnovation.Codebreaker.BackendModels
This database libraries CNinnnovation.Codebraker.Cosmos and CNinnnovation.Codebraker.SqlServer contain EF Core contexts for the Codebreaker app. Reference one or both of these libraries storing games to the database.
NuGet Cosmos: https://www.nuget.org/packages/CNinnovation.Codebreaker.Cosmos
NuGet SQL Server: https://www.nuget.org/packages/CNinnovation.Codebreaker.SqlServer
The library CNinnovation.Codbreaker.Client is used by client applications to access the game APIs.
NuGet: https://www.nuget.org/packages/CNinnovation.Codebreaker.GamesClient
CNinnovation Codebreaker packages on NuGet
Codebreaker Packages daily builds on Azure DevOps
Branch | Analyzers | Backend models | Cosmos | SQL Server | Client Library |
---|---|---|---|---|---|
main |
Branch | Analyzers | Backend models | Cosmos | SQL Server | Client Library |
---|---|---|---|---|---|
main |
TODO: this test will move to this repo
Branch | Game API |
---|---|
main |
- Gateway - a YARP service acting as reverse proxy
- Games API - the games API using Azure Cosmos DB and Redis for a game cache, and using Azure Event Hub for notification on completed games
- Live service - using SignalR to monitor completed games, using the Event Hub to receive information on completed games, and offers SignalR to subscribe to this information
- Ranking - using Event Hub to receive completed games, offering a REST API to see ranking information
Register an account and play the games!
- Azure Container Apps
- Azure Cosmos DB
- Azure Active Directory B2C
- Azure SignalR Services
- Azure App Configuration
- Azure Event Hub
- Azure App Services
- Azure Storage message queue
- Azure Key Vault
With AADB2C, the API connectors need to be updated after publishing the backend, by:
- setting the Endpoint URLs to https://<>/users/api-connectors/validate-before-user-creation and https://<>/users/api-connectors/enrich-token
- setting the basic-authentication password in the gateway-keyvault with the key AADB2C-ApiConnector-Password
- and setting that password in tha API connectors