From 072e985222a962a4fc05cb8e404aa2b57d55b450 Mon Sep 17 00:00:00 2001 From: Daniel Naab Date: Wed, 23 Oct 2024 21:56:41 -0500 Subject: [PATCH 1/2] Add c4-like diagram in Mermaid format (#345) * Add c4-like diagram in Mermaid format * Use cylinder for db and general cleanup * Add separate DOJ diagram with S3 and backend systems in an agency boundary. * Style DOJ chart --- README.md | 2 +- documents/diagram.md | 38 ++++++++++++++++++++++++++++++++++++ documents/doj-diagram.md | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 documents/diagram.md create mode 100644 documents/doj-diagram.md diff --git a/README.md b/README.md index 185882d8..f0953677 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Test bed for ATJ platform tooling, completed as part of the [10x Digital Access ## Overview -The workspace dependencies are depicted in this auto-generated [workspace project dependencies graph](./workspace-dependencies.svg). +A C4-like architectural diagram is [available here](documents/diagram.md). Additional documentation: diff --git a/documents/diagram.md b/documents/diagram.md new file mode 100644 index 00000000..4fa1d705 --- /dev/null +++ b/documents/diagram.md @@ -0,0 +1,38 @@ +# Forms Platform - architecture diagram + +```mermaid +flowchart TB + subgraph "External Users" + formFiller[Form Filler: Submits forms] + formCreator[Form Creator: Uses no-code interface to create forms] + formReviewer[Form Reviewer: Reviews submitted forms] + end + + subgraph "Forms Platform (Internal)" + webServer[Node.js Web Server: Handles form creation, submission, and interactions] + database[(Postgres DB: Stores form data and user information)] + end + + subgraph "External Systems" + loginGov[Login.gov: Handles authentication] + + subgraph "Agency Systems" + agencyBackend[Agency Backend Systems: Receives submitted form data] + s3Bucket[Amazon S3: Stores completed forms] + end + end + + formCreator -->|Creates forms using| webServer + formFiller -->|Submits forms via| webServer + formReviewer -->|Reviews submitted forms using| webServer + webServer -->|Stores and retrieves form data from| database + + webServer -->|Authenticates form creators - https| loginGov + webServer -->|Submits form data to Agency Backend - https| agencyBackend + webServer -->|Uploads form PDFs to S3 Bucket - https| s3Bucket + + %% Forcing "External Systems" to be below "Forms Platform" + dummyNode[ ]:::invisible + webServer --> dummyNode + dummyNode --> loginGov +``` diff --git a/documents/doj-diagram.md b/documents/doj-diagram.md new file mode 100644 index 00000000..9bcd071b --- /dev/null +++ b/documents/doj-diagram.md @@ -0,0 +1,42 @@ +# Forms Platform - DOJ architecture diagram + +Sample diagram of a potential DOJ deployment of the Forms Platform. + +```mermaid +flowchart TB + subgraph "External Users" + formFiller[Form Filler: Submits forms]:::userStyle + formCreator[Form Creator: Uses no-code interface to create forms]:::userStyle + formReviewer[Form Reviewer: Reviews submitted forms]:::userStyle + end + + subgraph "DOJ Boundary" + subgraph "Forms Platform (Internal)" + webServer[Node.js Web Server: Handles form creation, submission, and interactions]:::webStyle + database[(Postgres DB: Stores form data and user information)]:::dbStyle + end + + subgraph "Agency Systems" + agencyBackend[Agency Backend Systems: Receives submitted form data]:::agencyStyle + s3Bucket[(Amazon S3: Stores completed forms)]:::agencyStyle + end + end + + subgraph "External Systems" + loginGov[Login.gov: Handles authentication] + end + + formCreator -->|Creates forms using| webServer + formFiller -->|Submits forms via| webServer + formReviewer -->|Reviews submitted forms using| webServer + webServer -->|Stores and retrieves form data from| database + + webServer -->|Authenticates form creators via HTTPS| loginGov + webServer -->|Submits form data to Agency Backend via HTTPS| agencyBackend + webServer -->|Uploads form PDFs to S3 Bucket via HTTPS| s3Bucket + + classDef userStyle fill:#ffa500,stroke:#000,stroke-width:2px,color:#000; + classDef webStyle fill:#6f6,stroke:#000,stroke-width:2px,color:#000; + classDef dbStyle fill:#f9f,stroke:#333,stroke-width:2px,color:#000; + classDef agencyStyle fill:#cde,stroke:#000,stroke-width:2px,color:#000; +``` From 7bcd57f1aa236b76292df5287f3a4fa8f7901fab Mon Sep 17 00:00:00 2001 From: Khayal Alasgarov Date: Fri, 25 Oct 2024 14:02:21 -0700 Subject: [PATCH 2/2] chore: update server file to add email address for khayal to authorized users list (#355) Co-authored-by: Khayal Alasgarov --- apps/server-doj/src/server.ts | 1 + apps/server-kansas/src/server.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/server-doj/src/server.ts b/apps/server-doj/src/server.ts index 32671777..e1bd2117 100644 --- a/apps/server-doj/src/server.ts +++ b/apps/server-doj/src/server.ts @@ -19,6 +19,7 @@ export const createCustomServer = async (db: DatabaseContext): Promise => { 'ethan.gardner@gsa.gov', 'natasha.pierre-louis@gsa.gov', 'emily.lordahl@gsa.gov', + 'khayal.alasgarov@gsa.gov', // DOJ test users 'deserene.h.worsley@usdoj.gov', 'jordan.pendergrass@usdoj.gov', diff --git a/apps/server-kansas/src/server.ts b/apps/server-kansas/src/server.ts index 195b57b4..20a7d470 100644 --- a/apps/server-kansas/src/server.ts +++ b/apps/server-kansas/src/server.ts @@ -19,6 +19,7 @@ export const createCustomServer = async (db: DatabaseContext): Promise => { 'ethan.gardner@gsa.gov', 'natasha.pierre-louis@gsa.gov', 'emily.lordahl@gsa.gov', + 'khayal.alasgarov@gsa.gov', ].includes(email.toLowerCase()); }, });