Skip to content

SkillsFundingAgency/das-levy-transfer-matching-web

Repository files navigation

Levy Transfer Matching Web

UK Government logo

Build Status Quality Gate Status Jira Project Confluence Project License

Levy transfer matching allows levy to be pledged by an employer and made available to other employers to use.

How It Works

This web application operates as a sub-site of Manage Apprenticeships. It consists of this web application, an Api and an Azure Function component, links for which can be found below.

🚀 Installation

A PowerShell script is available to take some of the work out of setting up a develop environment for LTM and can be found here. This script will attempt a few tasks dependant on switches that are passed to it all of which are described in the script file itself:

  • Look for required LTM git repo's and clone them if they don't exist, including 3rd party dependencies
  • Look for and load the solutions in VS2019
  • Look for and start Docker Desktop and three containers: shared-redis, das-config & ms-sql
  • Look for and start the CosmosDB emulator

Pre-Requisites

The Azure Functions component is not necessary for the website to function but can be found here

  • A clone of this repository
  • A clone of Levy Transfer Matching Api
  • A clone of Apim endpoints
  • A code editor that supports .Net6
  • A CosmosDB instance or emulator
  • The EmployerAccount Api running locally or available in a test environment
  • A Redis instance
  • The latest das-employer-config for:
    • SFA.DAS.LevyTransferMatching_Web_1.0
    • SFA.DAS.EmployerUrlHelper_1.0
    • SFA.DAS.SFA.DAS.Employer.Shared.U_1.0
    • SFA.DAS.EncodingService_1.0
    • SFA.DAS.EmployerAccountAPI_1.0
  • A valid employer user account

Config

This utility uses the standard Apprenticeship Service configuration. All configuration can be found in the das-employer-config repository which may be more up-to-date than what is described here.

AppSettings.json file

{
    {
      "ConnectionStrings": {
        "RedisLogging": ""
      },
      "Logging": {
        "LogLevel": {
          "Default": "Warning"
        }
      },
      "AllowedHosts": "*",
      "ConfigurationStorageConnectionString": "UseDevelopmentStorage=true",
      "ConfigNames": "SFA.DAS.LevyTransferMatching.Web,SFA.DAS.EmployerUrlHelper:EmployerUrlHelper,SFA.DAS.Employer.Shared.UI,SFA.DAS.Encoding:EncodingService",
      "Environment": "LOCAL",
      "Version": "1.0",
      "APPINSIGHTS_INSTRUMENTATIONKEY": "",
      "cdn": {
        "url": "https://das-at-frnt-end.azureedge.net"
      }
    }
  }  

Azure Table Storage config

Row Key: SFA.DAS.LevyTransferMatching.Web_1.0

Partition Key: LOCAL

Data:

{
  "LevyTransferMatchingWeb": {
    "RedisConnectionString": "localhost",
    "DataProtectionKeysDatabase": "DefaultDatabase=3",
    "UtcNowOverride": null
  },
 "LevyTransferMatchingApi": {
    "ApiVersion": "1.0",
    "SubscriptionKey": "",
    "ApiBaseUrl": "https://localhost:5221/"
  },
  "Authentication": {
    "AccountActivationUrl": "/account/confirm",
    "AuthorizeEndpoint": "/connect/authorize",
    "BaseAddress": "",
    "ChangeEmailUrl": "/account/changeemail?clientId={0}&returnurl=",
    "ChangePasswordUrl": "/account/changepassword?clientId={0}&returnurl=",
    "ClientId": "",
    "ClientSecret": "",
    "LogoutEndpoint": "/connect/endsession?id_token_hint={0}",
    "Scopes": "openid profile",
    "TokenEndpoint": "/connect/token",
    "UsePkce": false,
    "UserInfoEndpoint": "/connect/userinfo"
  },
  "CosmosDb": {
    "Uri": "https://localhost:8081",
    "AuthKey": ""
   }
}

🔗 External Dependencies

Technologies

  • .Net6
  • CosmosDB
  • REDIS
  • Azure Table Storage
  • NUnit
  • Moq
  • FluentAssertions

🐛 Known Issues

  • This web application must be run under the Kestrel web server

About

Levy Transfer Matching Web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published