From 7b08f99e786a516917c45fe7ef26faf528b594b2 Mon Sep 17 00:00:00 2001 From: Raghart Date: Wed, 18 Mar 2026 21:28:41 -0400 Subject: [PATCH 01/25] r deleting health.yml --- .github/workflows/hello.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/hello.yml diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml deleted file mode 100644 index 02f96d2..0000000 --- a/.github/workflows/hello.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Hello World! - -on: - push: - branches: - - main - - pull_request: - branches: [main] - types: [opened, synchronize] - -jobs: - hello_world_job: - runs-on: ubuntu-latest - steps: - - name: Say Hello - run: | - echo "Hello World!" - echo "Current date and time:" - date From 8e95bdf317669f5086868bf80749bc60a54d0d8b Mon Sep 17 00:00:00 2001 From: Raghart Date: Wed, 18 Mar 2026 21:31:19 -0400 Subject: [PATCH 02/25] r change deploy-pipe to only work on CI --- .../{Deployment-Pipeline.yml => CI-Pipeline.yml} | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) rename .github/workflows/{Deployment-Pipeline.yml => CI-Pipeline.yml} (85%) diff --git a/.github/workflows/Deployment-Pipeline.yml b/.github/workflows/CI-Pipeline.yml similarity index 85% rename from .github/workflows/Deployment-Pipeline.yml rename to .github/workflows/CI-Pipeline.yml index 44bb76b..065ede8 100644 --- a/.github/workflows/Deployment-Pipeline.yml +++ b/.github/workflows/CI-Pipeline.yml @@ -1,10 +1,6 @@ name: FullStack Deployment Pipeline -on: - push: - branches: - - main - +on: pull_request: branches: [main] types: [opened, synchronize] @@ -100,12 +96,4 @@ jobs: with: name: playwright-report path: playwright-report/ - retention-days: 30 - - Web_Deploy: - runs-on: ubuntu-latest - needs: [Frontend-Pipeline,Backend-Pipeline,Playwright-E2E-Tests] - steps: - - uses: actions/checkout@v4 - - name: Trigger Deployment - run: curl https://api.render.com/deploy/srv-${{ secrets.RENDER_SERVICE_ID }}?key=${{ secrets.RENDER_API_KEY }} + retention-days: 30 \ No newline at end of file From e2c7b4d12673cac53919e5cb880dc2daed103c58 Mon Sep 17 00:00:00 2001 From: Raghart Date: Wed, 18 Mar 2026 21:37:48 -0400 Subject: [PATCH 03/25] r added CD-Pipeline to deploy code on push --- .github/workflows/CD-Pipeline.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/CD-Pipeline.yml diff --git a/.github/workflows/CD-Pipeline.yml b/.github/workflows/CD-Pipeline.yml new file mode 100644 index 0000000..0eaa890 --- /dev/null +++ b/.github/workflows/CD-Pipeline.yml @@ -0,0 +1,13 @@ +name: TrackStack Continuous Deployment Pipeline + +on: + push: + branches: [main] + +jobs: + Web_Deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Trigger Deployment + run: curl https://api.render.com/deploy/srv-${{ secrets.RENDER_SERVICE_ID }}?key=${{ secrets.RENDER_API_KEY }} \ No newline at end of file From 4020f2bb41385777029ad43b05c8c29884647f1e Mon Sep 17 00:00:00 2001 From: Raghart Date: Wed, 18 Mar 2026 21:39:44 -0400 Subject: [PATCH 04/25] r changed CI name for clarity --- .github/workflows/CI-Pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI-Pipeline.yml b/.github/workflows/CI-Pipeline.yml index 065ede8..ef665e5 100644 --- a/.github/workflows/CI-Pipeline.yml +++ b/.github/workflows/CI-Pipeline.yml @@ -1,4 +1,4 @@ -name: FullStack Deployment Pipeline +name: TrackStack Continuous Deployment Pipeline on: pull_request: From c17e539cb14502b985403b2bbd808c63351453c7 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 16:26:48 -0400 Subject: [PATCH 05/25] r added security eslint to front to security check --- front/eslint.config.js | 8 +++++-- front/package-lock.json | 49 ++++++++++++++++++++++++++++++++++++----- front/package.json | 1 + 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/front/eslint.config.js b/front/eslint.config.js index 092408a..86a20cb 100644 --- a/front/eslint.config.js +++ b/front/eslint.config.js @@ -3,11 +3,12 @@ import globals from 'globals' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint' +import pluginSecurity from 'eslint-plugin-security'; export default tseslint.config( - { ignores: ['dist'] }, + js.configs.recommended, + ...tseslint.configs.recommended, { - extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ['**/*.{ts,tsx}'], languageOptions: { ecmaVersion: 2020, @@ -16,13 +17,16 @@ export default tseslint.config( plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh, + 'security': pluginSecurity }, rules: { ...reactHooks.configs.recommended.rules, + ...pluginSecurity.configs.recommended.rules, 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, }, + { ignores: ["node_modules", "build", 'dist'] }, ) diff --git a/front/package-lock.json b/front/package-lock.json index 96043c0..6b0f7dd 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -45,6 +45,7 @@ "eslint": "^9.21.0", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.19", + "eslint-plugin-security": "^4.0.0", "globals": "^15.15.0", "typescript": "~5.7.2", "typescript-eslint": "^8.24.1", @@ -4259,6 +4260,22 @@ "eslint": ">=8.40" } }, + "node_modules/eslint-plugin-security": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.0.0.tgz", + "integrity": "sha512-tfuQT8K/Li1ZxhFzyD8wPIKtlzZxqBcPr9q0jFMQ77wWAbKBVEhaMPVQRTMTvCMUDhwBe5vPVqQPwAGk/ASfxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", @@ -4449,9 +4466,9 @@ } }, "node_modules/flatted": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.4.tgz", - "integrity": "sha512-3+mMldrTAPdta5kjX2G2J7iX4zxtnwpdA8Tr2ZSjkyPSanvbZAcy6flmtnXbEybHrDcU9641lxrMfFuUxVz9vA==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, @@ -5742,6 +5759,16 @@ "redux": "^5.0.0" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/rehackt": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.1.0.tgz", @@ -5860,6 +5887,16 @@ ], "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6291,9 +6328,9 @@ } }, "node_modules/undici": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.22.0.tgz", - "integrity": "sha512-RqslV2Us5BrllB+JeiZnK4peryVTndy9Dnqq62S3yYRRTj0tFQCwEniUy2167skdGOy3vqRzEvl1Dm4sV2ReDg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.4.tgz", + "integrity": "sha512-BM/JzwwaRXxrLdElV2Uo6cTLEjhSb3WXboncJamZ15NgUURmvlXvxa6xkwIOILIjPNo9i8ku136ZvWV0Uly8+w==", "license": "MIT", "engines": { "node": ">=20.18.1" diff --git a/front/package.json b/front/package.json index 816e845..e43d70b 100644 --- a/front/package.json +++ b/front/package.json @@ -47,6 +47,7 @@ "eslint": "^9.21.0", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.19", + "eslint-plugin-security": "^4.0.0", "globals": "^15.15.0", "typescript": "~5.7.2", "typescript-eslint": "^8.24.1", From 4cf40ca0adc88f08f330b939c1fccaacd7df7de0 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 18:35:02 -0400 Subject: [PATCH 06/25] r added MapSliderStyle for security check --- .../ModalComponents/Sliders/SliderTags.tsx | 20 ++++++-- front/src/dynamicCSS/TagsSliderStyles.ts | 50 ++++++++++++++++++- 2 files changed, 64 insertions(+), 6 deletions(-) diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx index fd232a2..bada6d8 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx @@ -1,5 +1,5 @@ import { SLIDER_TAGS_GAP_SIZES, SLIDER_TAGS_PX_SIZES } from "@/components/constants/TopBarC"; -import { TagSliderStyles } from "@/dynamicCSS/TagsSliderStyles"; +import { MapSliderStyles, TagSliderStyles } from "@/dynamicCSS/TagsSliderStyles"; import { SliderLabels } from "@/types/RecDataTypes"; import { Flex, For, Tag } from "@chakra-ui/react"; @@ -7,13 +7,23 @@ const SliderTags = ({ labels } : { labels: SliderLabels[] }) => { return( - {(label) => ( + {(label) => { + let labelStyle = MapSliderStyles.get(label); + if (labelStyle === undefined) { + labelStyle = { + bg: "gray.500", + border: "0 0 0 2px var(--chakra-colors-gray-500), 0 0 8px var(--chakra-colors-gray-500)" + } + }; + return ( + bg={labelStyle.bg} py={1} fontWeight="800" + boxShadow={labelStyle.border} letterSpacing="wide" + px={SLIDER_TAGS_PX_SIZES} fontSize="'Barlow', sans-serif"> {label} - )} + ) + }} ); diff --git a/front/src/dynamicCSS/TagsSliderStyles.ts b/front/src/dynamicCSS/TagsSliderStyles.ts index df8aef8..b193fe4 100644 --- a/front/src/dynamicCSS/TagsSliderStyles.ts +++ b/front/src/dynamicCSS/TagsSliderStyles.ts @@ -1,4 +1,52 @@ -import { SliderTagsOptions } from "@/types/modalCssTypes"; +import { SliderTagsOptions, SliderTagsProps } from "@/types/modalCssTypes"; +import { SliderLabels } from "@/types/RecDataTypes"; + +export const MapSliderStyles = new Map ([ + ["Relaxed", { + bg: "green.600", + border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)", + }], + ["Active", { + bg: "yellow.600", + border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" + }], + ["Intense", { + bg: "red.600", + border: "0 0 0 2px var(--chakra-colors-orange-600), 0 0 8px var(--chakra-colors-orange-600)", + }], + ["Calm", { + bg: "blue.500", + border: "0 0 0 2px var(--chakra-colors-blue-600), 0 0 8px var(--chakra-colors-blue-600)" + }], + ["Rhythmic", { + bg: "teal.500", + border: "0 0 0 2px var(--chakra-colors-green-600), 0 0 8px var(--chakra-colors-green-600)" + }], + ["70 BPM", { + bg: "orange.500", + border: "0 0 0 2px var(--chakra-colors-yellow-600), 0 0 8px var(--chakra-colors-yellow-600)" + }], + ["120 BPM", { + bg: "green.500", + border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)" + }], + ["230 BPM", { + bg: "purple.500", + border: "0 0 0 2px var(--chakra-colors-purple-600), 0 0 8px var(--chakra-colors-purple-600)" + }], + ["😌", { + bg: "cyan.600", + border: "0 0 0 2px var(--chakra-colors-blue-600), 0 0 8px var(--chakra-colors-blue-600)" + }], + ["🙂", { + bg: "orange.600", + border: "0 0 0 2px var(--chakra-colors-yellow-600), 0 0 8px var(--chakra-colors-yellow-600)" + }], + ["😝", { + bg: "pink.500", + border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" + }], +]); export const TagSliderStyles: SliderTagsOptions = { Relaxed: { From 4784e0ea874e3083e67ea6874c567c6a2943a72a Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 18:37:21 -0400 Subject: [PATCH 07/25] r deleted old SliderStyle const --- .../ModalComponents/Sliders/SliderTags.tsx | 2 +- front/src/dynamicCSS/TagsSliderStyles.ts | 55 +------------------ front/src/types/modalCssTypes.ts | 15 ----- 3 files changed, 3 insertions(+), 69 deletions(-) diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx index bada6d8..19a1700 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx @@ -1,5 +1,5 @@ import { SLIDER_TAGS_GAP_SIZES, SLIDER_TAGS_PX_SIZES } from "@/components/constants/TopBarC"; -import { MapSliderStyles, TagSliderStyles } from "@/dynamicCSS/TagsSliderStyles"; +import { MapSliderStyles } from "@/dynamicCSS/TagsSliderStyles"; import { SliderLabels } from "@/types/RecDataTypes"; import { Flex, For, Tag } from "@chakra-ui/react"; diff --git a/front/src/dynamicCSS/TagsSliderStyles.ts b/front/src/dynamicCSS/TagsSliderStyles.ts index b193fe4..ff5e6c4 100644 --- a/front/src/dynamicCSS/TagsSliderStyles.ts +++ b/front/src/dynamicCSS/TagsSliderStyles.ts @@ -1,4 +1,4 @@ -import { SliderTagsOptions, SliderTagsProps } from "@/types/modalCssTypes"; +import { SliderTagsProps } from "@/types/modalCssTypes"; import { SliderLabels } from "@/types/RecDataTypes"; export const MapSliderStyles = new Map ([ @@ -46,55 +46,4 @@ export const MapSliderStyles = new Map ([ bg: "pink.500", border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" }], -]); - -export const TagSliderStyles: SliderTagsOptions = { - Relaxed: { - bg: "green.600", - border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)", - }, - Active: { - bg: "yellow.600", - border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" - }, - Intense: { - bg: "red.600", - border: "0 0 0 2px var(--chakra-colors-orange-600), 0 0 8px var(--chakra-colors-orange-600)" - }, - Calm: { - bg: "blue.500", - border: "0 0 0 2px var(--chakra-colors-blue-600), 0 0 8px var(--chakra-colors-blue-600)" - }, - Rhythmic: { - bg: "teal.500", - border: "0 0 0 2px var(--chakra-colors-green-600), 0 0 8px var(--chakra-colors-green-600)" - }, - Energetic: { - bg: "red.600", - border: "0 0 0 2px var(--chakra-colors-orange-600), 0 0 8px var(--chakra-colors-orange-600)" - }, - "70 BPM": { - bg: "orange.500", - border: "0 0 0 2px var(--chakra-colors-yellow-600), 0 0 8px var(--chakra-colors-yellow-600)" - }, - "120 BPM": { - bg: "green.500", - border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)" - }, - "230 BPM": { - bg: "purple.500", - border: "0 0 0 2px var(--chakra-colors-purple-600), 0 0 8px var(--chakra-colors-purple-600)" - }, - "😌": { - bg: "cyan.600", - border: "0 0 0 2px var(--chakra-colors-blue-600), 0 0 8px var(--chakra-colors-blue-600)" - }, - "🙂": { - bg: "orange.600", - border: "0 0 0 2px var(--chakra-colors-yellow-600), 0 0 8px var(--chakra-colors-yellow-600)" - }, - "😝": { - bg: "pink.500", - border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" - } -}; \ No newline at end of file +]); \ No newline at end of file diff --git a/front/src/types/modalCssTypes.ts b/front/src/types/modalCssTypes.ts index 10c8722..7c08668 100644 --- a/front/src/types/modalCssTypes.ts +++ b/front/src/types/modalCssTypes.ts @@ -39,19 +39,4 @@ export interface SliderStylesOptions { Danceability: SliderStylesProps; Tempo: SliderStylesProps; Sentiment: SliderStylesProps; -}; - -export interface SliderTagsOptions { - Relaxed: SliderTagsProps; - Active: SliderTagsProps; - Intense: SliderTagsProps; - Calm: SliderTagsProps; - Rhythmic: SliderTagsProps; - Energetic: SliderTagsProps; - "70 BPM": SliderTagsProps; - "120 BPM": SliderTagsProps; - "230 BPM": SliderTagsProps; - "😌": SliderTagsProps; - "🙂": SliderTagsProps; - "😝": SliderTagsProps; }; \ No newline at end of file From 9f1626b5e239c4b04f5dcebf21035098fbf7a9cc Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 18:49:01 -0400 Subject: [PATCH 08/25] r added MapVolumeStyle to fix struct sec --- front/src/dynamicCSS/VolumeSliderStyle.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/front/src/dynamicCSS/VolumeSliderStyle.tsx b/front/src/dynamicCSS/VolumeSliderStyle.tsx index dfd1ecf..ae88e18 100644 --- a/front/src/dynamicCSS/VolumeSliderStyle.tsx +++ b/front/src/dynamicCSS/VolumeSliderStyle.tsx @@ -1,7 +1,14 @@ +import { IconType } from "react-icons/lib"; import { PiSpeakerHighBold, PiSpeakerSlashBold, PiSpeakerLowBold } from "react-icons/pi"; +const MapVolumeStyle = new Map ([ + ["threshold", 0.5], + ["0", PiSpeakerSlashBold], + ["1", PiSpeakerLowBold], + ["2", PiSpeakerHighBold] +]); + const VolumeStyle = { - threshold: 0.5, Icon: [PiSpeakerSlashBold, PiSpeakerLowBold, PiSpeakerHighBold ] }; From 5781fe06c6ab1c73d05bee41ddc7a4a400b782e6 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 18:55:31 -0400 Subject: [PATCH 09/25] r replacing VolStyle logic to for sec --- front/src/dynamicCSS/VolumeSliderStyle.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/front/src/dynamicCSS/VolumeSliderStyle.tsx b/front/src/dynamicCSS/VolumeSliderStyle.tsx index ae88e18..30e37a8 100644 --- a/front/src/dynamicCSS/VolumeSliderStyle.tsx +++ b/front/src/dynamicCSS/VolumeSliderStyle.tsx @@ -1,11 +1,10 @@ import { IconType } from "react-icons/lib"; import { PiSpeakerHighBold, PiSpeakerSlashBold, PiSpeakerLowBold } from "react-icons/pi"; -const MapVolumeStyle = new Map ([ - ["threshold", 0.5], - ["0", PiSpeakerSlashBold], - ["1", PiSpeakerLowBold], - ["2", PiSpeakerHighBold] +const MapVolumeStyle = new Map ([ + [0, PiSpeakerSlashBold], + [1, PiSpeakerLowBold], + [2, PiSpeakerHighBold] ]); const VolumeStyle = { @@ -13,6 +12,6 @@ const VolumeStyle = { }; export const getVolumeIconStyle = (value: number) => { - const idx = value === 0 ? "0" : value < 0.5 ? "1" : "2"; - return VolumeStyle.Icon[idx] + const idx = value === 0 ? 0 : value < 0.5 ? 1 : 2; + return MapVolumeStyle.get(idx) ?? PiSpeakerHighBold; }; \ No newline at end of file From 7a7e83370bd731aa1af45f75c90a097daafc2055 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 18:57:27 -0400 Subject: [PATCH 10/25] r deleting old variable --- front/src/dynamicCSS/VolumeSliderStyle.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/front/src/dynamicCSS/VolumeSliderStyle.tsx b/front/src/dynamicCSS/VolumeSliderStyle.tsx index 30e37a8..eed72a5 100644 --- a/front/src/dynamicCSS/VolumeSliderStyle.tsx +++ b/front/src/dynamicCSS/VolumeSliderStyle.tsx @@ -7,10 +7,6 @@ const MapVolumeStyle = new Map ([ [2, PiSpeakerHighBold] ]); -const VolumeStyle = { - Icon: [PiSpeakerSlashBold, PiSpeakerLowBold, PiSpeakerHighBold ] -}; - export const getVolumeIconStyle = (value: number) => { const idx = value === 0 ? 0 : value < 0.5 ? 1 : 2; return MapVolumeStyle.get(idx) ?? PiSpeakerHighBold; From 238fa256cc5a4f71c983bc36c321c9f8e8b0d457 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 20:53:24 -0400 Subject: [PATCH 11/25] r added MapSliderStyle and correct names for clarifications --- .../ModalComponents/Sliders/SliderTags.tsx | 4 +- front/src/dynamicCSS/SliderStyles.ts | 41 ++++++++++++++++++- front/src/dynamicCSS/TagsSliderStyles.ts | 2 +- front/src/dynamicCSS/getDynamicSlider.tsx | 2 +- front/src/types/modalCssTypes.ts | 4 +- 5 files changed, 47 insertions(+), 6 deletions(-) diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx index 19a1700..56ba80c 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Sliders/SliderTags.tsx @@ -1,5 +1,5 @@ import { SLIDER_TAGS_GAP_SIZES, SLIDER_TAGS_PX_SIZES } from "@/components/constants/TopBarC"; -import { MapSliderStyles } from "@/dynamicCSS/TagsSliderStyles"; +import { MapSliderTagStyles } from "@/dynamicCSS/TagsSliderStyles"; import { SliderLabels } from "@/types/RecDataTypes"; import { Flex, For, Tag } from "@chakra-ui/react"; @@ -8,7 +8,7 @@ const SliderTags = ({ labels } : { labels: SliderLabels[] }) => { {(label) => { - let labelStyle = MapSliderStyles.get(label); + let labelStyle = MapSliderTagStyles.get(label); if (labelStyle === undefined) { labelStyle = { bg: "gray.500", diff --git a/front/src/dynamicCSS/SliderStyles.ts b/front/src/dynamicCSS/SliderStyles.ts index b6857ab..9eb15b8 100644 --- a/front/src/dynamicCSS/SliderStyles.ts +++ b/front/src/dynamicCSS/SliderStyles.ts @@ -5,7 +5,46 @@ import { FaWind, FaLeaf } from "react-icons/fa"; import { FaHeartCircleBolt, FaCloud } from "react-icons/fa6"; import { AiFillThunderbolt } from "react-icons/ai"; import { GiGuitarHead, GiHeartBeats, GiLotus } from "react-icons/gi"; -import { SliderStylesOptions } from "@/types/modalCssTypes"; +import { SliderStylesOptions, SliderStylesProps, SliderType } from "@/types/modalCssTypes"; + +export const MapSliderStyles = new Map ([ + ["Energy", { + threshold: [0.30, 0.70], + SliderBg: ["green.500", "yellow.600", "red.600"], + Icon: [FaCloud, BsFire, AiFillThunderbolt], + IconColor: ["green.400", "red.500", "yellow.500"], + IconBorder: ["cyan.600", "orange.600", "yellow.600"], + shadow: ["0 0 8px var(--chakra-colors-green-500)", "0 0 8px var(--chakra-colors-yellow-600)", + "0 0 8px var(--chakra-colors-red-600)" ], + }], + ["Danceability", { + threshold: [0.30, 0.70], + SliderBg: ["blue.500", "teal.500", "red.600"], + Icon: [GiLotus, GiHeartBeats, RiFlashlightFill], + IconColor: ["blue.400", "green.300", "yellow.500"], + IconBorder: ["cyan.600", "cyan.500", "yellow.600"], + shadow: ["0 0 8px var(--chakra-colors-blue-500)", "0 0 8px var(--chakra-colors-teal-500)", + "0 0 8px var(--chakra-colors-red-600)" ] + }], + ["Tempo", { + threshold: [75, 160], + SliderBg: ["yellow.600", "green.500", "purple.500"], + Icon: [FaWind, GiGuitarHead, FaHeartCircleBolt], + IconColor: ["orange.300", "green.400", "purple.400"], + IconBorder: ["orange.500", "teal.500", "purple.600"], + shadow: ["0 0 8px var(--chakra-colors-yellow-600)", "0 0 8px var(--chakra-colors-green-500)", + "0 0 8px var(--chakra-colors-purple-500)"] + }], + ["Sentiment", { + threshold: [0.30, 0.70], + SliderBg: ["cyan.600", "orange.600", "pink.600"], + Icon: [FaLeaf, RiEmotionHappyFill, BiSolidHappyBeaming], + IconColor: ["green.500", "yellow.500", "pink.300"], + IconBorder: ["cyan.500", "orange.600", "red.500"], + shadow: ["0 0 8px var(--chakra-colors-cyan-600)", "0 0 8px var(--chakra-colors-orange-600)", + "0 0 8px var(--chakra-colors-pink-600)" ] + }] +]); export const SliderStyles: SliderStylesOptions = { Energy: { diff --git a/front/src/dynamicCSS/TagsSliderStyles.ts b/front/src/dynamicCSS/TagsSliderStyles.ts index ff5e6c4..49afdc8 100644 --- a/front/src/dynamicCSS/TagsSliderStyles.ts +++ b/front/src/dynamicCSS/TagsSliderStyles.ts @@ -1,7 +1,7 @@ import { SliderTagsProps } from "@/types/modalCssTypes"; import { SliderLabels } from "@/types/RecDataTypes"; -export const MapSliderStyles = new Map ([ +export const MapSliderTagStyles = new Map ([ ["Relaxed", { bg: "green.600", border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)", diff --git a/front/src/dynamicCSS/getDynamicSlider.tsx b/front/src/dynamicCSS/getDynamicSlider.tsx index c8420a7..51d9ef2 100644 --- a/front/src/dynamicCSS/getDynamicSlider.tsx +++ b/front/src/dynamicCSS/getDynamicSlider.tsx @@ -1,5 +1,5 @@ import { SliderTitles } from "@/types/RecDataTypes"; -import { SliderStyles } from "./SliderStyles"; +import { MapSliderStyles, SliderStyles } from "./SliderStyles"; import { Icon } from "@chakra-ui/react"; export const getSliderStyle = (title: SliderTitles, value: number) => { diff --git a/front/src/types/modalCssTypes.ts b/front/src/types/modalCssTypes.ts index 7c08668..4101268 100644 --- a/front/src/types/modalCssTypes.ts +++ b/front/src/types/modalCssTypes.ts @@ -25,7 +25,7 @@ export interface SliderTagsProps { border: string; }; -interface SliderStylesProps { +export interface SliderStylesProps { threshold: number[]; SliderBg: string[]; Icon: IconType[]; @@ -34,6 +34,8 @@ interface SliderStylesProps { shadow: string[]; }; +export type SliderType = "Energy" | "Danceability" | "Tempo" | "Sentiment"; + export interface SliderStylesOptions { Energy: SliderStylesProps; Danceability: SliderStylesProps; From fed4d59120236a9affb4e869847e9b7429c95af6 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 21:19:48 -0400 Subject: [PATCH 12/25] r replacing insecure sliderStyle with sec switch case --- front/src/dynamicCSS/SliderStyles.ts | 10 ++++++ front/src/dynamicCSS/getDynamicSlider.tsx | 41 ++++++++++++++++++----- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/front/src/dynamicCSS/SliderStyles.ts b/front/src/dynamicCSS/SliderStyles.ts index 9eb15b8..9a53bfc 100644 --- a/front/src/dynamicCSS/SliderStyles.ts +++ b/front/src/dynamicCSS/SliderStyles.ts @@ -46,6 +46,16 @@ export const MapSliderStyles = new Map ([ }] ]); +export const defaultSliderStyle = { + threshold: [0.30, 0.70], + SliderBg: ["green.500", "yellow.600", "red.600"], + Icon: [FaCloud, BsFire, AiFillThunderbolt], + IconColor: ["green.400", "red.500", "yellow.500"], + IconBorder: ["cyan.600", "orange.600", "yellow.600"], + shadow: ["0 0 8px var(--chakra-colors-green-500)", "0 0 8px var(--chakra-colors-yellow-600)", + "0 0 8px var(--chakra-colors-red-600)" ] +} + export const SliderStyles: SliderStylesOptions = { Energy: { threshold: [0.30, 0.70], diff --git a/front/src/dynamicCSS/getDynamicSlider.tsx b/front/src/dynamicCSS/getDynamicSlider.tsx index 51d9ef2..4f01e67 100644 --- a/front/src/dynamicCSS/getDynamicSlider.tsx +++ b/front/src/dynamicCSS/getDynamicSlider.tsx @@ -1,15 +1,40 @@ import { SliderTitles } from "@/types/RecDataTypes"; -import { MapSliderStyles, SliderStyles } from "./SliderStyles"; +import { defaultSliderStyle, MapSliderStyles, SliderStyles } from "./SliderStyles"; import { Icon } from "@chakra-ui/react"; export const getSliderStyle = (title: SliderTitles, value: number) => { - const style = SliderStyles[title]; + const style = MapSliderStyles.get(title) || defaultSliderStyle; + const [lowBg, midBg, HighBg] = style.SliderBg; + const [lowIcon, midIcon, HighIcon] = style.Icon; + const [lowIconCol, midIconCol, HighIconCol] = style.IconColor; + const [lowBorder, midBorder, HighBorder] = style.IconBorder; + const [lowShadow, midShadow, HighShadow] = style.shadow; const idx = value < style.threshold[0] ? 0 : value < style.threshold[1] ? 1 : 2; - return { - Bg: style.SliderBg[idx], - Icon: , - IconBorder: style.IconBorder[idx], - Shadow: style.shadow[idx] - }; + switch (true) { + case value < style.threshold[0]: { + return { + Bg: lowBg, + Icon: , + IconBorder: lowBorder, + Shadow: lowShadow, + } + } + case value < style.threshold[1]: { + return { + Bg: midBg, + Icon: , + IconBorder: midBorder, + Shadow: midShadow, + } + } + default: { + return { + Bg: HighBg, + Icon: , + IconBorder: HighBorder, + Shadow: HighShadow, + } + } + } }; \ No newline at end of file From 17f11f32c50a0c2b2140058b7bf8af3e90649169 Mon Sep 17 00:00:00 2001 From: Raghart Date: Thu, 19 Mar 2026 21:22:45 -0400 Subject: [PATCH 13/25] r deleting old variables --- front/src/dynamicCSS/SliderStyles.ts | 43 ++--------------------- front/src/dynamicCSS/getDynamicSlider.tsx | 3 +- front/src/types/modalCssTypes.ts | 9 +---- 3 files changed, 4 insertions(+), 51 deletions(-) diff --git a/front/src/dynamicCSS/SliderStyles.ts b/front/src/dynamicCSS/SliderStyles.ts index 9a53bfc..50b601d 100644 --- a/front/src/dynamicCSS/SliderStyles.ts +++ b/front/src/dynamicCSS/SliderStyles.ts @@ -5,7 +5,7 @@ import { FaWind, FaLeaf } from "react-icons/fa"; import { FaHeartCircleBolt, FaCloud } from "react-icons/fa6"; import { AiFillThunderbolt } from "react-icons/ai"; import { GiGuitarHead, GiHeartBeats, GiLotus } from "react-icons/gi"; -import { SliderStylesOptions, SliderStylesProps, SliderType } from "@/types/modalCssTypes"; +import { SliderStylesProps, SliderType } from "@/types/modalCssTypes"; export const MapSliderStyles = new Map ([ ["Energy", { @@ -54,43 +54,4 @@ export const defaultSliderStyle = { IconBorder: ["cyan.600", "orange.600", "yellow.600"], shadow: ["0 0 8px var(--chakra-colors-green-500)", "0 0 8px var(--chakra-colors-yellow-600)", "0 0 8px var(--chakra-colors-red-600)" ] -} - -export const SliderStyles: SliderStylesOptions = { - Energy: { - threshold: [0.30, 0.70], - SliderBg: ["green.500", "yellow.600", "red.600"], - Icon: [FaCloud, BsFire, AiFillThunderbolt], - IconColor: ["green.400", "red.500", "yellow.500"], - IconBorder: ["cyan.600", "orange.600", "yellow.600"], - shadow: ["0 0 8px var(--chakra-colors-green-500)", "0 0 8px var(--chakra-colors-yellow-600)", - "0 0 8px var(--chakra-colors-red-600)" ] - }, - Danceability: { - threshold: [0.30, 0.70], - SliderBg: ["blue.500", "teal.500", "red.600"], - Icon: [GiLotus, GiHeartBeats, RiFlashlightFill], - IconColor: ["blue.400", "green.300", "yellow.500"], - IconBorder: ["cyan.600", "cyan.500", "yellow.600"], - shadow: ["0 0 8px var(--chakra-colors-blue-500)", "0 0 8px var(--chakra-colors-teal-500)", - "0 0 8px var(--chakra-colors-red-600)" ] - }, - Tempo: { - threshold: [75, 160], - SliderBg: ["yellow.600", "green.500", "purple.500"], - Icon: [FaWind, GiGuitarHead, FaHeartCircleBolt], - IconColor: ["orange.300", "green.400", "purple.400"], - IconBorder: ["orange.500", "teal.500", "purple.600"], - shadow: ["0 0 8px var(--chakra-colors-yellow-600)", "0 0 8px var(--chakra-colors-green-500)", - "0 0 8px var(--chakra-colors-purple-500)"] - }, - Sentiment: { - threshold: [0.30, 0.70], - SliderBg: ["cyan.600", "orange.600", "pink.600"], - Icon: [FaLeaf, RiEmotionHappyFill, BiSolidHappyBeaming], - IconColor: ["green.500", "yellow.500", "pink.300"], - IconBorder: ["cyan.500", "orange.600", "red.500"], - shadow: ["0 0 8px var(--chakra-colors-cyan-600)", "0 0 8px var(--chakra-colors-orange-600)", - "0 0 8px var(--chakra-colors-pink-600)" ] - } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/front/src/dynamicCSS/getDynamicSlider.tsx b/front/src/dynamicCSS/getDynamicSlider.tsx index 4f01e67..b054982 100644 --- a/front/src/dynamicCSS/getDynamicSlider.tsx +++ b/front/src/dynamicCSS/getDynamicSlider.tsx @@ -1,5 +1,5 @@ import { SliderTitles } from "@/types/RecDataTypes"; -import { defaultSliderStyle, MapSliderStyles, SliderStyles } from "./SliderStyles"; +import { defaultSliderStyle, MapSliderStyles } from "./SliderStyles"; import { Icon } from "@chakra-ui/react"; export const getSliderStyle = (title: SliderTitles, value: number) => { @@ -9,7 +9,6 @@ export const getSliderStyle = (title: SliderTitles, value: number) => { const [lowIconCol, midIconCol, HighIconCol] = style.IconColor; const [lowBorder, midBorder, HighBorder] = style.IconBorder; const [lowShadow, midShadow, HighShadow] = style.shadow; - const idx = value < style.threshold[0] ? 0 : value < style.threshold[1] ? 1 : 2; switch (true) { case value < style.threshold[0]: { diff --git a/front/src/types/modalCssTypes.ts b/front/src/types/modalCssTypes.ts index 4101268..868c8cd 100644 --- a/front/src/types/modalCssTypes.ts +++ b/front/src/types/modalCssTypes.ts @@ -34,11 +34,4 @@ export interface SliderStylesProps { shadow: string[]; }; -export type SliderType = "Energy" | "Danceability" | "Tempo" | "Sentiment"; - -export interface SliderStylesOptions { - Energy: SliderStylesProps; - Danceability: SliderStylesProps; - Tempo: SliderStylesProps; - Sentiment: SliderStylesProps; -}; \ No newline at end of file +export type SliderType = "Energy" | "Danceability" | "Tempo" | "Sentiment"; \ No newline at end of file From 78b9a18065a62c5c5a8e834f9bf49c27ec9c773d Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 11:28:52 -0400 Subject: [PATCH 14/25] r added MapSwitchStyles --- front/src/dynamicCSS/SwitchStyles.ts | 65 +++++++++++++++++++++++++++- front/src/types/modalCssTypes.ts | 2 + 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/front/src/dynamicCSS/SwitchStyles.ts b/front/src/dynamicCSS/SwitchStyles.ts index 551ddd5..cb25888 100644 --- a/front/src/dynamicCSS/SwitchStyles.ts +++ b/front/src/dynamicCSS/SwitchStyles.ts @@ -1,6 +1,69 @@ -import { SwitchTagsStyles } from "@/types/modalCssTypes"; +import { SwitchStyle, SwitchTagsStyles, SwitchType } from "@/types/modalCssTypes"; import { FaMicrophoneAlt, FaGuitar, FaSmile, FaSadTear, FaMicrophone, FaHeadphones } from "react-icons/fa"; +const MapSwitchStyles = new Map([ + ["Vocals", { + tagBg: "pink.400", + ThumbBg: "pink.200", + ThumbBackgroundBg: "pink.400", + ThumbIcon: FaMicrophoneAlt, + IconColor: "pink.500", + ThumbBackgroundIcon: FaGuitar, + BackgroundIconColor: "cyan.500", + border: "0 0 0 2px var(--chakra-colors-pink-500), 0 0 8px var(--chakra-colors-pink-500)", + }], + ["Instrumental", { + tagBg: "cyan.500", + ThumbBg: "cyan.200", + ThumbBackgroundBg: "cyan.400", + ThumbIcon: FaGuitar, + IconColor: "cyan.500", + ThumbBackgroundIcon: FaMicrophone, + BackgroundIconColor: "pink.400", + border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)" + }], + ["Happy", { + tagBg: "purple.400", + ThumbBg: "purple.200", + ThumbBackgroundBg: "purple.400", + ThumbIcon: FaSmile, + IconColor: "pink.400", + ThumbBackgroundIcon: FaSadTear, + BackgroundIconColor: "blue.500", + border: "0 0 0 2px var(--chakra-colors-purple-500), 0 0 8px var(--chakra-colors-purple-500)" + }], + ["Sad", { + tagBg: "blue.500", + ThumbBg: "blue.500", + ThumbBackgroundBg: "blue.400", + ThumbIcon: FaSadTear, + IconColor: "yellow.500", + ThumbBackgroundIcon: FaSmile, + BackgroundIconColor: "yellow.500", + border: "0 0 0 2px var(--chakra-colors-blue-600), 0 0 8px var(--chakra-colors-blue-600)" + }], + ["Acoustic", { + tagBg: "green.500", + ThumbBg: "green.200", + ThumbBackgroundBg: "green.500", + ThumbIcon: FaGuitar, + IconColor: "green.500", + ThumbBackgroundIcon: FaHeadphones, + BackgroundIconColor: "orange.300", + border: "0 0 0 2px var(--chakra-colors-green-600), 0 0 8px var(--chakra-colors-green-600)" + }], + ["Electronic", { + tagBg: "orange.400", + ThumbBg: "orange.200", + ThumbBackgroundBg: "orange.400", + ThumbIcon: FaHeadphones, + IconColor: "orange.400", + ThumbBackgroundIcon: FaGuitar, + BackgroundIconColor: "green.600", + border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" + }] +]); + export const SwitchStyles: SwitchTagsStyles = { Vocals: { tagBg: "pink.400", diff --git a/front/src/types/modalCssTypes.ts b/front/src/types/modalCssTypes.ts index 868c8cd..75c7d2a 100644 --- a/front/src/types/modalCssTypes.ts +++ b/front/src/types/modalCssTypes.ts @@ -11,6 +11,8 @@ export interface SwitchStyle { border: string; }; +export type SwitchType = "Vocals" | "Instrumental" | "Happy" | "Sad" | "Acoustic" | "Electronic"; + export interface SwitchTagsStyles { Vocals: SwitchStyle; Instrumental: SwitchStyle; From a692abe85ca086de90704e55d7db3cc4b62ea597 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 15:34:27 -0400 Subject: [PATCH 15/25] r replacing Rswitch logic for more security --- .../ModalComponents/Switch/RightSwitchTag.tsx | 7 ++++--- front/src/dynamicCSS/SwitchStyles.ts | 13 ++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx index 875573d..b3d1425 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx @@ -1,16 +1,17 @@ import { Tag } from "@chakra-ui/react"; import { Tooltip } from "@/components/ui/tooltip"; import { SwitchLabelType } from "@/types/RecDataTypes"; -import { SwitchStyles } from "@/dynamicCSS/SwitchStyles"; +import { defaultSwitchStyle, MapSwitchStyles, SwitchStyles } from "@/dynamicCSS/SwitchStyles"; import { RIGHT_SWITCH_PX, tagRBG } from "@/components/constants/TopBarC"; const RightSwitchTag = ({ label, description } : { label: SwitchLabelType, description: string }) => { + const switchStyle = MapSwitchStyles.get(label) || defaultSwitchStyle; return( + fontWeight="600" px={RIGHT_SWITCH_PX} py={2} color="white" bg={switchStyle.tagBg} + borderRadius="full" boxShadow={switchStyle.border}> {label} diff --git a/front/src/dynamicCSS/SwitchStyles.ts b/front/src/dynamicCSS/SwitchStyles.ts index cb25888..cae3e76 100644 --- a/front/src/dynamicCSS/SwitchStyles.ts +++ b/front/src/dynamicCSS/SwitchStyles.ts @@ -1,7 +1,7 @@ import { SwitchStyle, SwitchTagsStyles, SwitchType } from "@/types/modalCssTypes"; import { FaMicrophoneAlt, FaGuitar, FaSmile, FaSadTear, FaMicrophone, FaHeadphones } from "react-icons/fa"; -const MapSwitchStyles = new Map([ +export const MapSwitchStyles = new Map([ ["Vocals", { tagBg: "pink.400", ThumbBg: "pink.200", @@ -64,6 +64,17 @@ const MapSwitchStyles = new Map([ }] ]); +export const defaultSwitchStyle = { + tagBg: "gray.500", + ThumbBg: "gray.200", + ThumbBackgroundBg: "gray.400", + ThumbIcon: FaMicrophoneAlt, + IconColor: "gray.500", + ThumbBackgroundIcon: FaGuitar, + BackgroundIconColor: "cyan.500", + border: "0 0 0 2px var(--chakra-colors-gray-500), 0 0 8px var(--chakra-colors-gray-500)" +} + export const SwitchStyles: SwitchTagsStyles = { Vocals: { tagBg: "pink.400", From 6d0d3c0fd43bb7792e211a12eb54f694a563fa3f Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 15:37:52 -0400 Subject: [PATCH 16/25] r deleting old switch logic --- .../ModalComponents/Switch/RightSwitchTag.tsx | 2 +- front/src/dynamicCSS/SwitchStyles.ts | 67 +------------------ front/src/types/modalCssTypes.ts | 9 --- 3 files changed, 3 insertions(+), 75 deletions(-) diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx index b3d1425..d6fa321 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/RightSwitchTag.tsx @@ -1,7 +1,7 @@ import { Tag } from "@chakra-ui/react"; import { Tooltip } from "@/components/ui/tooltip"; import { SwitchLabelType } from "@/types/RecDataTypes"; -import { defaultSwitchStyle, MapSwitchStyles, SwitchStyles } from "@/dynamicCSS/SwitchStyles"; +import { defaultSwitchStyle, MapSwitchStyles } from "@/dynamicCSS/SwitchStyles"; import { RIGHT_SWITCH_PX, tagRBG } from "@/components/constants/TopBarC"; const RightSwitchTag = ({ label, description } : { label: SwitchLabelType, description: string }) => { diff --git a/front/src/dynamicCSS/SwitchStyles.ts b/front/src/dynamicCSS/SwitchStyles.ts index cae3e76..d8b6b48 100644 --- a/front/src/dynamicCSS/SwitchStyles.ts +++ b/front/src/dynamicCSS/SwitchStyles.ts @@ -1,4 +1,4 @@ -import { SwitchStyle, SwitchTagsStyles, SwitchType } from "@/types/modalCssTypes"; +import { SwitchStyle, SwitchType } from "@/types/modalCssTypes"; import { FaMicrophoneAlt, FaGuitar, FaSmile, FaSadTear, FaMicrophone, FaHeadphones } from "react-icons/fa"; export const MapSwitchStyles = new Map([ @@ -73,67 +73,4 @@ export const defaultSwitchStyle = { ThumbBackgroundIcon: FaGuitar, BackgroundIconColor: "cyan.500", border: "0 0 0 2px var(--chakra-colors-gray-500), 0 0 8px var(--chakra-colors-gray-500)" -} - -export const SwitchStyles: SwitchTagsStyles = { - Vocals: { - tagBg: "pink.400", - ThumbBg: "pink.200", - ThumbBackgroundBg: "pink.400", - ThumbIcon: FaMicrophoneAlt, - IconColor: "pink.500", - ThumbBackgroundIcon: FaGuitar, - BackgroundIconColor: "cyan.500", - border: "0 0 0 2px var(--chakra-colors-pink-500), 0 0 8px var(--chakra-colors-pink-500)", - }, - Instrumental: { - tagBg: "cyan.500", - ThumbBg: "cyan.200", - ThumbBackgroundBg: "cyan.400", - ThumbIcon: FaGuitar, - IconColor: "cyan.500", - ThumbBackgroundIcon: FaMicrophone, - BackgroundIconColor: "pink.400", - border: "0 0 0 2px var(--chakra-colors-cyan-600), 0 0 8px var(--chakra-colors-cyan-600)" - }, - Happy: { - tagBg: "purple.400", - ThumbBg: "purple.200", - ThumbBackgroundBg: "purple.400", - ThumbIcon: FaSmile, - IconColor: "pink.400", - ThumbBackgroundIcon: FaSadTear, - BackgroundIconColor: "blue.500", - border: "0 0 0 2px var(--chakra-colors-purple-500), 0 0 8px var(--chakra-colors-purple-500)" - }, - Sad: { - tagBg: "blue.500", - ThumbBg: "blue.500", - ThumbBackgroundBg: "blue.400", - ThumbIcon: FaSadTear, - IconColor: "yellow.500", - ThumbBackgroundIcon: FaSmile, - BackgroundIconColor: "yellow.500", - border: "0 0 0 2px var(--chakra-colors-blue-600), 0 0 8px var(--chakra-colors-blue-600)" - }, - Acoustic: { - tagBg: "green.500", - ThumbBg: "green.200", - ThumbBackgroundBg: "green.500", - ThumbIcon: FaGuitar, - IconColor: "green.500", - ThumbBackgroundIcon: FaHeadphones, - BackgroundIconColor: "orange.300", - border: "0 0 0 2px var(--chakra-colors-green-600), 0 0 8px var(--chakra-colors-green-600)" - }, - Electronic: { - tagBg: "orange.400", - ThumbBg: "orange.200", - ThumbBackgroundBg: "orange.400", - ThumbIcon: FaHeadphones, - IconColor: "orange.400", - ThumbBackgroundIcon: FaGuitar, - BackgroundIconColor: "green.600", - border: "0 0 0 2px var(--chakra-colors-orange-500), 0 0 8px var(--chakra-colors-orange-500)" - }, -}; \ No newline at end of file +} \ No newline at end of file diff --git a/front/src/types/modalCssTypes.ts b/front/src/types/modalCssTypes.ts index 75c7d2a..9dd96f5 100644 --- a/front/src/types/modalCssTypes.ts +++ b/front/src/types/modalCssTypes.ts @@ -13,15 +13,6 @@ export interface SwitchStyle { export type SwitchType = "Vocals" | "Instrumental" | "Happy" | "Sad" | "Acoustic" | "Electronic"; -export interface SwitchTagsStyles { - Vocals: SwitchStyle; - Instrumental: SwitchStyle; - Happy: SwitchStyle; - Sad: SwitchStyle; - Acoustic: SwitchStyle; - Electronic: SwitchStyle; -}; - export interface SliderTagsProps { bg: string; border: string; From 85f9b5b5bde4757a04caafb2ba5f68b5b04aeba8 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 15:40:46 -0400 Subject: [PATCH 17/25] r fixing leftSwitch logic to make it more secure --- .../ModalComponents/Switch/LeftSwitchTag.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/LeftSwitchTag.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/LeftSwitchTag.tsx index 69cc61e..3ee2a5f 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/LeftSwitchTag.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/LeftSwitchTag.tsx @@ -1,14 +1,15 @@ import { Tag } from "@chakra-ui/react"; import { Tooltip } from "@/components/ui/tooltip"; import { SwitchLabelType } from "@/types/RecDataTypes"; -import { SwitchStyles } from "@/dynamicCSS/SwitchStyles"; +import { defaultSwitchStyle, MapSwitchStyles } from "@/dynamicCSS/SwitchStyles"; import { LEFT_SWITCH_PX, tagLBG } from "@/components/constants/TopBarC"; const LeftSwitchTag = ({ label, description } : { label: SwitchLabelType, description: string }) => { + const leftSwitchStyle = MapSwitchStyles.get(label) || defaultSwitchStyle; return( - {label} From bd489304717f40c5f909cc9bbf36eebe5695203c Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 15:58:38 -0400 Subject: [PATCH 18/25] r fixing front bug --- front/src/apolloClient.ts | 7 ++++--- .../ModalComponents/Switch/SwitchButton.tsx | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/front/src/apolloClient.ts b/front/src/apolloClient.ts index 2c5d49a..7e8498f 100644 --- a/front/src/apolloClient.ts +++ b/front/src/apolloClient.ts @@ -1,4 +1,5 @@ import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; +import { SongResponse } from "./types/songTypes"; export const client = new ApolloClient({ cache: new InMemoryCache({ @@ -8,10 +9,10 @@ export const client = new ApolloClient({ getAllGenreSongs: { keyArgs: ["genre"], merge(existing, incoming, { args }) { - const page = args?.page ?? 1; - const limit = args?.limit ?? 2; + const page: number = args?.page ?? 1; + const limit: number = args?.limit ?? 2; const offset = (page - 1) * limit; - const merged = existing ? existing.slice(0) : []; + const merged: SongResponse[] = existing ? existing.slice(0) : []; for (let i = 0; i < incoming.length; i++) { merged[offset + i] = incoming[i]; diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx index 95bcb86..3412754 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx @@ -1,16 +1,20 @@ import { Box, Heading, Flex, Switch } from "@chakra-ui/react"; import { useAppDispatch } from "@/components/Utils/redux-hooks"; -import { SwitchStyles } from "@/dynamicCSS/SwitchStyles"; import { SwitchOptionsType, SwitchLabelType } from "@/types/RecDataTypes"; import LeftSwitchTag from "./LeftSwitchTag"; import RightSwitchTag from "./RightSwitchTag"; import ControlSwitchStyle from "./ControlSwitchStyle"; import useSwitchValue from "@/components/Utils/hooks/useSwitchValue"; import { BLUE_SHADOW_MODAL, LARA_OPT_SIZES, SWITCH_BTN_TRANSITION } from "@/components/constants/TopBarC"; +import { defaultSwitchStyle, MapSwitchStyles } from "@/dynamicCSS/SwitchStyles"; const SwitchButton = ({ params }:{ params: SwitchOptionsType }) => { const { switchTagValue, toggleSwitchValue } = useSwitchValue(params.title, params.labels[0].label, params.labels[1].label, params.setValue); + + const leftSwitchStyle = MapSwitchStyles.get(params.labels[0].label) || defaultSwitchStyle; + const rightSwitchStyle = MapSwitchStyles.get(params.labels[1].label) || defaultSwitchStyle; + const dispatch = useAppDispatch(); return( ({ params }:{ params: dispatch(toggleSwitchValue())}> - + From 6e4e77824a4afb8e100f41e0f251cbfe2e2d0613 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 16:10:58 -0400 Subject: [PATCH 19/25] r replaced for logic with splice for security purposes --- front/src/apolloClient.ts | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/front/src/apolloClient.ts b/front/src/apolloClient.ts index 7e8498f..d064a0c 100644 --- a/front/src/apolloClient.ts +++ b/front/src/apolloClient.ts @@ -1,5 +1,7 @@ import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; import { SongResponse } from "./types/songTypes"; +import { ArtistResponse } from "./types/artistTypes"; +import { AlbumResponse } from "./types/albumTypes"; export const client = new ApolloClient({ cache: new InMemoryCache({ @@ -13,36 +15,29 @@ export const client = new ApolloClient({ const limit: number = args?.limit ?? 2; const offset = (page - 1) * limit; const merged: SongResponse[] = existing ? existing.slice(0) : []; - - for (let i = 0; i < incoming.length; i++) { - merged[offset + i] = incoming[i]; - }; + merged.splice(offset, incoming.length, ...incoming); return merged; } }, getAllArtists: { keyArgs: false, merge(existing, incoming, { args }) { - const page = args?.page ?? 1; - const limit = args?.limit ?? 20; + const page: number = args?.page ?? 1; + const limit: number = args?.limit ?? 20; const offset = (page - 1) * limit; - const merged = existing ? existing.slice(0) : []; - for (let i = 0; i < incoming.length; i++) { - merged[offset + i] = incoming[i] - } + const merged: ArtistResponse[] = existing ? existing.slice(0) : []; + merged.splice(offset, incoming.length, ...incoming); return merged; } }, getAlbums: { keyArgs: false, merge(existing, incoming, {args}) { - const page = args?.page ?? 1; - const limit = args?.limit ?? 20; + const page: number = args?.page ?? 1; + const limit: number = args?.limit ?? 20; const offset = (page - 1) * limit; - const merged = existing ? existing.slice(0) : []; - for (let i=0; i < incoming.length; i++) { - merged[offset + i] = incoming[i] - } + const merged: AlbumResponse[] = existing ? existing.slice(0) : []; + merged.splice(offset, incoming.length, ...incoming); return merged; } } From f1198e7f49cb13b6d849da2b1833be198cbdfc38 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 16:18:59 -0400 Subject: [PATCH 20/25] r added security check for CI front pipeline --- .github/workflows/CI-Pipeline.yml | 3 +++ .../LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI-Pipeline.yml b/.github/workflows/CI-Pipeline.yml index ef665e5..03b2c4c 100644 --- a/.github/workflows/CI-Pipeline.yml +++ b/.github/workflows/CI-Pipeline.yml @@ -24,6 +24,9 @@ jobs: - name: Check style run: npm run lint + - name: Check Security + run: npx eslint . + Backend-Pipeline: runs-on: ubuntu-latest defaults: diff --git a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx index 3412754..b59dfdd 100644 --- a/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx +++ b/front/src/components/MainLayout/TopBar/LaraRecommendModal/ModalComponents/Switch/SwitchButton.tsx @@ -14,8 +14,8 @@ const SwitchButton = ({ params }:{ params: const leftSwitchStyle = MapSwitchStyles.get(params.labels[0].label) || defaultSwitchStyle; const rightSwitchStyle = MapSwitchStyles.get(params.labels[1].label) || defaultSwitchStyle; - const dispatch = useAppDispatch(); + return( Date: Fri, 20 Mar 2026 16:55:27 -0400 Subject: [PATCH 21/25] r adding security check to backend --- back/eslint.config.mjs | 13 ++++--- back/package-lock.json | 83 ++++++++++++++++++++++++++++++------------ back/package.json | 1 + 3 files changed, 68 insertions(+), 29 deletions(-) diff --git a/back/eslint.config.mjs b/back/eslint.config.mjs index a2838ab..30ad90e 100644 --- a/back/eslint.config.mjs +++ b/back/eslint.config.mjs @@ -1,16 +1,12 @@ // @ts-check import eslint from '@eslint/js'; -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import globals from 'globals'; import tseslint from 'typescript-eslint'; +import pluginSecurity from 'eslint-plugin-security'; export default tseslint.config( - { - ignores: ['eslint.config.mjs'], - }, eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, - eslintPluginPrettierRecommended, { languageOptions: { globals: { @@ -23,12 +19,17 @@ export default tseslint.config( tsconfigRootDir: import.meta.dirname, }, }, + plugins: { + security: pluginSecurity, + } }, { rules: { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-floating-promises': 'warn', - '@typescript-eslint/no-unsafe-argument': 'warn' + '@typescript-eslint/no-unsafe-argument': 'warn', + ...pluginSecurity.configs.recommended.rules, }, }, + { ignores: ['eslint.config.mjs', "node_modules", "dist", "bonsai", "coverage", "public"], }, ); \ No newline at end of file diff --git a/back/package-lock.json b/back/package-lock.json index 06de57e..71c211b 100644 --- a/back/package-lock.json +++ b/back/package-lock.json @@ -51,6 +51,7 @@ "eslint": "^9.39.3", "eslint-config-prettier": "^10.0.1", "eslint-plugin-prettier": "^5.2.2", + "eslint-plugin-security": "^4.0.0", "globals": "^16.0.0", "jest": "^29.7.0", "prettier": "^3.4.2", @@ -3042,12 +3043,12 @@ } }, "node_modules/@nestjs/common": { - "version": "11.1.14", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.14.tgz", - "integrity": "sha512-IN/tlqd7Nl9gl6f0jsWEuOrQDaCI9vHzxv0fisHysfBQzfQIkqlv5A7w4Qge02BUQyczXT9HHPgHtWHCxhjRng==", + "version": "11.1.17", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.17.tgz", + "integrity": "sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==", "license": "MIT", "dependencies": { - "file-type": "21.3.0", + "file-type": "21.3.2", "iterare": "1.2.1", "load-esm": "1.0.3", "tslib": "2.8.1", @@ -3217,14 +3218,14 @@ } }, "node_modules/@nestjs/platform-express": { - "version": "11.1.15", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.15.tgz", - "integrity": "sha512-sR42dQ5fPy4NGbnhT4mRIJLL0h2eNY4KpLkcfd27vg5XdTjQQ07wkQORrw6rAkWkBvMRr0dmhAcUBnXpe7ro5Q==", + "version": "11.1.17", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.17.tgz", + "integrity": "sha512-mAf4eOsSBsTOn/VbrUO1gsjW6dVh91qqXPMXun4dN8SnNjf7PTQagM9o8d6ab8ZBpNe6UdZftdrZoDetU+n4Qg==", "license": "MIT", "dependencies": { "cors": "2.8.6", "express": "5.2.1", - "multer": "2.1.0", + "multer": "2.1.1", "path-to-regexp": "8.3.0", "tslib": "2.8.1" }, @@ -7234,6 +7235,22 @@ } } }, + "node_modules/eslint-plugin-security": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.0.0.tgz", + "integrity": "sha512-tfuQT8K/Li1ZxhFzyD8wPIKtlzZxqBcPr9q0jFMQ77wWAbKBVEhaMPVQRTMTvCMUDhwBe5vPVqQPwAGk/ASfxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", @@ -7718,9 +7735,9 @@ } }, "node_modules/file-type": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.0.tgz", - "integrity": "sha512-8kPJMIGz1Yt/aPEwOsrR97ZyZaD1Iqm8PClb1nYFclUCkBi0Ma5IsYNQzvSFS9ib51lWyIw5mIT9rWzI/xjpzA==", + "version": "21.3.2", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.2.tgz", + "integrity": "sha512-DLkUvGwep3poOV2wpzbHCOnSKGk1LzyXTv+aHFgN2VFl96wnp8YA9YjO2qPzg5PuL8q/SW9Pdi6WTkYOIh995w==", "license": "MIT", "dependencies": { "@tokenizer/inflate": "^0.4.1", @@ -7845,9 +7862,9 @@ } }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, @@ -10848,9 +10865,9 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.1.0.tgz", - "integrity": "sha512-TBm6j41rxNohqawsxlsWsNNh/VdV4QFXcBvRcPhXaA05EZ79z0qJ2bQFpync6JBoHTeNY5Q1JpG7AlTjdlfAEA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.1.1.tgz", + "integrity": "sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==", "license": "MIT", "dependencies": { "append-field": "^1.0.0", @@ -11858,6 +11875,16 @@ "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", "license": "Apache-2.0" }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -12077,6 +12104,16 @@ ], "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -12200,9 +12237,9 @@ } }, "node_modules/sequelize": { - "version": "6.37.7", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.37.7.tgz", - "integrity": "sha512-mCnh83zuz7kQxxJirtFD7q6Huy6liPanI67BSlbzSYgVNl5eXVdE2CN1FuAeZwG1SNpGsNRCV+bJAVVnykZAFA==", + "version": "6.37.8", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.37.8.tgz", + "integrity": "sha512-HJ0IQFqcTsTiqbEgiuioYFMSD00TP6Cz7zoTti+zVVBwVe9fEhev9cH6WnM3XU31+ABS356durAb99ZuOthnKw==", "funding": [ { "type": "opencollective", @@ -14363,9 +14400,9 @@ } }, "node_modules/yauzl": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.0.tgz", - "integrity": "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.1.tgz", + "integrity": "sha512-k1isifdbpNSFEHFJ1ZY4YDewv0IH9FR61lDetaRMD3j2ae3bIXGV+7c+LHCqtQGofSd8PIyV4X6+dHMAnSr60A==", "dev": true, "license": "MIT", "dependencies": { diff --git a/back/package.json b/back/package.json index b3eb14d..69a9912 100644 --- a/back/package.json +++ b/back/package.json @@ -62,6 +62,7 @@ "eslint": "^9.39.3", "eslint-config-prettier": "^10.0.1", "eslint-plugin-prettier": "^5.2.2", + "eslint-plugin-security": "^4.0.0", "globals": "^16.0.0", "jest": "^29.7.0", "prettier": "^3.4.2", From 0fe6c79f196f8023ca3846fa6b7ba5371a093627 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 17:05:44 -0400 Subject: [PATCH 22/25] r fixed back error for more security --- back/src/types/verify.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/back/src/types/verify.ts b/back/src/types/verify.ts index b679407..6ee50c4 100644 --- a/back/src/types/verify.ts +++ b/back/src/types/verify.ts @@ -18,8 +18,8 @@ export const isString = (text: unknown): text is string => { }; export const isNumber = (value: unknown): value is number => { - if (typeof value === 'string') - return value.trim() !== '' && /^-?\d+(\.\d+)?$/.test(value.trim()); + if (typeof value === 'string') + return value.trim() !== '' && !isNaN(Number(value.trim())); return ( value !== null && value !== undefined && From fd50526f59f0f64966193b8d181dee24cc8da74b Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 18:25:15 -0400 Subject: [PATCH 23/25] r added security checks ib backend pipeline --- .github/workflows/CI-Pipeline.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI-Pipeline.yml b/.github/workflows/CI-Pipeline.yml index 03b2c4c..980e78a 100644 --- a/.github/workflows/CI-Pipeline.yml +++ b/.github/workflows/CI-Pipeline.yml @@ -45,6 +45,9 @@ jobs: - name: Check style run: npm run lint + - name: Check security + run: npx eslint . + - name: Run tests run: npm run test From 42611815a2bc0d5c563b92b1cc56289948d77777 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 18:29:31 -0400 Subject: [PATCH 24/25] s change CI Pipeline name for clarification --- .github/workflows/CI-Pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI-Pipeline.yml b/.github/workflows/CI-Pipeline.yml index 980e78a..0194e62 100644 --- a/.github/workflows/CI-Pipeline.yml +++ b/.github/workflows/CI-Pipeline.yml @@ -1,4 +1,4 @@ -name: TrackStack Continuous Deployment Pipeline +name: TrackStack Continuous Integration Pipeline on: pull_request: From 06b17572325311d106bdcb9160024ddd65c6a905 Mon Sep 17 00:00:00 2001 From: Raghart Date: Fri, 20 Mar 2026 18:31:51 -0400 Subject: [PATCH 25/25] s changed Pipeline workflows names for more clarification --- .github/workflows/CD-Pipeline.yml | 2 +- .github/workflows/CI-Pipeline.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD-Pipeline.yml b/.github/workflows/CD-Pipeline.yml index 0eaa890..95a55f5 100644 --- a/.github/workflows/CD-Pipeline.yml +++ b/.github/workflows/CD-Pipeline.yml @@ -1,4 +1,4 @@ -name: TrackStack Continuous Deployment Pipeline +name: Continuous Deployment Pipeline on: push: diff --git a/.github/workflows/CI-Pipeline.yml b/.github/workflows/CI-Pipeline.yml index 0194e62..8d022a8 100644 --- a/.github/workflows/CI-Pipeline.yml +++ b/.github/workflows/CI-Pipeline.yml @@ -1,4 +1,4 @@ -name: TrackStack Continuous Integration Pipeline +name: Continuous Integration Pipeline on: pull_request: