diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 32452a1..6721b29 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,28 +1,27 @@ -name: Lint and style checks - -on: - pull_request: - branches: - main - -jobs: - backend: - name: Backend lint and style check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - - working-directory: backend # Change this to the name of your backend directory - run: | - npm ci - npm run lint-check - frontend: - name: Frontend lint and style check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - - working-directory: frontend # Change this to the name of your frontend directory - run: | - npm ci - npm run lint-check +name: Lint and style checks + +on: + pull_request: + branches: main + +jobs: + backend: + name: Backend lint and style check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - working-directory: backend # Change this to the name of your backend directory + run: | + npm ci --legacy-peer-deps + npm run lint-check + frontend: + name: Frontend lint and style check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - working-directory: frontend # Change this to the name of your frontend directory + run: | + npm ci --legacy-peer-deps + npm run lint-check diff --git a/backend/.eslintcache b/backend/.eslintcache index 61ac395..27c62c7 100644 --- a/backend/.eslintcache +++ b/backend/.eslintcache @@ -1 +1 @@ -[{"/Users/alexisvega/Documents/test-dev-project-SP26/backend/eslint.config.mjs":"1","/Users/alexisvega/Documents/test-dev-project-SP26/backend/package.json":"2","/Users/alexisvega/Documents/test-dev-project-SP26/backend/prettier.config.mjs":"3","/Users/alexisvega/Documents/test-dev-project-SP26/backend/src/index.ts":"4","/Users/alexisvega/Documents/test-dev-project-SP26/backend/tsconfig.json":"5"},{"size":2310,"mtime":1778549402658,"results":"6","hashOfConfig":"7"},{"size":1235,"mtime":1778551875648,"results":"8","hashOfConfig":"9"},{"size":506,"mtime":1778549402409,"results":"10","hashOfConfig":"7"},{"size":366,"mtime":1778550302952,"results":"11","hashOfConfig":"12"},{"size":401,"mtime":1778550175418,"results":"13","hashOfConfig":"14"},{"filePath":"15","messages":"16","suppressedMessages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ox2twy",{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1q4ttqb",{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"14awezl",{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xwcv0w","/Users/alexisvega/Documents/test-dev-project-SP26/backend/eslint.config.mjs",[],[],"/Users/alexisvega/Documents/test-dev-project-SP26/backend/package.json",[],[],"/Users/alexisvega/Documents/test-dev-project-SP26/backend/prettier.config.mjs",[],[],"/Users/alexisvega/Documents/test-dev-project-SP26/backend/src/index.ts",[],[],"/Users/alexisvega/Documents/test-dev-project-SP26/backend/tsconfig.json",[],[]] \ No newline at end of file +[{"C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\eslint.config.mjs":"1","C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\package.json":"2","C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\prettier.config.mjs":"3","C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\src\\index.ts":"4","C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\tsconfig.json":"5"},{"size":2310,"mtime":1779485694903,"results":"6","hashOfConfig":"7"},{"size":1235,"mtime":1779485694990,"results":"8","hashOfConfig":"9"},{"size":506,"mtime":1779485695002,"results":"10","hashOfConfig":"7"},{"size":366,"mtime":1779485695065,"results":"11","hashOfConfig":"12"},{"size":401,"mtime":1779485695072,"results":"13","hashOfConfig":"14"},{"filePath":"15","messages":"16","suppressedMessages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i590ty",{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qsshfd",{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"19z74s",{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1k5wbyy","C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\eslint.config.mjs",[],[],"C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\package.json",[],[],"C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\prettier.config.mjs",[],[],"C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\src\\index.ts",[],[],"C:\\Users\\Lynx\\Documents\\School\\Transfer\\UC\\UCSD\\Github\\test-dev-project-SP26\\backend\\tsconfig.json",[],[]] \ No newline at end of file diff --git a/backend/package-lock.json b/backend/package-lock.json index 9f52b82..78c6e4e 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1443,9 +1443,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1460,9 +1457,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1477,9 +1471,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1494,9 +1485,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1511,9 +1499,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1528,9 +1513,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1545,9 +1527,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1562,9 +1541,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ diff --git a/frontend/app/submit/success/page.tsx b/frontend/app/submit/success/page.tsx new file mode 100644 index 0000000..1352574 --- /dev/null +++ b/frontend/app/submit/success/page.tsx @@ -0,0 +1,42 @@ +"use client"; + +import Image from "next/image"; +import { useRouter, useSearchParams } from "next/navigation"; +import { useEffect } from "react"; + +import styles from "./success.module.css"; + +export default function ConfirmationPage() { + const router = useRouter(); + const searchParams = useSearchParams(); + const name = searchParams.get("name") || "Karen"; + const avatar = searchParams.get("avatar") || ""; + + useEffect(() => { + const timer = setTimeout(() => { + router.push("/leaderboard"); + }, 3000); + return () => clearTimeout(timer); + }, [router]); + + return ( +
+

+ Thanks for your submission, +
+ {name}! +

+

Redirecting to leaderboard...

+ +
+ {avatar ? ( + {name} + ) : ( + {`${name} + )} +
+ +
+
+ ); +} diff --git a/frontend/app/submit/success/success.module.css b/frontend/app/submit/success/success.module.css new file mode 100644 index 0000000..17f110c --- /dev/null +++ b/frontend/app/submit/success/success.module.css @@ -0,0 +1,71 @@ +:root { + --color-background: #0c2b35; + --color-accent: #debb01; + --color-text: white; + --color-border: black; + --color-spinner: rgba(255, 255, 255, 0.2); +} + +.confirmationContainer { + background-color: var(--color-background); + min-height: 100dvh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 0.5rem; + text-align: center; + padding: 1.5rem; + padding-top: 2.5rem; +} + +.thankYouHeading { + color: var(--color-accent); + font-size: clamp(1.5rem, 5.5vw, 2rem); + font-weight: 700; + line-height: 1.2; + white-space: nowrap; + margin: 0; + padding: 0 2rem; +} + +.thankYouHeading span { + font-size: clamp(2rem, 10vw, 3rem); +} + +.avatar { + width: min(173px, 43vw); + height: min(173px, 43vw); + border-radius: 50%; + overflow: hidden; + margin-bottom: 0.5rem; +} + +.avatarPlaceholder { + width: 100%; + height: 100%; + background-color: #888; +} + +.spinner { + width: min(48px, 12vw); + height: min(48px, 12vw); + margin-top: 1rem; + border-radius: 50%; + border: 3px solid var(--color-spinner); + border-top-color: white; + animation: spin 0.9s linear infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +.redirectMessage { + color: white; + font-size: clamp(0.875rem, 3.5vw, 1.25rem); + font-weight: 400; + margin-bottom: 1rem; +} diff --git a/frontend/app/welcome/page.tsx b/frontend/app/welcome/page.tsx new file mode 100644 index 0000000..ec1174f --- /dev/null +++ b/frontend/app/welcome/page.tsx @@ -0,0 +1,21 @@ +import styles from "./welcome.module.css"; + +export default function WelcomePage() { + return ( +
+ + +

+ Welcome,
+ Caleb! +

+

Logging you in now...

+
+ Caleb avatar +
+
+
+ ); +} diff --git a/frontend/app/welcome/welcome.module.css b/frontend/app/welcome/welcome.module.css new file mode 100644 index 0000000..42f0131 --- /dev/null +++ b/frontend/app/welcome/welcome.module.css @@ -0,0 +1,70 @@ +:root { + --color-background: #0c2b35; + --color-accent: #debb01; + --color-text: white; + --color-border: black; + --color-spinner: rgba(255, 255, 255, 0.2); +} + +.container { + background-color: var(--color-background); + font-family: Rubik, sans-serif; + min-height: 100dvh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 1.5rem; + text-align: center; +} + +.backButton { + position: absolute; + top: 1.25rem; + left: 1.25rem; + cursor: pointer; +} + +.greeting { + color: var(--color-accent); + font-size: clamp(2rem, 10vw, 3rem); + font-weight: 700; + line-height: 1; + margin: 0; +} + +.loadMessage { + color: var(--color-text); + font-size: clamp(0.875rem, 3.5vw, 1.25rem); + font-weight: 400; + line-height: 1; + margin: 0; +} + +.avatar { + width: min(173px, 43vw); + height: min(173px, 43vw); + border-radius: 50%; + border: 3px solid var(--color-border); +} + +.avatar img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.spinner { + width: min(48px, 12vw); + height: min(48px, 12vw); + border-radius: 50%; + border: 3px solid var(--color-spinner); + border-top-color: var(--color-text); + animation: spin 0.9s linear infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 95e65c2..c22c61c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -20,6 +20,7 @@ "@types/react-dom": "^19", "eslint": "^9.39.4", "eslint-config-next": "16.2.6", + "eslint-plugin-react-hooks": "^7.1.1", "husky": "^9.1.7", "prettier": "^3.8.3", "tailwindcss": "^4", @@ -843,9 +844,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -862,9 +860,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -881,9 +876,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -900,9 +892,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -919,9 +908,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -938,9 +924,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -957,9 +940,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -976,9 +956,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -995,9 +972,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1020,9 +994,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1045,9 +1016,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1070,9 +1038,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1095,9 +1060,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1120,9 +1082,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1145,9 +1104,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1170,9 +1126,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1382,9 +1335,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1401,9 +1351,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1420,9 +1367,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1439,9 +1383,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1733,9 +1674,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1753,9 +1691,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1773,9 +1708,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1793,9 +1725,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2381,9 +2310,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2398,9 +2324,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2415,9 +2338,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2432,9 +2352,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2449,9 +2366,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2466,9 +2380,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2483,9 +2394,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2500,9 +2408,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6329,9 +6234,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -6353,9 +6255,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -6377,9 +6276,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -6401,9 +6297,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ diff --git a/frontend/package.json b/frontend/package.json index c65fee7..0e97429 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,6 +26,7 @@ "@types/react-dom": "^19", "eslint": "^9.39.4", "eslint-config-next": "16.2.6", + "eslint-plugin-react-hooks": "^7.1.1", "husky": "^9.1.7", "prettier": "^3.8.3", "tailwindcss": "^4", diff --git a/frontend/public/Ellipse3819.svg b/frontend/public/Ellipse3819.svg new file mode 100644 index 0000000..24586e9 --- /dev/null +++ b/frontend/public/Ellipse3819.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/frontend/public/avatar.png b/frontend/public/avatar.png new file mode 100644 index 0000000..c4c6308 Binary files /dev/null and b/frontend/public/avatar.png differ diff --git a/frontend/public/ep_back.svg b/frontend/public/ep_back.svg new file mode 100644 index 0000000..8280541 --- /dev/null +++ b/frontend/public/ep_back.svg @@ -0,0 +1,4 @@ + + + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..02b56ad --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "test-dev-project-SP26", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}