From 7fbfdb008a7a15cd3fa1955b60753cfceebd2b75 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Thu, 13 Nov 2025 09:07:47 -0500 Subject: [PATCH 1/9] Added notes about dependencies to README.md --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index aafe3c0f..dbbf96d7 100644 --- a/README.md +++ b/README.md @@ -87,3 +87,38 @@ After sshing into the server, cd into either prod or test project. Then run resp ## Backend Documentation [Swagger Link](https://petstore.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FRIT-Software-Engineering%2FRIT-SE-Senior-Project%2Frefs%2Fheads%2Fdev%2Fui%2Fpublic%2Fapi-docs%2Fserver_doc.yaml) + + +### Dependencies + +CodeMirror - A rich text interface for editing code while on a website +@uiw/react-codemirror: allows CodeMirror to be added as a react component +@uiw/codemirror-theme-eclipse: adds theming to CodeMirror +@codemirror/lang-html: adds auto-closing tags to HTML editing in CodeMirror + +SemanticUI - UI framework used across the entire website +semantic-ui-react: provides Semantic UI React components +semantic-ui-css: provides Semantic UI CSS stylization +@semantic-ui-react/css-patch: patches semicolon issue with semantic (should have been fixed in an update of semanticUI?) + +@testing-library/jest-dom: currently unused +@testing-library/react is used once in a seemingly unused file +@testing-library/user-event currently unused + +ajv: seems to be unused, may be a subdependency. Compiles JSON schemas to JavaScript code +caniuse-lite: seems to be unused, may be a subdependency + +Moment.js and Day.js are. Using both Day.js and Moment.js is redundant as dayjs is a moment alternative. + +comma-seperated-values used in the Admin User Editor to parse users uploaded as CSV data. + +dangerously-set-html-content is used to allow for modifiable web pages through the edited html. + +DOMpurify is only used in tooltips as a way of limiting the usable tags in the custom HTML. + +dotenv imports environment files in server/main.js + +he is used for the decode function in order to clean it up and replace HTML references (for example: &) with +the correct characters (&). + +html-entities is used for the same thing as he. \ No newline at end of file From a26aba4a5b184458fcdde5ed2e1ab18e4d7f7270 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Thu, 13 Nov 2025 12:29:49 -0500 Subject: [PATCH 2/9] Cleaned up Dependencies section in main README doc Formatted the information to be more presentable and fixed some mistakes in the writing. --- README.md | 52 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index dbbf96d7..9ea2d7b1 100644 --- a/README.md +++ b/README.md @@ -89,36 +89,44 @@ After sshing into the server, cd into either prod or test project. Then run resp [Swagger Link](https://petstore.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FRIT-Software-Engineering%2FRIT-SE-Senior-Project%2Frefs%2Fheads%2Fdev%2Fui%2Fpublic%2Fapi-docs%2Fserver_doc.yaml) -### Dependencies +## Dependencies +### ui +**CodeMirror** - A rich text interface for editing code while on a website. -CodeMirror - A rich text interface for editing code while on a website -@uiw/react-codemirror: allows CodeMirror to be added as a react component -@uiw/codemirror-theme-eclipse: adds theming to CodeMirror -@codemirror/lang-html: adds auto-closing tags to HTML editing in CodeMirror +`@uiw/react-codemirror`: allows CodeMirror to be added as a react component. -SemanticUI - UI framework used across the entire website -semantic-ui-react: provides Semantic UI React components -semantic-ui-css: provides Semantic UI CSS stylization -@semantic-ui-react/css-patch: patches semicolon issue with semantic (should have been fixed in an update of semanticUI?) +`@uiw/codemirror-theme-eclipse`: adds theming to CodeMirror. -@testing-library/jest-dom: currently unused -@testing-library/react is used once in a seemingly unused file -@testing-library/user-event currently unused +`@codemirror/lang-html`: adds auto-closing tags to HTML editing in CodeMirror. -ajv: seems to be unused, may be a subdependency. Compiles JSON schemas to JavaScript code -caniuse-lite: seems to be unused, may be a subdependency +**SemanticUI** - UI framework used across the entire website. -Moment.js and Day.js are. Using both Day.js and Moment.js is redundant as dayjs is a moment alternative. +`semantic-ui-react`: provides Semantic UI React components. -comma-seperated-values used in the Admin User Editor to parse users uploaded as CSV data. +`semantic-ui-css`: provides Semantic UI CSS stylization. -dangerously-set-html-content is used to allow for modifiable web pages through the edited html. +`@semantic-ui-react/css-patch`: patches semicolon issue with semantic (should have been fixed in an update of semanticUI?). -DOMpurify is only used in tooltips as a way of limiting the usable tags in the custom HTML. +`@testing-library/jest-dom`: currently unused. -dotenv imports environment files in server/main.js +`@testing-library/react`: currently only used once in `ui/src/App.test.js`. -he is used for the decode function in order to clean it up and replace HTML references (for example: &) with -the correct characters (&). +`@testing-library/user-event`: currently unused. -html-entities is used for the same thing as he. \ No newline at end of file +`ajv`: seems to be unused, may be a subdependency. Compiles JSON schemas to JavaScript code. + +`caniuse-lite`: seems to be unused, may be a subdependency. Lighter version of caniuse-db. This is a tool for showing + +`Moment.js` and `Day.js` are both used for handling dates and time. Using both Day.js and Moment.js is redundant as Day.js is a moment alternative. + +`comma-separated-values`: used in the Admin User Editor to parse data from users uploaded as CSV data. + +`dangerously-set-html-content`: is used to allow for modifiable web pages through the edited html. + +`DOMpurify`: is currently only used in tooltips as a way of limiting the usable tags in the custom HTML. It is a tool to combat cross-site scripting (XSS) attacks by sanitizing strings with HTML. + +`dotenv`: imports environment files in `server/main.js` + +`he`: is used for the decode function in order to clean up incoming strings and replace any HTML character entity references with the correct characters (for example: &trade would be replaced with ™). + +`html-entities`: is used for the same thing as `he`. \ No newline at end of file From e795f6de962060c01bacb7809a726b96b3d49c9e Mon Sep 17 00:00:00 2001 From: llf5185 Date: Tue, 25 Nov 2025 13:10:43 -0500 Subject: [PATCH 3/9] Documented root and server dependencies --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9ea2d7b1..cd7752ae 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,52 @@ After sshing into the server, cd into either prod or test project. Then run resp ## Dependencies +### root +`ajv`: seems to be unused, may be a subdependency. Compiles JSON schemas to JavaScript code. + +`html-to-text`: converts HTML into formatted text. Unclear if this needs to be in root. + +### server +`@google/generative-ai`: SDK that provides access to gemini, currently deprecated. Strongly consider switching to `@google/genai`. + +`cookie-parser`: reads data stored in cookies. + +`cors`: handles CORS protocol. + +`dotenv`: imports environment files in `server/main.js`. + +`express`: web application framework that is used for routing. + +`express-fileupload`: Express middleware for uploading files. + +`express-session`: Express middleware for session data. + +`express-validator`: Express middleware for the validator package. + +`filesize-parser`: parses the size of files. + +`fs-extra`: contains additional file system methods not covered by the `fs` module and allows for `fs` methods to return promises. + +`html-to-text`: converts HTML into formatted text. + +`memorystore`: stores sessions without leaking memory, unlike the MemoryStore in `express-session`. + +`moment`: should be replaced with dayjs. + +`nanoid`: creates random project and submission ids. + +`node-fetch`: adds window.fetch() to Node, currently unused. + +`nodemon`: automatically restarts a Node application when a file is changed, can be used by running the command `nodemon [Node App]`. + +`passport`: authentication middleware for Express applications. + +`passport-saml`: SAML identity provider for Passport, allows for SSO log-in. + +`pdfkit`: used to generate PDF documents. + +`sqlite3`: creates bindings to SQLite3 for Node, used to interact with the database. + ### ui **CodeMirror** - A rich text interface for editing code while on a website. @@ -125,8 +171,8 @@ After sshing into the server, cd into either prod or test project. Then run resp `DOMpurify`: is currently only used in tooltips as a way of limiting the usable tags in the custom HTML. It is a tool to combat cross-site scripting (XSS) attacks by sanitizing strings with HTML. -`dotenv`: imports environment files in `server/main.js` - `he`: is used for the decode function in order to clean up incoming strings and replace any HTML character entity references with the correct characters (for example: &trade would be replaced with ™). -`html-entities`: is used for the same thing as `he`. \ No newline at end of file +`html-entities`: is used for the same thing as `he`. + +`prop-types`: a tool used for \ No newline at end of file From bf598eaab32eb3549ec70f8c24ee31b0c05df7db Mon Sep 17 00:00:00 2001 From: llf5185 Date: Wed, 26 Nov 2025 14:35:00 -0500 Subject: [PATCH 4/9] Fixed inaccuracy in the dependency notes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd7752ae..802c4c83 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ After sshing into the server, cd into either prod or test project. Then run resp `node-fetch`: adds window.fetch() to Node, currently unused. -`nodemon`: automatically restarts a Node application when a file is changed, can be used by running the command `nodemon [Node App]`. +`nodemon`: automatically restarts a Node application when a file is changed, this is automatically run with the server 'start' script. `passport`: authentication middleware for Express applications. From 3151b54bf47ae75f5c3477b35ae2eb6d83312d17 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Tue, 9 Dec 2025 11:38:17 -0500 Subject: [PATCH 5/9] Added description of prop-types to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 802c4c83..3849dc09 100644 --- a/README.md +++ b/README.md @@ -175,4 +175,4 @@ After sshing into the server, cd into either prod or test project. Then run resp `html-entities`: is used for the same thing as `he`. -`prop-types`: a tool used for \ No newline at end of file +`prop-types`: a tool used for validating the data types of properties. \ No newline at end of file From cb52e444a896091ff6bdefb2516df05b0738a8f0 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Mon, 15 Dec 2025 14:38:23 -0500 Subject: [PATCH 6/9] Referenced devDependencies and revised ajv info Dependency documentation now notes which dependencies are in devDependencies. Additionally, the accuracy of the documentation for the package ajv has been improved. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3849dc09..22d70e2e 100644 --- a/README.md +++ b/README.md @@ -91,10 +91,14 @@ After sshing into the server, cd into either prod or test project. Then run resp ## Dependencies ### root -`ajv`: seems to be unused, may be a subdependency. Compiles JSON schemas to JavaScript code. +`ajv`: seems to be unused as a dependency in the root level. Compiles JSON schemas to JavaScript code. `html-to-text`: converts HTML into formatted text. Unclear if this needs to be in root. +The following root dependencies are **devDependencies**: + +`husky`, `lint-staged`, `prettier`. These are used for the git hook and are covered in the [Technical Information](#technical-information) section of this README document. + ### server `@google/generative-ai`: SDK that provides access to gemini, currently deprecated. Strongly consider switching to `@google/genai`. @@ -159,7 +163,7 @@ After sshing into the server, cd into either prod or test project. Then run resp `@testing-library/user-event`: currently unused. -`ajv`: seems to be unused, may be a subdependency. Compiles JSON schemas to JavaScript code. +`ajv`: used several times as a transitive dependency for react-scripts, meaning there are multiple dependencies of react-scripts that depend on ajv. It appears to be hoisted to the top level in order to deduplicate these indirect references to it. The purpose of ajv is to compile JSON schemas into JavaScript code. `caniuse-lite`: seems to be unused, may be a subdependency. Lighter version of caniuse-db. This is a tool for showing From d24e0914d6021d488c79e2cc576eb26cac344fe1 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Mon, 15 Dec 2025 15:38:32 -0500 Subject: [PATCH 7/9] Revised caniuse-lite documentation Finished incomplete sentence in the caniuse-lite documentation and noted that the package is a transitive dependency of react-scripts similar to ajv. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22d70e2e..052791c9 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ The following root dependencies are **devDependencies**: `ajv`: used several times as a transitive dependency for react-scripts, meaning there are multiple dependencies of react-scripts that depend on ajv. It appears to be hoisted to the top level in order to deduplicate these indirect references to it. The purpose of ajv is to compile JSON schemas into JavaScript code. -`caniuse-lite`: seems to be unused, may be a subdependency. Lighter version of caniuse-db. This is a tool for showing +`caniuse-lite`: A transitive dependency that appears multiple times under react-scripts. Lighter version of caniuse-db. This is a tool that gives access to the data from caniuse.com (Can I use) which documents the extent to which a feature or technology is supported by various browsers. `Moment.js` and `Day.js` are both used for handling dates and time. Using both Day.js and Moment.js is redundant as Day.js is a moment alternative. From 172c7eb4437be8617d02eed0df8f475a00c23f68 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Mon, 15 Dec 2025 16:01:18 -0500 Subject: [PATCH 8/9] Added reasoning for keeping unused testing packages --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 052791c9..bfb93685 100644 --- a/README.md +++ b/README.md @@ -157,11 +157,11 @@ The following root dependencies are **devDependencies**: `@semantic-ui-react/css-patch`: patches semicolon issue with semantic (should have been fixed in an update of semanticUI?). -`@testing-library/jest-dom`: currently unused. +`@testing-library/jest-dom`: currently unused, but should be kept for use in a potential future test expansion. -`@testing-library/react`: currently only used once in `ui/src/App.test.js`. +`@testing-library/react`: currently only used once in `ui/src/App.test.js`. Could be used in a potential future test expansion. -`@testing-library/user-event`: currently unused. +`@testing-library/user-event`: currently unused, but should be kept for use in a potential future test expansion. `ajv`: used several times as a transitive dependency for react-scripts, meaning there are multiple dependencies of react-scripts that depend on ajv. It appears to be hoisted to the top level in order to deduplicate these indirect references to it. The purpose of ajv is to compile JSON schemas into JavaScript code. From f4f1b482b9010bdaf8e2e26b667cff93b43d96a9 Mon Sep 17 00:00:00 2001 From: llf5185 Date: Mon, 15 Dec 2025 16:30:05 -0500 Subject: [PATCH 9/9] Expanded documentation on dependency prop-types --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bfb93685..b9f72f71 100644 --- a/README.md +++ b/README.md @@ -179,4 +179,4 @@ The following root dependencies are **devDependencies**: `html-entities`: is used for the same thing as `he`. -`prop-types`: a tool used for validating the data types of properties. \ No newline at end of file +`prop-types`: a tool used for validating the data types of properties. It's used inside of the component CustomItemDetail which overwrites the default item detail from react-keyed-file-browser. It's also used inside of ParsedInnerHtml which takes a string containing HTML data among other parameters as properties and outputs a JSX \ containing the HTML data injected with the parameters. \ No newline at end of file