This project is a Blazor web application for managing teaching assistants at Swansea University. The application allows for the allocation of teaching assistants to modules and labs based on their module preferences, time availability, as well as requirements of the modules.
The implementation follows several design patterns and best practices, discussed in a dissertation available in the /docs
folder.
- Register a new application in your Azure Active Directory
- Go to: Azure Active Directory > App registrations > New registration
- Register the application with the following values:
- Name: Lab Manager - Development
- Supported account types: Accounts in this organizational directory only (Northwind Traders only - Single tenant)
- Create a new client secret
- Go to: Certificates & secrets > New client secret
- Fill in the form and hit Add
- Add API permissions
- Go to: API permissions > Add a permission
- Add the following Microsoft Graph Permissions:
- AppRoleAssignment.ReadWrite.All
- User.Read.All
- Grant admin consent for Northwind Traders
- Add application roles
- Go to: App roles > Create app role
- Create the following roles:
Display name Allowed member types Value Description Administrator Users/Groups Administrator Administrator role User Users/Groups User User role
- Grant Administrator role to users
- Go to: Azure Active Directory > Enterprise applications > Lab Manager - Development > Users and groups > Add user/group
- Fill in the form with the following details:
- Users: Select all users who should have access as Administrators
- Select a role: Administrator
-
Update the following section in your appsettings.Development.json (Presentation.BlazorServer)
{ "AzureAd": { "Instance": "https://login.microsoftonline.com/", "Domain": "example.com", "TenantId": "00000000-0000-0000-0000-000000000000", "ClientId": "00000000-0000-0000-0000-000000000000", "CallbackPath": "/signin-oidc", "SignedOutCallbackPath": "/signout-callback-oidc" } }
-
Add secrets
cd .\src\Presentation.BlazorServer\
dotnet user-secrets set "ConnectionStrings:DbConnection" "Data Source=localhost,1433;Initial Catalog=LabManagementSystemDb;User ID=SA;Password=Password_123;TrustServerCertificate=True;"
dotnet user-secrets set "AzureAd:ClientSecret" "YourClientSecret"
-
Run the application
dotnet run --project .\src\Presentation.BlazorServer\LabManagementSystem.Presentation.BlazorServer.csproj
- Add secrets
- IntegrationTests.Core.Application
cd .\tests\Core\LabManagementSystem.IntegrationTests.Core.Application\
dotnet user-secrets set "ConnectionStrings:DbConnection" "Data Source=localhost,1433;Initial Catalog=LabManagementSystemIntegrationTestsDb;User ID=SA;Password=Password_123;TrustServerCertificate=True;"
- IntegrationTests.Core.Application.Allocation
cs .\tests\Core\LabManagementSystem.IntegrationTests.Core.Application.Allocation
dotnet user-secrets set "ConnectionStrings:DbConnection" "Data Source=localhost,1433;Initial Catalog=LabManagementSystemIntegrationTestsDb;User ID=SA;Password=Password_123;TrustServerCertificate=True;"
- IntegrationTests.Core.Application
- Run the tests
dotnet test