
diff --git a/client/src/components/screens/Victory.tsx b/client/src/components/screens/Victory.tsx
index 1f00041..771bec6 100644
--- a/client/src/components/screens/Victory.tsx
+++ b/client/src/components/screens/Victory.tsx
@@ -1,12 +1,46 @@
-// Victory screen with return to map link
-// TODO: IMPORT LIBRARIES: REACT, REACT-ROUTER-DOM
-// TODO:CR8 FUNCTIONAL VICTORY COMPONENT
-// TODO: W/I VICTORY COMPONENT USENAVIGATE()
-// TODO: ADD IMG SRC "/clients/backgrounds/codezilla_bkgd.png"
-// TODO: NAVIGATE BACK TO THE MAP
-// TODO: CREAT A CONTAINER VICTORY-CONTAINER
-// TODO: CREATE "VICTORY" HEADER
-// TODO: CREATE A VICTORY CONGRATULATORY MESSAGE
-// TODO: CREATE A PLAY AGAIN BUTTON
-// TODO: EXPORT DEFAULT VICTORY
+import './codezilla.css';
+
+export default function VictoryPage({
+ backgroundUrl = '/assets/background.jpg',
+ logoUrl = '/assets/codezilla-logo.png',
+ avatarUrl = '/assets/player-avatar.png',
+ confettiUrl = '/assets/confetti.png',
+}) {
+ return (
+
+

+
+
+ {/* Confetti overlay */}
+
+
+
Congratulations!
+
+

+
+
+ You defeated Codezilla!
+
+
+
+ you are a coding master!
+
+
+
+ );
+}
diff --git a/client/src/styles/codezilla.css b/client/src/styles/codezilla.css
index c5fb0d1..a72e919 100644
--- a/client/src/styles/codezilla.css
+++ b/client/src/styles/codezilla.css
@@ -1,21 +1,30 @@
/* BACKGROUND */
-.body {
+/* .body {
background-image: url('/clients/backgrounds/codezilla_bkgd.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
- height: 100vh;
+ height: 100vh; */
- }
- /* .background-image {
+ /* } */
+ .background-image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 0;
- } */
+ }
+ .login-wrapper{
+ height: 100vh;
+ width: 100vw;
+ display:flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+ overflow:hidden;
+ }
/* SIGNUP */
.signup-button {
@@ -27,6 +36,26 @@
margin-top: 20px;
}
+ .avatar-grid {
+ display:flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: 1.5rem;
+ margin: 2 rem 0;
+ width: 100%;
+ }
+
+ .avatar-option{
+ width: 150px;
+ height: 150px;
+ object-fit: cover;
+ border-radius: 50%;
+ cursor: pointer;
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
+ border: 2px solid transparent;
+ }
+
+ .avata
/* QUIZ CONTAINER */
.quiz-container {
@@ -41,8 +70,9 @@
.question-box {
position: absolute;
top: 50%;
- left: 50%;
- width: 90%;
+ left: 50%;
+ height: 80%;
+ width: 80%;
max-width: 600px;
transform: translate(-50%, -50%);
background: rgba(0, 0, 50, 0.85);
@@ -72,4 +102,152 @@
z-index: 10;
}
-
\ No newline at end of file
+ /* Game Over Page Styling */
+ /* Full-screen rainy night background */
+.game-over-page {
+ width: 100vw;
+ height: 100vh;
+ background-size: cover;
+ background-position: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ font-family: sans-serif;
+}
+
+/* Logo in top-left corner */
+.game-over-logo {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ width: 160px; /* adjust as needed */
+}
+
+/* The dark rounded panel */
+.game-over-container {
+ background: rgba(0, 0, 30, 0.9);
+ border-radius: 40px;
+ padding: 40px 60px;
+ box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
+ text-align: center;
+ max-width: 800px;
+ width: calc(100% - 80px);
+}
+
+/* “Game Over!” */
+.game-over-title {
+ color: #e00;
+ font-size: 4rem;
+ margin: 0;
+}
+
+/* Avatars row */
+.game-over-images {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 2rem;
+ margin: 2.5rem 0;
+}
+
+.player-avatar,
+.codezilla-avatar {
+ width: 120px; /* adjust size */
+ height: auto;
+}
+
+/* “You were defeated…” */
+.game-over-subtitle {
+ color: #e00;
+ font-size: 2rem;
+ margin: 0.5rem 0 1.5rem;
+}
+
+/* “try again…” */
+.game-over-cta {
+ color: #fff;
+ font-size: 1.25rem;
+ margin: 0;
+}
+
+/* Victory Page Styling */
+/* Full-screen rainy night background */
+.victory-page {
+ width: 100vw;
+ height: 100vh;
+ background-size: cover;
+ background-position: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ font-family: sans-serif;
+}
+
+/* Logo in top-left corner */
+.victory-logo {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ width: 160px;
+}
+
+/* Dark rounded panel container */
+.victory-container {
+ position: relative;
+ background: rgba(0, 0, 30, 0.9);
+ border-radius: 40px;
+ padding: 40px 60px;
+ box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
+ text-align: center;
+ max-width: 800px;
+ width: calc(100% - 80px);
+ overflow: hidden;
+}
+
+/* Confetti overlay inside the panel */
+.victory-confetti {
+ position: absolute;
+ inset: 0;
+ background-size: cover;
+ background-position: center;
+ opacity: 0.8;
+ pointer-events: none;
+}
+
+/* “Congratulations!” */
+.victory-title {
+ color: #fff;
+ font-size: 3.5rem;
+ margin: 0;
+ position: relative;
+ z-index: 1;
+}
+
+/* Player avatar */
+.victory-avatar {
+ width: 120px;
+ height: auto;
+ margin: 2rem 0;
+ position: relative;
+ z-index: 1;
+}
+
+/* “You defeated Codezilla!” */
+.victory-subtitle {
+ color: #fff;
+ font-size: 2rem;
+ margin: 0.5rem 0 1rem;
+ position: relative;
+ z-index: 1;
+}
+
+/* “you are a coding master!” */
+.victory-cta {
+ color: #fff;
+ font-size: 1.25rem;
+ margin: 0;
+ position: relative;
+ z-index: 1;
+}
diff --git a/package-lock.json b/package-lock.json
index bc88d66..f691d2b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,14 +14,23 @@
"bcrypt": "^5.1.1",
"cors": "^2.8.5",
"dotenv": "^16.5.0",
+<<<<<<< HEAD
+ "express": "^5.1.0",
+ "mongoose": "^8.13.3",
+=======
"express": "^4.17.1",
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"openai": "^4.95.1",
"react": "^19.1.0"
},
"devDependencies": {
+<<<<<<< HEAD
+ "@types/express": "^5.0.1",
+=======
"@types/bcrypt": "^5.0.2",
"@types/express": "^4.17.17",
"@types/jsonwebtoken": "^9.0.9",
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"@types/mongoose": "^5.11.96",
"@types/node": "^22.14.1",
"concurrently": "^9.1.2",
@@ -367,6 +376,8 @@
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
+<<<<<<< HEAD
+=======
"node_modules/@mapbox/node-pre-gyp": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
@@ -387,16 +398,22 @@
"node-pre-gyp": "bin/node-pre-gyp"
}
},
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"node_modules/@mongodb-js/saslprep": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.2.tgz",
"integrity": "sha512-EB0O3SCSNRUFk66iRCpI+cXzIjdswfCs7F6nOC3RAGJ7xr5YhaicvsRwJ9eyzYvYRlCSDUO/c7g4yNulxKC1WA==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"dependencies": {
"sparse-bitfield": "^3.0.3"
}
},
+<<<<<<< HEAD
+=======
"node_modules/@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@@ -461,6 +478,7 @@
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
"license": "BSD-3-Clause"
},
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"node_modules/@tsconfig/node10": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
@@ -606,6 +624,16 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/mongoose": {
+ "version": "5.11.96",
+ "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.11.96.tgz",
+ "integrity": "sha512-keiY22ljJtXyM7osgScmZOHV6eL5VFUD5tQumlu+hjS++HND5nM8jNEdj5CSWfKIJpVwQfPuwQ2SfBqUnCAVRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mongoose": "*"
+ }
+ },
"node_modules/@types/node": {
"version": "22.15.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.2.tgz",
@@ -662,25 +690,34 @@
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
"integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT"
},
"node_modules/@types/whatwg-url": {
"version": "11.0.5",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
"integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"dependencies": {
"@types/webidl-conversions": "*"
}
},
+<<<<<<< HEAD
+=======
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"license": "ISC"
},
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
@@ -1154,7 +1191,10 @@
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/bson/-/bson-6.10.3.tgz",
"integrity": "sha512-MTxGsqgYTwfshYWTRdmZRC+M7FnG1b4y7RO7p2k3X24Wq0yv1m77Wsj0BzlPzd/IowgESfsruQCUToa7vbOpPQ==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "Apache-2.0",
"engines": {
"node": ">=16.20.1"
@@ -2167,6 +2207,15 @@
"node": ">=12.0.0"
}
},
+ "node_modules/kareem": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz",
+ "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
@@ -2264,7 +2313,10 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT"
},
"node_modules/merge-descriptors": {
@@ -2327,6 +2379,12 @@
"node": "*"
}
},
+<<<<<<< HEAD
+ "node_modules/mongodb": {
+ "version": "6.15.0",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.15.0.tgz",
+ "integrity": "sha512-ifBhQ0rRzHDzqp9jAQP6OwHSH7dbYIQjD3SbJs9YYk9AikKEettW/9s/tbSFDTpXcRbF+u1aLrhHxDFaYtZpFQ==",
+=======
"node_modules/minipass": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
@@ -2378,6 +2436,7 @@
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.16.0.tgz",
"integrity": "sha512-D1PNcdT0y4Grhou5Zi/qgipZOYeWrhLEpk33n3nm6LGtz61jvO88WlrWCK/bigMjpnOdAUKKQwsGIl0NtWMyYw==",
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "Apache-2.0",
"dependencies": {
"@mongodb-js/saslprep": "^1.1.9",
@@ -2424,7 +2483,10 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz",
"integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "Apache-2.0",
"dependencies": {
"@types/whatwg-url": "^11.0.2",
@@ -2435,7 +2497,10 @@
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",
"integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"dependencies": {
"punycode": "^2.3.1"
@@ -2448,7 +2513,10 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
@@ -2458,7 +2526,10 @@
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
"integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"dependencies": {
"tr46": "^5.1.0",
@@ -2469,15 +2540,25 @@
}
},
"node_modules/mongoose": {
+<<<<<<< HEAD
+ "version": "8.13.3",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.13.3.tgz",
+ "integrity": "sha512-85S6AOABJcgn77ZKFZKOQkWID69vvtv0YFOk+mMOUrq/7+ziIyybWGZSGQRxN9M41Ehe6a9ug41nV13uJFB9Pw==",
+=======
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.14.0.tgz",
"integrity": "sha512-IxDxIUu42apE7oEknJK535xkQ6Gd7GKx/gNrNHY+vP4+ucVU2TOCWjVVW14Vc79y9DEEElzHDlTOuVNM8glUFA==",
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"dependencies": {
"bson": "^6.10.3",
"kareem": "2.6.3",
+<<<<<<< HEAD
+ "mongodb": "~6.15.0",
+=======
"mongodb": "~6.16.0",
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"mpath": "0.9.0",
"mquery": "5.0.0",
"ms": "2.1.3",
@@ -2495,7 +2576,10 @@
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
"integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"engines": {
"node": ">=4.0.0"
@@ -2505,7 +2589,10 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
"integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"dependencies": {
"debug": "4.x"
@@ -2807,7 +2894,10 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+<<<<<<< HEAD
+=======
"dev": true,
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"license": "MIT",
"engines": {
"node": ">=6"
@@ -3123,6 +3213,193 @@
],
"license": "MIT"
},
+<<<<<<< HEAD
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/send": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
+ "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "mime-types": "^3.0.1",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",
+ "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/shell-quote": {
+ "version": "1.8.2",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz",
+ "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/sift": {
+ "version": "17.1.3",
+ "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
+ "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==",
+ "license": "MIT"
+ },
+ "node_modules/simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+ "license": "MIT",
+ "dependencies": {
+ "memory-pager": "^1.0.2"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+=======
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
diff --git a/package.json b/package.json
index d4d6816..eabd66e 100644
--- a/package.json
+++ b/package.json
@@ -29,14 +29,23 @@
"bcrypt": "^5.1.1",
"cors": "^2.8.5",
"dotenv": "^16.5.0",
+<<<<<<< HEAD
+ "express": "^5.1.0",
+ "mongoose": "^8.13.3",
+=======
"express": "^4.17.1",
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"openai": "^4.95.1",
"react": "^19.1.0"
},
"devDependencies": {
+<<<<<<< HEAD
+ "@types/express": "^5.0.1",
+=======
"@types/bcrypt": "^5.0.2",
"@types/express": "^4.17.17",
"@types/jsonwebtoken": "^9.0.9",
+>>>>>>> f02311985330e2744b6b35806e278a31f6acc830
"@types/mongoose": "^5.11.96",
"@types/node": "^22.14.1",
"concurrently": "^9.1.2",
diff --git a/server/src/config/connections.ts b/server/src/config/connections.ts
index e69de29..41ad3cc 100644
--- a/server/src/config/connections.ts
+++ b/server/src/config/connections.ts
@@ -0,0 +1,19 @@
+import dotenv from 'dotenv';
+dotenv.config();
+
+import mongoose from 'mongoose';
+
+const MONGODB_URI = process.env.MONGODB_URI || '';
+
+const db = async (): Promise
=> {
+ try {
+ await mongoose.connect(MONGODB_URI);
+ console.log('Database connected.');
+ return mongoose.connection;
+ } catch (error) {
+ console.error('Database connection error:', error);
+ throw new Error('Database connection failed.');
+ }
+};
+
+export default db;