Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #99

Closed
wants to merge 68 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c0d428f
Added test project
May 9, 2024
9a4af93
Added ADR docs
May 13, 2024
75c19a1
Added basic unit tests
May 13, 2024
adc78b6
Merge pull request #76
ThomasWhittington May 13, 2024
a36deae
added ADR
May 13, 2024
3b65640
merge
May 13, 2024
f7178c5
Merge pull request #78 from DFE-Digital/feature/adr
simonjfirth May 13, 2024
d8efabd
updated folder structure
May 13, 2024
75d03ee
restructure
May 13, 2024
1477325
Added architecture diagram
May 13, 2024
3d68674
More unit tests
May 15, 2024
d1eb7aa
Added DI test
May 15, 2024
15e4490
Merge pull request #79 from DFE-Digital/feature/_rework/testing
ThomasWhittington May 15, 2024
3907b0e
Added contentful model for richtext
May 20, 2024
c7439e2
Merge pull request #81 from DFE-Digital/feature/_rework/model
ThomasWhittington May 20, 2024
e7c0a4c
Updated content service (#82)
ThomasWhittington May 23, 2024
b882a40
Created contentful stub
May 24, 2024
6e8a5fc
Updated to query builder
May 24, 2024
2bd2621
Add renderer for rich text content (#75)
jack-coggin May 24, 2024
6b5894d
updated e2e and app settings
May 24, 2024
4b53768
Merge remote-tracking branch 'origin/feature/rework' into feature/con…
May 24, 2024
748461f
Merge pull request #84 from DFE-Digital/feature/contentful-stub
simonjfirth May 24, 2024
6b75869
Updated tests
ThomasWhittington May 28, 2024
650977f
Feature/ rework/linking (#86)
ThomasWhittington May 30, 2024
7363e0a
wip: render linked entry and asset from within rich text
jack-coggin Jun 6, 2024
8cc086a
wip: render download component
jack-coggin Jun 6, 2024
02e3b0c
display corresponding icon for download filetype
jack-coggin Jun 7, 2024
cf133a6
update e2e tests
jack-coggin Jun 10, 2024
99967c2
Feature/ rework/embedded entries (#87)
ThomasWhittington Jun 11, 2024
75bd6a4
Merge branch 'feature/rework' into feature/download-component
jack-coggin Jun 11, 2024
6c737cd
update entry partial
jack-coggin Jun 11, 2024
b6a448d
revert ContentService changes
jack-coggin Jun 11, 2024
7c18842
use target variable in entry partial
jack-coggin Jun 12, 2024
8b47734
tweak entry partial
jack-coggin Jun 12, 2024
546824d
update file icons
jack-coggin Jun 12, 2024
c9f083d
Merge pull request #88 from DFE-Digital/feature/download-component
jack-coggin Jun 12, 2024
cebefc2
Added terraform scripts
Jun 13, 2024
9fd7056
add accordion component
jack-coggin Jun 13, 2024
6fbd22e
Added workflows and actions
Jun 13, 2024
f15d4cc
adding missing WAF and updated contentful environment
Jun 13, 2024
0e1b63b
update integration tests
jack-coggin Jun 14, 2024
637bb25
wip: add accessibility tweaks, accessibilty tests and page layout upd…
jack-coggin Jun 14, 2024
1f0ad01
Added support for cards and grid containers. Updated dfeFrontend to 2…
ThomasWhittington Jun 14, 2024
113c576
Merge branch 'feature/rework' into feature/accordion-component
jack-coggin Jun 17, 2024
14fa189
Merge branch 'feature/rework' into a11y
jack-coggin Jun 17, 2024
b62182c
use dfe container width and update header styling
jack-coggin Jun 17, 2024
0b54167
updated workflow
simonjfirth Jun 17, 2024
6845b17
TF changes to get inital build going
Iain-Stanger Jun 18, 2024
c142aee
merge
Iain-Stanger Jun 18, 2024
ffeccc6
fixed tflint
simonjfirth Jun 18, 2024
a9ecc9b
removed unused vars from pr-check
simonjfirth Jun 18, 2024
8420f2f
added dev environment
simonjfirth Jun 18, 2024
51c7c07
lock updated
simonjfirth Jun 18, 2024
d976dd5
reformatted locals.tf
simonjfirth Jun 18, 2024
584e98f
terraform-docs: automated action
github-actions[bot] Jun 18, 2024
32ac0d3
Merge pull request #90 from DFE-Digital/feature/terraform-workflows
simonjfirth Jun 18, 2024
35b00b0
include hero in header
jack-coggin Jun 18, 2024
b1bfef0
fix e2e tests
jack-coggin Jun 18, 2024
66ebdad
Merge pull request #89 from DFE-Digital/feature/accordion-component
jack-coggin Jun 18, 2024
6bbc904
Updated JS + CSS files
github-actions[bot] Jun 19, 2024
a89b26a
add support for multiple accordion sections
jack-coggin Jun 19, 2024
1e1dccf
resolve assets for e2e testing
jack-coggin Jun 19, 2024
0da9ec0
Merge pull request #95 from DFE-Digital/feature/accordion-sections
jack-coggin Jun 20, 2024
013589e
Merge branch 'Development' into frontend-tweaks
jack-coggin Jun 20, 2024
083959f
Merge pull request #92 from DFE-Digital/frontend-tweaks
jack-coggin Jun 20, 2024
05a5e3e
Capitalise development branch name (#93)
simonjfirth Jun 24, 2024
846b2c8
Feature/app insights (#97)
simonjfirth Jun 25, 2024
96df3b2
Feature/vault (#98)
simonjfirth Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added ADR docs
  • Loading branch information
Simon FIRTH authored and Simon FIRTH committed May 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9a4af93eae9538f8437ac7fe1f064b79aee16cb1
23 changes: 23 additions & 0 deletions docs/adr/0001-web-framework.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 0001 - Web Framework Language

* **Status**: Accepted

## Context and Problem Statement

Within the DfE there are a choice of web frameworks that are used for the implementation of software including .NET and Ruby on Rails. Which framework should we use for this project?

## Decision Drivers

* Within DfE�s Technical Guidance
* Open source as per Service Standard
* Prominent and widely used within the industry today
* Software Engineers are easy to source

## Considered Options

* .NET
* Ruby on Rails

## Decision Outcome

Chosen option: [.NET](https://dotnet.microsoft.com) framework.
22 changes: 22 additions & 0 deletions docs/adr/0002-application-framework.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 0002 - Application Framework

* **Status**: Accepted

## Context and Problem Statement

There are two primary .NET application frameworks used for .NET projects within the DfE. These are ASP.NET MVC and ASP.NET Razor Pages. Which framework should we use for this project?

## Decision Drivers

* Suited to project's needs
* Patterns within framework are standard and familiar for Developers familiar with other web frameworks including Ruby on Rails
* The chosen framework should be compatible with existing DfE NuGet packages to serve GDS frontend assets

## Considered Options

* ASP.NET MVC
* ASP.NET Razor Pages

## Decision Outcome

Chosen option: [ASP.NET MVC](https://dotnet.microsoft.com/en-us/apps/aspnet/mvc) framework.
24 changes: 24 additions & 0 deletions docs/adr/0003-build-test-deploy-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 0003 - Build/Test/Deploy Environments

* **Status**: Accepted

## Context and Problem Statement

How to ensure consistency during application build, testing and deployment across varying hosts and operating systems?

## Decision Drivers

* Faster setup during onboarding for new Developers
* Parity of development environment for each Developer
* Eliminate dependencies on system level libraries
* Portability to easily deploy application on different hosts
* Solution prominent and widely used within industry

## Considered Options

* Containerisation with Docker
* Native framework/manual installation

## Decision Outcome

Chosen option: Containerised environment using [Docker](https://www.docker.com/).
23 changes: 23 additions & 0 deletions docs/adr/0004-hosting-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 0004 - Hosting Platform

* **Status**: Accepted

## Context and Problem Statement

Within the DfE there are a choice of hosting platforms (e.g. Azure, GOV.UK PaaS) that could be used; which one should be used within this project, and why?

## Decision Drivers

* Within DfE’s Technical Guidance
* Cloud first as per Technology Code of Practice
* Supports Docker for application portability
* Long term sustainability

## Considered Options

* Azure Cloud Infrastructure Platform (CIP)
* GOV.UK PaaS

## Decision Outcome

Chosen option: [Azure CIP](https://technical-guidance.education.gov.uk/infrastructure/hosting/azure-cip) as GOV.UK is planned to be decommissioned towards the end of 2023.
22 changes: 22 additions & 0 deletions docs/adr/0005-source-repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 0005 - Source Repository Hosting

* **Status**: Accepted

## Context and Problem Statement

Where should the solution's source code be stored?

## Decision Drivers

* Within DfE’s Technical Guidance
* Open source as per Service Standard
* Compatible with selected hosting platform and deployment tooling

## Considered Options

* GitHub
* Azure DevOps

## Decision Outcome

Chosen option: [GitHub](https://github.com) as this is open source and standard for DfE projects.
24 changes: 24 additions & 0 deletions docs/adr/0006-deployment-tooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 0006 - Deployment Tooling

* **Status**: Accepted

## Context and Problem Statement

How to ensure new versions of the application are consistently packaged, tested and deployed?

## Decision Drivers

* Within DfE’s Technical Guidance
* Open source as per Service Standard
* Compatible with selected hosting platform
* Support for automated application, security and accessibility testing
* Enables quick and frequent releases

## Considered Options

* GitHub Actions
* Azure DevOps

## Decision Outcome

Chosen option: Continuous Integration and Continuous Deployment with [GitHub Actions](https://github.com/features/actions) as this is open source.
24 changes: 24 additions & 0 deletions docs/adr/0007-infrastructure-as-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 0007 - Infrastructure As Code

* **Status**: Accepted

## Context and Problem Statement

How can we ensure that hosting environments are configured consistently and track changes made?

## Decision Drivers

* Open source as per Service Standard
* Compatible with selected hosting platform
* Infrastructure changes are scripted, versioned and reversible
* Portability
* Prominent within industry

## Considered Options

* Terraform
* ARM Templates

## Decision Outcome

Chosen option: [Terraform](https://www.terraform.io) as this is open source.
22 changes: 22 additions & 0 deletions docs/adr/0008-container-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 0008 - Container Registry

* **Status**: Accepted

## Context and Problem Statement

As the application will be containerised with Docker where is the best place solution to store the associated Docker images?

## Decision Drivers

* Within DfE’s Technical Guidance
* Compatible with selected hosting platform
* Simple with minimal configuration

## Considered Options

* Azure Container Registry
* Docker Hub

## Decision Outcome

Chosen option: [Azure Container Registry](https://azure.microsoft.com/en-us/products/container-registry) as this is within the Azure ecosystem making configuration simpler.
22 changes: 22 additions & 0 deletions docs/adr/0009-secrets-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 0009 - Secrets Management

* **Status**: Accepted

## Context and Problem Statement

Where can we store sensitive application configuration data such as secrets so these are exposed to malicious actors?

## Decision Drivers

* Within DfE’s Technical Guidance
* Compatible with selected hosting platform
* Adequare security to protect sensitive data

## Considered Options

* Azure Key Vault
* F5

## Decision Outcome

Chosen option: [Azure Key Vault](https://azure.microsoft.com/en-gb/products/key-vault).
21 changes: 21 additions & 0 deletions docs/adr/0010-content-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 0010 - Content Management

* **Status**: Accepted

## Context and Problem Statement

How can the Service content be managed by Content Designers without the need for Developer intervention?

## Decision Drivers

* Already used in other DfE’s projects
* Must retain control of frontend design aspects to conform with standards

## Considered Options

* Contentful
* Bespoke Content Management System

## Decision Outcome

Chosen option: [Contentful](https://github.com/features/actions) as this is already used within the DfE.
41 changes: 41 additions & 0 deletions docs/adr/0011-software-architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 0011 - Software Architecture

* **Status**: accepted

## Context and Problem Statement
What software architecture should be adopted within the PTFYS service to ensure we're following modern and existing DfE standards?

## Decision Drivers
* Within DfE’s Technical Guidance
* SLT Lead Tech (Mamood Suyltan) would like a modern architecture
* Clean Architecture has been used for other DfE Java services

## Considered Options
* Clean Architecture
* Layer description
* UI: MVC application
* Application: Contains all application logic
* Domain: Contain all entities, enums, exceptions, interfaces, types and logic specific to the domain layer.
* Infrastructure: Contains classes for accessing external resources such as file systems, web services, smtp, and so on.
* Reference
* [Uncle Bob Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
* [Microsoft Clean Architecture](https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures#clean-architecture)


* Clean Architecture with CQRS
* CQRS
* Pros
* Scalability / Optimisation
* Simplicity & maintainability
* Cons
* Increased complexity
* Not suitable for all applications (e.g. small applications or applications with simple domains)
* Jason Taylor: [Clean Architecture Solution Template](https://github.com/jasontaylordev/CleanArchitecture)
* Matt Hewrenze: [clean-architecture-core](https://github.com/matthewrenze/clean-architecture-core)
* Hexagonal Architecture
* Onion Architecture
* Nth Tier Architecture

## Decision Outcome

We have decided to use Clean Architecture in our project. We are not using CQRS as it is unnecessarily complex for the scope of our MVS.
26 changes: 26 additions & 0 deletions docs/adr/0012-executing-unit-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 0012 - Executing Unit Tests

* **Status**: accepted

## Context and Problem Statement
What unit test runner should be adopted within the PTFYS that integrates well into Visual Studio, can be executed within pipeline, performs well and is open source and actively developed?

## Decision Drivers
* Open source
* Within DfE’s Technical Guidance
* xUnit is used by the following services
* [find-a-tuition-partner](https://github.com/DFE-Digital/find-a-tuition-partner)
* [fh-referral-api](https://github.com/DFE-Digital/fh-referral-api)
* [prepare-academy-conversions](https://github.com/DFE-Digital/prepare-academy-conversions)
* NUnit is used by the following services
* [amsd-casework](https://github.com/DFE-Digital/amsd-casework)
* [Dfe.Academies.External](https://github.com/DFE-Digital/Dfe.Academies.External)

## Considered Options
* MSTest
* xUnit.net
* NUnit

## Decision Outcome

xUnit.net is the chosen framework as this is used by other DfE projects and the team are also familiar with this . this is a free, open source, community-focused unit testing tool for the .NET Framework. written by the original inventor of NUnit v2.
24 changes: 24 additions & 0 deletions docs/adr/0013-tool-for-ui-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 0013 - Tool For UI Testing

* **Status**: accepted

## Context and Problem Statement

What tool should be adopted within the PTFYS service to facilitate UI testing?

## Decision Drivers

* Within DfE’s Technical Guidance
* DfE projects using Cypress
* [find-a-tuition-partner](https://github.com/DFE-Digital/find-a-tuition-partner)
* [trams-data-api](https://github.com/DFE-Digital/trams-data-api)

## Considered Options

* Cypress
* Selenium / specflow
* Puppeteer

## Decision Outcome

Using [Cypress](https://cypress.io) as it is the most commonly used UI testing application/framework across DFE.
40 changes: 40 additions & 0 deletions docs/adr/0014-tools-for-building-unit-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 0014 Tools For Building Unit Tests

* **Status**: accepted

## Context and Problem Statement
Which frameworks can be adopted within the PTFYS that will aid the developer to create clear, concise unit tests quickly and help facilitate TDD?

## Decision Drivers
* Open source
* Within DfE’s Technical Guidance
* Moq is used by the following services
* [Dfe.Academies.External](https://github.com/DFE-Digital/Dfe.Academies.External)
* [find-a-tuition-partner](https://github.com/DFE-Digital/find-a-tuition-partner)
* AutoFixture can be used to is used by the following services to generate
* [amsd-casework](https://github.com/DFE-Digital/amsd-casework)
* [prepare-academy-conversions](https://github.com/DFE-Digital/prepare-academy-conversions)

## Considered Options

Mocking
* Moq
* FakeItEasy
* Rhino Mocks
* JustMock
* Microsoft Fakes (Visual Studio Enterprise edition)

Test Data
* AutoFixture
* NBuilder
* Bogus

Assertions
* Fluent Assertions
* NFluent
* Shouldly
* MSTest/NUnit and xUnit built-in assertions

## Decision Outcome

We will use Moq and xUnit for our testing purposes, as these are the two most popular testing packages currently available in their respective domains. We will also use Fluent Assertions to increase readability and make assertions more understandable
Loading