diff --git a/README.md b/README.md index aafe3c0f..b9f72f71 100644 --- a/README.md +++ b/README.md @@ -87,3 +87,96 @@ 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 +### root +`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`. + +`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, this is automatically run with the server 'start' script. + +`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. + +`@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, 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`. Could be used in a potential future test expansion. + +`@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. + +`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. + +`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. + +`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`. + +`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