This is the official open-source repository for the Learning Hub platform.
The Learning Hub is the national digital learning platform providing easy access to a wide range of educational resources and support for the health and care workforce and educators.
The Learning Hub is provided and supported by the Technology Enhanced Learning Platforms team at NHS England.
- Visual Studio Professional 2022 or other suitable An IDE that supports the Microsoft Tech Stack
- Make sure you have the NPM Task Runner extension
- SQL Server 2019
- SQL Server Management Studio 18
- Git
- Node install specific/required version using NVM - see below.
- SASS for the command line
- Specifically, follow the "Install Anywhere (Standalone)" guide. Simply download and extract the files somewhere, and point PATH at the dart-sass folder. This should allow you to use the "sass" command.
- You don't want to install it via Yarn, as those are JavaScript versions that perform significantly worse.
- .Net 6.0 SDK
- Azure storage emulator
- Azure storage explorer
- Node version manager (nvm) - use this to install and use Node version 16.13.0 and NPM version 8.1.0 to work with this repository.
To run the code, you will also need to clone and build the Learning Hub User API repository
You will need a development copy of the Learning Hub SQL database - to obtain this, please contact support (see Contribute section below)
Clone the repository from GitHub:
git clone [email protected]:TechnologyEnhancedLearning/LearningHub.Nhs.WebUI.git
You should now be able to open the solution in your IDE by finding and opening the LearningHub.Nhs.WebUI.sln
file.
These instructions assume that you have already followed the Build and Test instructions for the Learning Hub User API repository. Specifically, you have already:
- Created a Truested self-signed certificate
- Configured Learning Hub development URLs to use this certificate in IIS
- Added the development URLs to the Windows hosts files
- Set up the Learning Hub and elfh Hub databases and run necessary migrations
- Created a user account for login
- Added the NuGet package source to Visual Studio
- Built and run the User API application
- Right click LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI in the solution explorer and choose 'Open in Terminal'
- Run
npm clean-install
- Run
npm cache clean --force
- Run
npm install
- Run
npm run dev
(after the first successful build, this will be the only command required)
Or, for better performance, use Yarn:
- Run
yarn install
- Run
yarn run watch
NOTE: If you run into any errors, using a different version of node may help. It is best to use nvm - Node Version Manager - to do this.
Repeat the above for the LearningHub.Nhs.AdminUI project.
Add appsettings.Development.json files to the following projects:
- LearningHub.Nhs.WebUI
- LearningHub.Nhs.Api
- LearningHub.Nhs.AdminUI Modify settings as appropriate for your environment.
If you are an official contributor (see below) working appsettings.Development.json will be provided by the service team.
Create a Local IIS launch profile for the following projects:
- LearningHub.Nhs.WebUI
- LearningHub.Nhs.Api
- LearningHub.Nhs.AdminUI
- From the launch drop down choose Debug Properties
- Create a New profile
- Choose IIS from the drop-down and name the profile IIS Local
- Add the environment name to Environment variables:
ASPNETCORE_ENVIRONMENT=Development
- Check Launch browser if appropriate (WebUI, AdminUI)
- Set the App URL. Suggested URLs are as follows:
- LearningHub.Nhs.AdminUI = https://lh-admin.dev.local
- LearningHub.Nhs.WebAPI = https://lh-api.dev.local
- LearningHub.Nhs.WebUI = https://lh-web.dev.local
- Tick the checkbox for Enable Anonymous Authentication.
- Rebuild the solution
- Set LearningHub.Nhs.WebUI as the startup Project
- Start debugging.
If you are interested in contributing to the Learning Hub, please contact [email protected].