This application is build using ASP.NET MVC with .Net Framework v4.7 referencing a CosmosDB database NoSQL management system hosted on Microsoft Azure.
The following tools may be installed directly on Windows, or via Chocolatey. Chocolatey is advised when installing Node via the latest downloaded binaries and will install the VS and Python dependencies below automatically.
NOTE: This solution will not build on non-Windows boxes due to the dependency on C++ binaries used by
node-gyp
- Open web folder:
cd .\Web\SFB.Web.UI\
- Install correct
node
version:nvm install 16.20.2
- Set
node
version:nvm use 16.20.2
- Install
grunt
globally:npm i grunt -g
- Install
node-gyp
globally:npm i node-gyp -g
- Install
node-sass
globally:npm i node-sass -g
- Install deps:
npm i
- Build assets:
npm run build:newAndLegacyDev
NOTE: The
webpack
build is slow and as at 2024 there will be a large number of warnings about deprecated packages. As long as./public/assets/scripts/application.js
has been generated then build has been successful.
When restoring packages in the .NET Framework solution, the private package feed in DevOps will need to be authenticated with. If the built-in credential manager does not work (with 401 Unauthoized
errors from NuGet), then try a PAT instead and use Rider to add to the private package feed configuration. Alternatively, register the PAT in the roaming config file at %AppData%\NuGet\NuGet.config
:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="SFB.Artifacts" value="https://agilefactory.pkgs.visualstudio.com/fc33e3f0-e73b-466d-837a-10cad68c664e/_packaging/SFB.Artifacts/nuget/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<SFB.Artifacts>
<add key="Username" value="<USERNAME>" />
<add key="ClearTextPassword" value="<PAT>" />
</SFB.Artifacts>
</packageSourceCredentials>
</configuration>
The following appSettings.config
file is needed in the root of .\Web\SFB.Web.UI
before the application will be able to run locally:
<?xml version="1.0" encoding="UTF-8"?>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="SessionExpireTimeSpan" value="00:05:00" />
<add key="database" value="sfb-dev" />
<add key="endpoint" value="https://cm-t1dv-sfb.documents.azure.com:443/" />
<add key="authKey" value="•••" />
<add key="SearchInstance" value="ss-t1dv-sfb" />
<add key="SearchKey" value="•••" />
<add key="SearchIndex" value="search" />
<add key="SearchIndexTrust" value="search-trust" />
<add key="GoogleAnalyticsId" value="UA-123353106-1" />
<add key="GoogleAPIKey" value="•••" />
<add key="GoogleTagManagerId" value="GTM-TTHL2RR" />
<add key="DynamicHeaderContent" value="If you would like to help us improve the usability of the beta site through a testing session, please email <a href="mailto:school.resourcemanagement@education.gov.uk" target="_top">school.resourcemanagement@education.gov.uk<span class="visuallyhidden"> Email link</span></a>" />
<add key="EnableAITelemetry" value="false"/>
<add key="EnableElmahLogs" value="false"/>
<add key="SptApiUrl" value="https://www.find-school-performance-data.service.gov.uk" />
<add key="GiasApiUrl" value="https://www.get-information-schools.service.gov.uk" />
<add key="ExternalServiceCacheHours" value="0.5"/>
<add key="SptApiUserName" value="internal" />
<add key="SptApiPassword" value="hansgruber1988" />
<add key="AuthenticationEnabled" value="false" />
<add key="TestUserName" value="internal" />
<add key="TestPassword" value="•••" />
<add key="AzureMapsAPIKey" value="•••"/>
<add key="RedisConnectionString" value="sfb-dev.redis.cache.windows.net:6380,password=•••,ssl=True,abortConnect=False,sslprotocols=tls12"/>
<add key="NotifyAPIKey" value="•••"/>
<add key="UserEmailTemplateId" value="•••"/>
<add key="DfEEmailTemplateId" value="•••"/>
<add key="ContactUsUserEmailTemplateId" value="•••"/>
<add key="ContactUsDfEEmailTemplateId" value="•••"/>
<add key="RecruitmentEmailTemplateId" value="•••"/>
<add key="BetaSurveyUrl" value="https://dferesearch.fra1.qualtrics.com/jfe/form/SV_cUt5o7hpEyXBUOh"/>
<add key="BMSurveyUrl" value="https://dferesearch.fra1.qualtrics.com/jfe/form/SV_1ZV7aparOQ145OR"/>
<add key="SRMEmailAddress" value="BetterFinancialReporting.COMMS@education.gov.uk"/>
<add key="EfficiencyMetricsUrl" value="http://localhost:4201/efficiency-metric"/>
<add key="SelfAssessmentUrl" value="http://localhost:4200/self-assessment"/>
<add key="cookieDomain" value="localhost"/>
<add key="emCollection" value="20210318000000-EM-2021-2022"/>
<add key="trustHistoryCollection" value="20210713-TrustHistory-2021-2022"/>
<add key="SfbApiUrl" value="localhost:44383"/>
<add key="Feature-RevisedSchoolPage-enabled" value="True"/>
<add key="UnderReviewSchools" value="138492"/>
<add key="UnderReviewTrusts" value="8850163"/>
<add key="UnderReviewMessageForSchools" value="This school's finances are currently under review and may be amended."/>
<add key="UnderReviewMessageForTrusts" value="This trust's finances are currently under review and may be amended."/>
<add key="CosmosConnectionMode" value="Gateway" />
</appSettings>