A Blazor web app and .NET API to make DDD South West even more awesome for attendees.
PocketDDD.BlazorClient
- This is the UIPocketDDD.Server
- This is the APIPocketDDD.Shared
- This is shared between the UI and the APIPocketDDDClient
- This is deprecated, we'll delete it at some point!
You will need:
- .NET 8
- SQL Server
- Set up the database
- Create a new database
- Run
PocketDDD.Server/PocketDDD.Server.DB/Migrations/FullDBScript.sql
- Add a row to the
EventDetail
table withId=1, Version=1, SessionizeId=<SessionizeId>
- Set up the API
- Set two user secrets for API (see Microsoft docs if unfamiliar with user secrets)
AdminKey
- this is used in anAuthorization
header to access the APIConnectionStrings:PocketDDDContext
- this is the connection string for the database
- Start the API
- Set two user secrets for API (see Microsoft docs if unfamiliar with user secrets)
- Set up the data
- Call the
api/EventData/RefreshFromSessionize
endpoint with theAdminKey
in anAuthorization
header - In the database, tidy up the
Tracks
data and addTimeSlots
for the breaks
- Call the
The Blazor web app is designed to be run as a static web app. This means that the appsettings
files are located inside PocketDDD.BlazorClient/PocketDDD.BlazorClient/wwwroot
.
There are two settings which can be altered:
apiUrl
- the api the app is pointing tofakeBackend
- whether or not to use a local fake api
Beware when running the frontend that it caches on the client. The app is designed to be downloaded once and then largely work offline.
If testing a new UI change then use a new incognito window or delete local storage for the site
Auto-populating the session data from Sessionize requires a basic set of seed data. An example of this can be found in 2024_SeedData.sql
Once this script has been run against the DB you can call the admin endpoint to refresh the data. This requires the Admin API key which can be retrieved from Azure key vault secret pocketddd-<env>-admin-api-key
POST /api/eventdata/RefreshFromSessionize HTTP/1.1
Host: pocketddd-dev-api-server.azurewebsites.net
Authorization: <insert-admin-key>
Ensure the Azure, GitHub, and terraform CLIs are installed
brew install azure-cli
brew install gh
brew install terraform
Login to Azure and GitHub
az login
gh auth login
Retrieve the access key for the terraform state storage account
export ARM_ACCESS_KEY=$(az storage account keys list -g pocketddd-terraform-state -n pocketdddterraformstate --query [0].value -o tsv)
From the terraform
directory run init, plan, then apply if happy with the changes.
cd ./terraform
terraform init -backend-config="dev.terraform.tfstate"
terraform plan -var-file ../tfvars/dev.tfvars
terraform apply -var-file ../tfvars/dev.tfvars