Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ We also have:

You can find our code in the following repositories:
- [forms-admin](https://github.com/alphagov/forms-admin) - our application for building forms.
- [forms-api](https://github.com/alphagov/forms-api) - our application for storing and serving form definitions.
- [forms-runner](https://github.com/alphagov/forms-runner) - our application for hosting forms, so that they can be filled in by members of the public.
- [forms-e2e-tests](https://github.com/alphagov/forms-e2e-tests) - end-to-end tests for the service.
- [forms-product-page](https://github.com/alphagov/forms-product-page) - our product pages, as seen at [https://forms.service.gov.uk](https://forms.service.gov.uk)
Expand Down
2 changes: 1 addition & 1 deletion diagrams/class-diagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ generator="mermaid" rake erd

This will create a file called `erd.mmd` in the root of the application.

## Update the diagram
## Update the diagram

1. Open the file in an editor and copy the contents (all of the `classDiagram` block).
2. Paste the contents into the corresponding diagram file, replacing everything inside the "mermaid" block:
Expand Down
18 changes: 11 additions & 7 deletions diagrams/class-diagrams/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ classDiagram
`Form` : +text declaration_text
`Form` : +string external_id
`Form` : +text form_slug
`Form` : +string language
`Form` : +text name
`Form` : +string payment_url
`Form` : +text privacy_policy_url
Expand All @@ -49,30 +50,28 @@ classDiagram
`Form` : +text support_url
`Form` : +text support_url_text
`Form` : +text what_happens_next_markdown
class `FormDocument`
`FormDocument` : +jsonb content
`FormDocument` : +text tag
class `FormSubmissionEmail`
`FormSubmissionEmail` : +string confirmation_code
`FormSubmissionEmail` : +string created_by_email
`FormSubmissionEmail` : +string created_by_name
`FormSubmissionEmail` : +integer form_id
`FormSubmissionEmail` : +string temporary_submission_email
`FormSubmissionEmail` : +string updated_by_email
`FormSubmissionEmail` : +string updated_by_name
class `Group`
`Group` : +boolean branch_routing_enabled
`Group` : +boolean exit_pages_enabled
`Group` : +text external_id
`Group` : +string name
`Group` : +string status
`Group` : +boolean welsh_enabled
class `GroupForm`
`GroupForm` : +integer form_id
class `Membership`
`Membership` : +string role
class `MouSignature`
class `Organisation`
`Organisation` : +string abbreviation
`Organisation` : +boolean closed
`Organisation` : +integer default_group_id
`Organisation` : +string govuk_content_id
`Organisation` : +boolean internal
`Organisation` : +string name
Expand All @@ -84,7 +83,6 @@ classDiagram
`Page` : +text hint_text
`Page` : +boolean is_optional
`Page` : +boolean is_repeatable
`Page` : +integer next_page
`Page` : +text page_heading
`Page` : +integer position
`Page` : +text question_text
Expand All @@ -106,9 +104,11 @@ classDiagram
`User` : +text permissions
`User` : +string provider
`User` : +boolean remotely_signed_out
`User` : +string research_contact_status
`User` : +string role
`User` : +datetime terms_agreed_at
`User` : +string uid
`User` : +datetime user_research_opted_in_at
`Item` --> `PaperTrail::Version`
`Organisation` --> `PaperTrail::Version`
`User` --> `PaperTrail::Version`
Expand All @@ -123,7 +123,11 @@ classDiagram
`Organisation` --> `MouSignature`
`Group` --> `Membership`
`Group` --> `GroupForm`
`Form` -- `GroupForm`
`Group` ..> `Form`
`Form` --> `FormDocument`
`Form` --> `Page`
`Form` -- `FormSubmissionEmail`
`Page` --> `Condition`
`Condition` .. `Form`
```
```
98 changes: 0 additions & 98 deletions diagrams/class-diagrams/api.md

This file was deleted.

7 changes: 3 additions & 4 deletions diagrams/sequence-diagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

The diagrams in this folder (created using [Mermaid](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams)) show the interactions between users and GOV.UK Forms, including the 3 applications [forms-admin](https://github.com/alphagov/forms-admin), [forms-api](https://github.com/alphagov/forms-api), and [forms-runner](https://github.com/alphagov/forms-runner).
The diagrams in this folder (created using [Mermaid](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams)) show the interactions between users and GOV.UK Forms, including the two main applications [forms-admin](https://github.com/alphagov/forms-admin) and [forms-runner](https://github.com/alphagov/forms-runner).

The diagram below is to provide an overview of the different users and systems that interact with each other. For clarity, not all interactions are shown. Please refer to individual sequence diagrams for detailed interactions.

Expand All @@ -28,15 +28,14 @@ graph TD

subgraph sg1 [GOV.UK Forms]
admin(forms-admin)
api(forms-api)
runner(forms-runner)
end

editor---runner

auth0 --- admin --- api
auth0 --- admin
filler --- govuk
filler --- runner --- api
filler --- runner --- admin

notify(GOV.UK Notify)

Expand Down
17 changes: 2 additions & 15 deletions diagrams/sequence-diagrams/changing-a-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,35 @@ sequenceDiagram
participant browser as Web Browser
participant admin as forms-admin
link admin: GitHub repo @ https://github.com/alphagov/forms-admin
participant api as forms-api
link api: GitHub repo @ https://github.com/alphagov/forms-api

note right of user: Form has already been made live

user->>browser: visit live form page
browser->>admin: GET /forms/{form id}/live
admin->>api: GET /api/v1/forms/{form id}
admin->>api: GET /api/v1/forms/{form id}/live
browser-->>user: show live form page

user->>browser: click "Create a draft to edit" button
browser->>admin: GET /forms/{form id}
admin->>api: GET /forms/{form id}
admin->>api: GET /forms/{form id}/pages
browser-->>user: show draft form page with task list

note over user,api: User edits the draft form (See Creating form)<br>until they are ready to make their changes live
note over user,admin: User edits the draft form (See Creating form)<br>until they are ready to make their changes live

user->>browser: click "Make your changes live" task
browser->>admin: GET /forms/{form id}/make-live
admin->>api: GET /api/v1/forms/{form id}
browser-->>user: show "Make your changes live" page
alt form creator decides not to make form live
user->>browser: click "No" and submits page
browser->>admin: POST /forms/{form id}/make-live<br>payload: {forms_make_live_form"=><br>{"confirm_make_live"=>"not_made_live"},<br>"form_id"=>"{form id"}}
admin->>api: GET /api/v1/forms/{form id}
admin-->>browser: REDIRECT 302
browser->>admin: GET /forms/{form id}
admin->>api: GET /forms/{form id}
admin->>api: GET /forms/{form id}/pages
browser-->>user: show draft form page with task list
else form creator decides to make form live
user->>browser: click "Yes" and submits page
browser->>admin: POST /forms/{form id}/make-live<br>payload: {forms_make_live_form"=><br>{"confirm_make_live"=>"made_live"},<br>"form_id"=>"{form id"}}
admin->>api: POST /api/v1/forms/{form id}/make-live<br>payload: {includes all form attributes and values}<br>Controller Action doesn't use any
note over admin,api: Creates a new record in published_forms table,<br>with a copy of the form and all its pages<br>
note over admin,admin: Creates a new record in published forms table,<br>with a copy of the form and all its pages<br>
browser-->>user: show "Your form is live" confirmation page
user->>browser: click "Continue to form details" link
browser->>admin: GET /forms/{form id}/live
admin->>api: GET /api/v1/forms/{form id}
admin->>api: GET /api/v1/forms/{form id}/live
browser-->>user: show live form page
end
```
Loading