Skip to content

uk-gov-mirror/SkillsFundingAgency.dfc-coursedirectory

 
 

Repository files navigation

dfc-coursedirectory

Build Status

User Interface for course directory, implemented using the provider portal APIs. Contains provider portal Azure resources in the Resources directory.

Developer setup

Running the tests

Manually create an empty database named CourseDirectoryTesting:

create database CourseDirectoryTesting;
ALTER DATABASE CourseDirectoryTesting SET ALLOW_SNAPSHOT_ISOLATION ON;

Run the tests.

The dacpac will automatically be deployed and create all the database schema and tables.

Running the web app locally

Secrets

  • Get user secrets from another developer on the team.

Create the database

  • Manually create empty database CourseDirectory:
create database CourseDirectory;
ALTER DATABASE CourseDirectory SET ALLOW_SNAPSHOT_ISOLATION ON;

Deploy database from Visual Studio

  • Right-click "Publish" on the database project then deploy to database CourseDirectory.

Deploy database from CLI

Temporarily configure user secret ConnectionStrings:DefaultConnection for project CourseDirectoryTesting to point to database CourseDirectory.

Run the tests in Dfc.CourseDirectory.WebV2.Tests, this will cause the dacpac to deploy.

Undo the temporary user secret configuration change.

Run the web project

Run project Dfc.CourseDirectory.Web

Navigate to https://localhost:44345/ in a browser.

Login

Ask the team to make you a valid DfE Sign-in account with provider(s) associated with it.

Project architecture

Azure Function App Dependencies

This project depends on multiple deployed Azure function app resources:

Project Structure

Legacy

The projects in the Legacy solution folder were inherited without good test coverage and are not in an easily testable state.

WebV2

New code is being written in the WebV2 project that is test-driven and uses modern patterns of development to achieve cleaner testable code.

See the WebV2 readme for details of the patterns in use.

The WebV2 controllers are made available under the legacy Dfc.CourseDirectory.Web project so that we can move routes across one at time. As such to run the WebV2 code you actually need to run the original "Web" project.

Configurability

Bypass Apprenticeship QA process

For development with a local SQL Database that doesn't have providers configured with their apprenticeship status. (Debug builds only)

src/Dfc.CourseDirectory.Web> CD_BYPASS_QA=true dotnet run

Alternatively for an individual provider set the ApprenticeshipQAStatus for the provider you're looking at to 16 (Passed) in Pttcd.Providers SQL table.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 73.3%
  • HTML 19.3%
  • CSS 3.7%
  • JavaScript 1.9%
  • TSQL 1.0%
  • SCSS 0.8%