ShieldX commited on
Commit
9470e9f
·
verified ·
1 Parent(s): dd25b08

Upload 18 files

Browse files
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Node.js image
2
+ FROM node:18-alpine
3
+
4
+ # Create app directory
5
+ WORKDIR /app
6
+
7
+ # Copy package files first (for caching)
8
+ COPY package*.json ./
9
+
10
+ # Install dependencies
11
+ RUN npm ci --only=production
12
+
13
+ # Copy source code
14
+ COPY . .
15
+
16
+ # HuggingFace expects port 7860
17
+ ENV PORT=7860
18
+ EXPOSE 7860
19
+
20
+ # Start the server
21
+ CMD ["npm", "start"]
package-lock.json ADDED
@@ -0,0 +1,2007 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cragy-server",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "cragy-server",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "cloudinary": "^2.9.0",
13
+ "cookie-session": "^2.1.1",
14
+ "cors": "^2.8.6",
15
+ "dotenv": "^17.2.3",
16
+ "express": "^5.2.1",
17
+ "helmet": "^8.1.0",
18
+ "mongoose": "^9.1.5",
19
+ "passport": "^0.7.0",
20
+ "passport-google-oauth20": "^2.0.0",
21
+ "socket.io": "^4.8.3"
22
+ },
23
+ "devDependencies": {
24
+ "nodemon": "^3.1.11"
25
+ }
26
+ },
27
+ "node_modules/@mongodb-js/saslprep": {
28
+ "version": "1.4.5",
29
+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.5.tgz",
30
+ "integrity": "sha512-k64Lbyb7ycCSXHSLzxVdb2xsKGPMvYZfCICXvDsI8Z65CeWQzTEKS4YmGbnqw+U9RBvLPTsB6UCmwkgsDTGWIw==",
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "sparse-bitfield": "^3.0.3"
34
+ }
35
+ },
36
+ "node_modules/@socket.io/component-emitter": {
37
+ "version": "3.1.2",
38
+ "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
39
+ "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==",
40
+ "license": "MIT"
41
+ },
42
+ "node_modules/@types/cors": {
43
+ "version": "2.8.19",
44
+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz",
45
+ "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==",
46
+ "license": "MIT",
47
+ "dependencies": {
48
+ "@types/node": "*"
49
+ }
50
+ },
51
+ "node_modules/@types/node": {
52
+ "version": "25.0.10",
53
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.10.tgz",
54
+ "integrity": "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg==",
55
+ "license": "MIT",
56
+ "dependencies": {
57
+ "undici-types": "~7.16.0"
58
+ }
59
+ },
60
+ "node_modules/@types/webidl-conversions": {
61
+ "version": "7.0.3",
62
+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
63
+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==",
64
+ "license": "MIT"
65
+ },
66
+ "node_modules/@types/whatwg-url": {
67
+ "version": "13.0.0",
68
+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-13.0.0.tgz",
69
+ "integrity": "sha512-N8WXpbE6Wgri7KUSvrmQcqrMllKZ9uxkYWMt+mCSGwNc0Hsw9VQTW7ApqI4XNrx6/SaM2QQJCzMPDEXE058s+Q==",
70
+ "license": "MIT",
71
+ "dependencies": {
72
+ "@types/webidl-conversions": "*"
73
+ }
74
+ },
75
+ "node_modules/accepts": {
76
+ "version": "2.0.0",
77
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
78
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
79
+ "license": "MIT",
80
+ "dependencies": {
81
+ "mime-types": "^3.0.0",
82
+ "negotiator": "^1.0.0"
83
+ },
84
+ "engines": {
85
+ "node": ">= 0.6"
86
+ }
87
+ },
88
+ "node_modules/anymatch": {
89
+ "version": "3.1.3",
90
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
91
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
92
+ "dev": true,
93
+ "license": "ISC",
94
+ "dependencies": {
95
+ "normalize-path": "^3.0.0",
96
+ "picomatch": "^2.0.4"
97
+ },
98
+ "engines": {
99
+ "node": ">= 8"
100
+ }
101
+ },
102
+ "node_modules/balanced-match": {
103
+ "version": "1.0.2",
104
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
105
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
106
+ "dev": true,
107
+ "license": "MIT"
108
+ },
109
+ "node_modules/base64id": {
110
+ "version": "2.0.0",
111
+ "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
112
+ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
113
+ "license": "MIT",
114
+ "engines": {
115
+ "node": "^4.5.0 || >= 5.9"
116
+ }
117
+ },
118
+ "node_modules/base64url": {
119
+ "version": "3.0.1",
120
+ "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
121
+ "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==",
122
+ "license": "MIT",
123
+ "engines": {
124
+ "node": ">=6.0.0"
125
+ }
126
+ },
127
+ "node_modules/binary-extensions": {
128
+ "version": "2.3.0",
129
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
130
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
131
+ "dev": true,
132
+ "license": "MIT",
133
+ "engines": {
134
+ "node": ">=8"
135
+ },
136
+ "funding": {
137
+ "url": "https://github.com/sponsors/sindresorhus"
138
+ }
139
+ },
140
+ "node_modules/body-parser": {
141
+ "version": "2.2.2",
142
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
143
+ "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
144
+ "license": "MIT",
145
+ "dependencies": {
146
+ "bytes": "^3.1.2",
147
+ "content-type": "^1.0.5",
148
+ "debug": "^4.4.3",
149
+ "http-errors": "^2.0.0",
150
+ "iconv-lite": "^0.7.0",
151
+ "on-finished": "^2.4.1",
152
+ "qs": "^6.14.1",
153
+ "raw-body": "^3.0.1",
154
+ "type-is": "^2.0.1"
155
+ },
156
+ "engines": {
157
+ "node": ">=18"
158
+ },
159
+ "funding": {
160
+ "type": "opencollective",
161
+ "url": "https://opencollective.com/express"
162
+ }
163
+ },
164
+ "node_modules/body-parser/node_modules/debug": {
165
+ "version": "4.4.3",
166
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
167
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
168
+ "license": "MIT",
169
+ "dependencies": {
170
+ "ms": "^2.1.3"
171
+ },
172
+ "engines": {
173
+ "node": ">=6.0"
174
+ },
175
+ "peerDependenciesMeta": {
176
+ "supports-color": {
177
+ "optional": true
178
+ }
179
+ }
180
+ },
181
+ "node_modules/brace-expansion": {
182
+ "version": "1.1.12",
183
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
184
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
185
+ "dev": true,
186
+ "license": "MIT",
187
+ "dependencies": {
188
+ "balanced-match": "^1.0.0",
189
+ "concat-map": "0.0.1"
190
+ }
191
+ },
192
+ "node_modules/braces": {
193
+ "version": "3.0.3",
194
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
195
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
196
+ "dev": true,
197
+ "license": "MIT",
198
+ "dependencies": {
199
+ "fill-range": "^7.1.1"
200
+ },
201
+ "engines": {
202
+ "node": ">=8"
203
+ }
204
+ },
205
+ "node_modules/bson": {
206
+ "version": "7.1.1",
207
+ "resolved": "https://registry.npmjs.org/bson/-/bson-7.1.1.tgz",
208
+ "integrity": "sha512-TtJgBB+QyOlWjrbM+8bRgH84VM/xrDjyBFgSgGrfZF4xvt6gbEDtcswm27Tn9F9TWsjQybxT8b8VpCP/oJK4Dw==",
209
+ "license": "Apache-2.0",
210
+ "engines": {
211
+ "node": ">=20.19.0"
212
+ }
213
+ },
214
+ "node_modules/bytes": {
215
+ "version": "3.1.2",
216
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
217
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
218
+ "license": "MIT",
219
+ "engines": {
220
+ "node": ">= 0.8"
221
+ }
222
+ },
223
+ "node_modules/call-bind-apply-helpers": {
224
+ "version": "1.0.2",
225
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
226
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
227
+ "license": "MIT",
228
+ "dependencies": {
229
+ "es-errors": "^1.3.0",
230
+ "function-bind": "^1.1.2"
231
+ },
232
+ "engines": {
233
+ "node": ">= 0.4"
234
+ }
235
+ },
236
+ "node_modules/call-bound": {
237
+ "version": "1.0.4",
238
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
239
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
240
+ "license": "MIT",
241
+ "dependencies": {
242
+ "call-bind-apply-helpers": "^1.0.2",
243
+ "get-intrinsic": "^1.3.0"
244
+ },
245
+ "engines": {
246
+ "node": ">= 0.4"
247
+ },
248
+ "funding": {
249
+ "url": "https://github.com/sponsors/ljharb"
250
+ }
251
+ },
252
+ "node_modules/chokidar": {
253
+ "version": "3.6.0",
254
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
255
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
256
+ "dev": true,
257
+ "license": "MIT",
258
+ "dependencies": {
259
+ "anymatch": "~3.1.2",
260
+ "braces": "~3.0.2",
261
+ "glob-parent": "~5.1.2",
262
+ "is-binary-path": "~2.1.0",
263
+ "is-glob": "~4.0.1",
264
+ "normalize-path": "~3.0.0",
265
+ "readdirp": "~3.6.0"
266
+ },
267
+ "engines": {
268
+ "node": ">= 8.10.0"
269
+ },
270
+ "funding": {
271
+ "url": "https://paulmillr.com/funding/"
272
+ },
273
+ "optionalDependencies": {
274
+ "fsevents": "~2.3.2"
275
+ }
276
+ },
277
+ "node_modules/cloudinary": {
278
+ "version": "2.9.0",
279
+ "resolved": "https://registry.npmjs.org/cloudinary/-/cloudinary-2.9.0.tgz",
280
+ "integrity": "sha512-F3iKMOy4y0zy0bi5JBp94SC7HY7i/ImfTPSUV07iJmRzH1Iz8WavFfOlJTR1zvYM/xKGoiGZ3my/zy64In0IQQ==",
281
+ "license": "MIT",
282
+ "dependencies": {
283
+ "lodash": "^4.17.21"
284
+ },
285
+ "engines": {
286
+ "node": ">=9"
287
+ }
288
+ },
289
+ "node_modules/concat-map": {
290
+ "version": "0.0.1",
291
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
292
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
293
+ "dev": true,
294
+ "license": "MIT"
295
+ },
296
+ "node_modules/content-disposition": {
297
+ "version": "1.0.1",
298
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
299
+ "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
300
+ "license": "MIT",
301
+ "engines": {
302
+ "node": ">=18"
303
+ },
304
+ "funding": {
305
+ "type": "opencollective",
306
+ "url": "https://opencollective.com/express"
307
+ }
308
+ },
309
+ "node_modules/content-type": {
310
+ "version": "1.0.5",
311
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
312
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
313
+ "license": "MIT",
314
+ "engines": {
315
+ "node": ">= 0.6"
316
+ }
317
+ },
318
+ "node_modules/cookie": {
319
+ "version": "0.7.2",
320
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
321
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
322
+ "license": "MIT",
323
+ "engines": {
324
+ "node": ">= 0.6"
325
+ }
326
+ },
327
+ "node_modules/cookie-session": {
328
+ "version": "2.1.1",
329
+ "resolved": "https://registry.npmjs.org/cookie-session/-/cookie-session-2.1.1.tgz",
330
+ "integrity": "sha512-ji3kym/XZaFVew1+tIZk5ZLp9Z/fLv9rK1aZmpug0FsgE7Cu3ZDrUdRo7FT9vFjMYfNimrrUHJzywDwT7XEFlg==",
331
+ "license": "MIT",
332
+ "dependencies": {
333
+ "cookies": "0.9.1",
334
+ "debug": "3.2.7",
335
+ "on-headers": "~1.1.0",
336
+ "safe-buffer": "5.2.1"
337
+ },
338
+ "engines": {
339
+ "node": ">= 0.10"
340
+ }
341
+ },
342
+ "node_modules/cookie-signature": {
343
+ "version": "1.2.2",
344
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
345
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
346
+ "license": "MIT",
347
+ "engines": {
348
+ "node": ">=6.6.0"
349
+ }
350
+ },
351
+ "node_modules/cookies": {
352
+ "version": "0.9.1",
353
+ "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.9.1.tgz",
354
+ "integrity": "sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==",
355
+ "license": "MIT",
356
+ "dependencies": {
357
+ "depd": "~2.0.0",
358
+ "keygrip": "~1.1.0"
359
+ },
360
+ "engines": {
361
+ "node": ">= 0.8"
362
+ }
363
+ },
364
+ "node_modules/cors": {
365
+ "version": "2.8.6",
366
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
367
+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
368
+ "license": "MIT",
369
+ "dependencies": {
370
+ "object-assign": "^4",
371
+ "vary": "^1"
372
+ },
373
+ "engines": {
374
+ "node": ">= 0.10"
375
+ },
376
+ "funding": {
377
+ "type": "opencollective",
378
+ "url": "https://opencollective.com/express"
379
+ }
380
+ },
381
+ "node_modules/debug": {
382
+ "version": "3.2.7",
383
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
384
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
385
+ "license": "MIT",
386
+ "dependencies": {
387
+ "ms": "^2.1.1"
388
+ }
389
+ },
390
+ "node_modules/depd": {
391
+ "version": "2.0.0",
392
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
393
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
394
+ "license": "MIT",
395
+ "engines": {
396
+ "node": ">= 0.8"
397
+ }
398
+ },
399
+ "node_modules/dotenv": {
400
+ "version": "17.2.3",
401
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
402
+ "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
403
+ "license": "BSD-2-Clause",
404
+ "engines": {
405
+ "node": ">=12"
406
+ },
407
+ "funding": {
408
+ "url": "https://dotenvx.com"
409
+ }
410
+ },
411
+ "node_modules/dunder-proto": {
412
+ "version": "1.0.1",
413
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
414
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
415
+ "license": "MIT",
416
+ "dependencies": {
417
+ "call-bind-apply-helpers": "^1.0.1",
418
+ "es-errors": "^1.3.0",
419
+ "gopd": "^1.2.0"
420
+ },
421
+ "engines": {
422
+ "node": ">= 0.4"
423
+ }
424
+ },
425
+ "node_modules/ee-first": {
426
+ "version": "1.1.1",
427
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
428
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
429
+ "license": "MIT"
430
+ },
431
+ "node_modules/encodeurl": {
432
+ "version": "2.0.0",
433
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
434
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
435
+ "license": "MIT",
436
+ "engines": {
437
+ "node": ">= 0.8"
438
+ }
439
+ },
440
+ "node_modules/engine.io": {
441
+ "version": "6.6.5",
442
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.5.tgz",
443
+ "integrity": "sha512-2RZdgEbXmp5+dVbRm0P7HQUImZpICccJy7rN7Tv+SFa55pH+lxnuw6/K1ZxxBfHoYpSkHLAO92oa8O4SwFXA2A==",
444
+ "license": "MIT",
445
+ "dependencies": {
446
+ "@types/cors": "^2.8.12",
447
+ "@types/node": ">=10.0.0",
448
+ "accepts": "~1.3.4",
449
+ "base64id": "2.0.0",
450
+ "cookie": "~0.7.2",
451
+ "cors": "~2.8.5",
452
+ "debug": "~4.4.1",
453
+ "engine.io-parser": "~5.2.1",
454
+ "ws": "~8.18.3"
455
+ },
456
+ "engines": {
457
+ "node": ">=10.2.0"
458
+ }
459
+ },
460
+ "node_modules/engine.io-parser": {
461
+ "version": "5.2.3",
462
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
463
+ "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
464
+ "license": "MIT",
465
+ "engines": {
466
+ "node": ">=10.0.0"
467
+ }
468
+ },
469
+ "node_modules/engine.io/node_modules/accepts": {
470
+ "version": "1.3.8",
471
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
472
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
473
+ "license": "MIT",
474
+ "dependencies": {
475
+ "mime-types": "~2.1.34",
476
+ "negotiator": "0.6.3"
477
+ },
478
+ "engines": {
479
+ "node": ">= 0.6"
480
+ }
481
+ },
482
+ "node_modules/engine.io/node_modules/debug": {
483
+ "version": "4.4.3",
484
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
485
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
486
+ "license": "MIT",
487
+ "dependencies": {
488
+ "ms": "^2.1.3"
489
+ },
490
+ "engines": {
491
+ "node": ">=6.0"
492
+ },
493
+ "peerDependenciesMeta": {
494
+ "supports-color": {
495
+ "optional": true
496
+ }
497
+ }
498
+ },
499
+ "node_modules/engine.io/node_modules/mime-db": {
500
+ "version": "1.52.0",
501
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
502
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
503
+ "license": "MIT",
504
+ "engines": {
505
+ "node": ">= 0.6"
506
+ }
507
+ },
508
+ "node_modules/engine.io/node_modules/mime-types": {
509
+ "version": "2.1.35",
510
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
511
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
512
+ "license": "MIT",
513
+ "dependencies": {
514
+ "mime-db": "1.52.0"
515
+ },
516
+ "engines": {
517
+ "node": ">= 0.6"
518
+ }
519
+ },
520
+ "node_modules/engine.io/node_modules/negotiator": {
521
+ "version": "0.6.3",
522
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
523
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
524
+ "license": "MIT",
525
+ "engines": {
526
+ "node": ">= 0.6"
527
+ }
528
+ },
529
+ "node_modules/es-define-property": {
530
+ "version": "1.0.1",
531
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
532
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
533
+ "license": "MIT",
534
+ "engines": {
535
+ "node": ">= 0.4"
536
+ }
537
+ },
538
+ "node_modules/es-errors": {
539
+ "version": "1.3.0",
540
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
541
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
542
+ "license": "MIT",
543
+ "engines": {
544
+ "node": ">= 0.4"
545
+ }
546
+ },
547
+ "node_modules/es-object-atoms": {
548
+ "version": "1.1.1",
549
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
550
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
551
+ "license": "MIT",
552
+ "dependencies": {
553
+ "es-errors": "^1.3.0"
554
+ },
555
+ "engines": {
556
+ "node": ">= 0.4"
557
+ }
558
+ },
559
+ "node_modules/escape-html": {
560
+ "version": "1.0.3",
561
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
562
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
563
+ "license": "MIT"
564
+ },
565
+ "node_modules/etag": {
566
+ "version": "1.8.1",
567
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
568
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
569
+ "license": "MIT",
570
+ "engines": {
571
+ "node": ">= 0.6"
572
+ }
573
+ },
574
+ "node_modules/express": {
575
+ "version": "5.2.1",
576
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
577
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
578
+ "license": "MIT",
579
+ "dependencies": {
580
+ "accepts": "^2.0.0",
581
+ "body-parser": "^2.2.1",
582
+ "content-disposition": "^1.0.0",
583
+ "content-type": "^1.0.5",
584
+ "cookie": "^0.7.1",
585
+ "cookie-signature": "^1.2.1",
586
+ "debug": "^4.4.0",
587
+ "depd": "^2.0.0",
588
+ "encodeurl": "^2.0.0",
589
+ "escape-html": "^1.0.3",
590
+ "etag": "^1.8.1",
591
+ "finalhandler": "^2.1.0",
592
+ "fresh": "^2.0.0",
593
+ "http-errors": "^2.0.0",
594
+ "merge-descriptors": "^2.0.0",
595
+ "mime-types": "^3.0.0",
596
+ "on-finished": "^2.4.1",
597
+ "once": "^1.4.0",
598
+ "parseurl": "^1.3.3",
599
+ "proxy-addr": "^2.0.7",
600
+ "qs": "^6.14.0",
601
+ "range-parser": "^1.2.1",
602
+ "router": "^2.2.0",
603
+ "send": "^1.1.0",
604
+ "serve-static": "^2.2.0",
605
+ "statuses": "^2.0.1",
606
+ "type-is": "^2.0.1",
607
+ "vary": "^1.1.2"
608
+ },
609
+ "engines": {
610
+ "node": ">= 18"
611
+ },
612
+ "funding": {
613
+ "type": "opencollective",
614
+ "url": "https://opencollective.com/express"
615
+ }
616
+ },
617
+ "node_modules/express/node_modules/debug": {
618
+ "version": "4.4.3",
619
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
620
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
621
+ "license": "MIT",
622
+ "dependencies": {
623
+ "ms": "^2.1.3"
624
+ },
625
+ "engines": {
626
+ "node": ">=6.0"
627
+ },
628
+ "peerDependenciesMeta": {
629
+ "supports-color": {
630
+ "optional": true
631
+ }
632
+ }
633
+ },
634
+ "node_modules/fill-range": {
635
+ "version": "7.1.1",
636
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
637
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
638
+ "dev": true,
639
+ "license": "MIT",
640
+ "dependencies": {
641
+ "to-regex-range": "^5.0.1"
642
+ },
643
+ "engines": {
644
+ "node": ">=8"
645
+ }
646
+ },
647
+ "node_modules/finalhandler": {
648
+ "version": "2.1.1",
649
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
650
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
651
+ "license": "MIT",
652
+ "dependencies": {
653
+ "debug": "^4.4.0",
654
+ "encodeurl": "^2.0.0",
655
+ "escape-html": "^1.0.3",
656
+ "on-finished": "^2.4.1",
657
+ "parseurl": "^1.3.3",
658
+ "statuses": "^2.0.1"
659
+ },
660
+ "engines": {
661
+ "node": ">= 18.0.0"
662
+ },
663
+ "funding": {
664
+ "type": "opencollective",
665
+ "url": "https://opencollective.com/express"
666
+ }
667
+ },
668
+ "node_modules/finalhandler/node_modules/debug": {
669
+ "version": "4.4.3",
670
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
671
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
672
+ "license": "MIT",
673
+ "dependencies": {
674
+ "ms": "^2.1.3"
675
+ },
676
+ "engines": {
677
+ "node": ">=6.0"
678
+ },
679
+ "peerDependenciesMeta": {
680
+ "supports-color": {
681
+ "optional": true
682
+ }
683
+ }
684
+ },
685
+ "node_modules/forwarded": {
686
+ "version": "0.2.0",
687
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
688
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
689
+ "license": "MIT",
690
+ "engines": {
691
+ "node": ">= 0.6"
692
+ }
693
+ },
694
+ "node_modules/fresh": {
695
+ "version": "2.0.0",
696
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
697
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
698
+ "license": "MIT",
699
+ "engines": {
700
+ "node": ">= 0.8"
701
+ }
702
+ },
703
+ "node_modules/fsevents": {
704
+ "version": "2.3.3",
705
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
706
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
707
+ "dev": true,
708
+ "hasInstallScript": true,
709
+ "license": "MIT",
710
+ "optional": true,
711
+ "os": [
712
+ "darwin"
713
+ ],
714
+ "engines": {
715
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
716
+ }
717
+ },
718
+ "node_modules/function-bind": {
719
+ "version": "1.1.2",
720
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
721
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
722
+ "license": "MIT",
723
+ "funding": {
724
+ "url": "https://github.com/sponsors/ljharb"
725
+ }
726
+ },
727
+ "node_modules/get-intrinsic": {
728
+ "version": "1.3.0",
729
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
730
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
731
+ "license": "MIT",
732
+ "dependencies": {
733
+ "call-bind-apply-helpers": "^1.0.2",
734
+ "es-define-property": "^1.0.1",
735
+ "es-errors": "^1.3.0",
736
+ "es-object-atoms": "^1.1.1",
737
+ "function-bind": "^1.1.2",
738
+ "get-proto": "^1.0.1",
739
+ "gopd": "^1.2.0",
740
+ "has-symbols": "^1.1.0",
741
+ "hasown": "^2.0.2",
742
+ "math-intrinsics": "^1.1.0"
743
+ },
744
+ "engines": {
745
+ "node": ">= 0.4"
746
+ },
747
+ "funding": {
748
+ "url": "https://github.com/sponsors/ljharb"
749
+ }
750
+ },
751
+ "node_modules/get-proto": {
752
+ "version": "1.0.1",
753
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
754
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
755
+ "license": "MIT",
756
+ "dependencies": {
757
+ "dunder-proto": "^1.0.1",
758
+ "es-object-atoms": "^1.0.0"
759
+ },
760
+ "engines": {
761
+ "node": ">= 0.4"
762
+ }
763
+ },
764
+ "node_modules/glob-parent": {
765
+ "version": "5.1.2",
766
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
767
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
768
+ "dev": true,
769
+ "license": "ISC",
770
+ "dependencies": {
771
+ "is-glob": "^4.0.1"
772
+ },
773
+ "engines": {
774
+ "node": ">= 6"
775
+ }
776
+ },
777
+ "node_modules/gopd": {
778
+ "version": "1.2.0",
779
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
780
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
781
+ "license": "MIT",
782
+ "engines": {
783
+ "node": ">= 0.4"
784
+ },
785
+ "funding": {
786
+ "url": "https://github.com/sponsors/ljharb"
787
+ }
788
+ },
789
+ "node_modules/has-flag": {
790
+ "version": "3.0.0",
791
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
792
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
793
+ "dev": true,
794
+ "license": "MIT",
795
+ "engines": {
796
+ "node": ">=4"
797
+ }
798
+ },
799
+ "node_modules/has-symbols": {
800
+ "version": "1.1.0",
801
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
802
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
803
+ "license": "MIT",
804
+ "engines": {
805
+ "node": ">= 0.4"
806
+ },
807
+ "funding": {
808
+ "url": "https://github.com/sponsors/ljharb"
809
+ }
810
+ },
811
+ "node_modules/hasown": {
812
+ "version": "2.0.2",
813
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
814
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
815
+ "license": "MIT",
816
+ "dependencies": {
817
+ "function-bind": "^1.1.2"
818
+ },
819
+ "engines": {
820
+ "node": ">= 0.4"
821
+ }
822
+ },
823
+ "node_modules/helmet": {
824
+ "version": "8.1.0",
825
+ "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.1.0.tgz",
826
+ "integrity": "sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==",
827
+ "license": "MIT",
828
+ "engines": {
829
+ "node": ">=18.0.0"
830
+ }
831
+ },
832
+ "node_modules/http-errors": {
833
+ "version": "2.0.1",
834
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
835
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
836
+ "license": "MIT",
837
+ "dependencies": {
838
+ "depd": "~2.0.0",
839
+ "inherits": "~2.0.4",
840
+ "setprototypeof": "~1.2.0",
841
+ "statuses": "~2.0.2",
842
+ "toidentifier": "~1.0.1"
843
+ },
844
+ "engines": {
845
+ "node": ">= 0.8"
846
+ },
847
+ "funding": {
848
+ "type": "opencollective",
849
+ "url": "https://opencollective.com/express"
850
+ }
851
+ },
852
+ "node_modules/iconv-lite": {
853
+ "version": "0.7.2",
854
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
855
+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
856
+ "license": "MIT",
857
+ "dependencies": {
858
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
859
+ },
860
+ "engines": {
861
+ "node": ">=0.10.0"
862
+ },
863
+ "funding": {
864
+ "type": "opencollective",
865
+ "url": "https://opencollective.com/express"
866
+ }
867
+ },
868
+ "node_modules/ignore-by-default": {
869
+ "version": "1.0.1",
870
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
871
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
872
+ "dev": true,
873
+ "license": "ISC"
874
+ },
875
+ "node_modules/inherits": {
876
+ "version": "2.0.4",
877
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
878
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
879
+ "license": "ISC"
880
+ },
881
+ "node_modules/ipaddr.js": {
882
+ "version": "1.9.1",
883
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
884
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
885
+ "license": "MIT",
886
+ "engines": {
887
+ "node": ">= 0.10"
888
+ }
889
+ },
890
+ "node_modules/is-binary-path": {
891
+ "version": "2.1.0",
892
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
893
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
894
+ "dev": true,
895
+ "license": "MIT",
896
+ "dependencies": {
897
+ "binary-extensions": "^2.0.0"
898
+ },
899
+ "engines": {
900
+ "node": ">=8"
901
+ }
902
+ },
903
+ "node_modules/is-extglob": {
904
+ "version": "2.1.1",
905
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
906
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
907
+ "dev": true,
908
+ "license": "MIT",
909
+ "engines": {
910
+ "node": ">=0.10.0"
911
+ }
912
+ },
913
+ "node_modules/is-glob": {
914
+ "version": "4.0.3",
915
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
916
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
917
+ "dev": true,
918
+ "license": "MIT",
919
+ "dependencies": {
920
+ "is-extglob": "^2.1.1"
921
+ },
922
+ "engines": {
923
+ "node": ">=0.10.0"
924
+ }
925
+ },
926
+ "node_modules/is-number": {
927
+ "version": "7.0.0",
928
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
929
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
930
+ "dev": true,
931
+ "license": "MIT",
932
+ "engines": {
933
+ "node": ">=0.12.0"
934
+ }
935
+ },
936
+ "node_modules/is-promise": {
937
+ "version": "4.0.0",
938
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
939
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
940
+ "license": "MIT"
941
+ },
942
+ "node_modules/kareem": {
943
+ "version": "3.0.0",
944
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-3.0.0.tgz",
945
+ "integrity": "sha512-RKhaOBSPN8L7y4yAgNhDT2602G5FD6QbOIISbjN9D6mjHPeqeg7K+EB5IGSU5o81/X2Gzm3ICnAvQW3x3OP8HA==",
946
+ "license": "Apache-2.0",
947
+ "engines": {
948
+ "node": ">=18.0.0"
949
+ }
950
+ },
951
+ "node_modules/keygrip": {
952
+ "version": "1.1.0",
953
+ "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz",
954
+ "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==",
955
+ "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
956
+ "license": "MIT",
957
+ "dependencies": {
958
+ "tsscmp": "1.0.6"
959
+ },
960
+ "engines": {
961
+ "node": ">= 0.6"
962
+ }
963
+ },
964
+ "node_modules/lodash": {
965
+ "version": "4.17.23",
966
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
967
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
968
+ "license": "MIT"
969
+ },
970
+ "node_modules/math-intrinsics": {
971
+ "version": "1.1.0",
972
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
973
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
974
+ "license": "MIT",
975
+ "engines": {
976
+ "node": ">= 0.4"
977
+ }
978
+ },
979
+ "node_modules/media-typer": {
980
+ "version": "1.1.0",
981
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
982
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
983
+ "license": "MIT",
984
+ "engines": {
985
+ "node": ">= 0.8"
986
+ }
987
+ },
988
+ "node_modules/memory-pager": {
989
+ "version": "1.5.0",
990
+ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
991
+ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
992
+ "license": "MIT"
993
+ },
994
+ "node_modules/merge-descriptors": {
995
+ "version": "2.0.0",
996
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
997
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
998
+ "license": "MIT",
999
+ "engines": {
1000
+ "node": ">=18"
1001
+ },
1002
+ "funding": {
1003
+ "url": "https://github.com/sponsors/sindresorhus"
1004
+ }
1005
+ },
1006
+ "node_modules/mime-db": {
1007
+ "version": "1.54.0",
1008
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
1009
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
1010
+ "license": "MIT",
1011
+ "engines": {
1012
+ "node": ">= 0.6"
1013
+ }
1014
+ },
1015
+ "node_modules/mime-types": {
1016
+ "version": "3.0.2",
1017
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
1018
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
1019
+ "license": "MIT",
1020
+ "dependencies": {
1021
+ "mime-db": "^1.54.0"
1022
+ },
1023
+ "engines": {
1024
+ "node": ">=18"
1025
+ },
1026
+ "funding": {
1027
+ "type": "opencollective",
1028
+ "url": "https://opencollective.com/express"
1029
+ }
1030
+ },
1031
+ "node_modules/minimatch": {
1032
+ "version": "3.1.2",
1033
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
1034
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
1035
+ "dev": true,
1036
+ "license": "ISC",
1037
+ "dependencies": {
1038
+ "brace-expansion": "^1.1.7"
1039
+ },
1040
+ "engines": {
1041
+ "node": "*"
1042
+ }
1043
+ },
1044
+ "node_modules/mongodb": {
1045
+ "version": "7.0.0",
1046
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.0.0.tgz",
1047
+ "integrity": "sha512-vG/A5cQrvGGvZm2mTnCSz1LUcbOPl83hfB6bxULKQ8oFZauyox/2xbZOoGNl+64m8VBrETkdGCDBdOsCr3F3jg==",
1048
+ "license": "Apache-2.0",
1049
+ "dependencies": {
1050
+ "@mongodb-js/saslprep": "^1.3.0",
1051
+ "bson": "^7.0.0",
1052
+ "mongodb-connection-string-url": "^7.0.0"
1053
+ },
1054
+ "engines": {
1055
+ "node": ">=20.19.0"
1056
+ },
1057
+ "peerDependencies": {
1058
+ "@aws-sdk/credential-providers": "^3.806.0",
1059
+ "@mongodb-js/zstd": "^7.0.0",
1060
+ "gcp-metadata": "^7.0.1",
1061
+ "kerberos": "^7.0.0",
1062
+ "mongodb-client-encryption": ">=7.0.0 <7.1.0",
1063
+ "snappy": "^7.3.2",
1064
+ "socks": "^2.8.6"
1065
+ },
1066
+ "peerDependenciesMeta": {
1067
+ "@aws-sdk/credential-providers": {
1068
+ "optional": true
1069
+ },
1070
+ "@mongodb-js/zstd": {
1071
+ "optional": true
1072
+ },
1073
+ "gcp-metadata": {
1074
+ "optional": true
1075
+ },
1076
+ "kerberos": {
1077
+ "optional": true
1078
+ },
1079
+ "mongodb-client-encryption": {
1080
+ "optional": true
1081
+ },
1082
+ "snappy": {
1083
+ "optional": true
1084
+ },
1085
+ "socks": {
1086
+ "optional": true
1087
+ }
1088
+ }
1089
+ },
1090
+ "node_modules/mongodb-connection-string-url": {
1091
+ "version": "7.0.0",
1092
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-7.0.0.tgz",
1093
+ "integrity": "sha512-irhhjRVLE20hbkRl4zpAYLnDMM+zIZnp0IDB9akAFFUZp/3XdOfwwddc7y6cNvF2WCEtfTYRwYbIfYa2kVY0og==",
1094
+ "license": "Apache-2.0",
1095
+ "dependencies": {
1096
+ "@types/whatwg-url": "^13.0.0",
1097
+ "whatwg-url": "^14.1.0"
1098
+ },
1099
+ "engines": {
1100
+ "node": ">=20.19.0"
1101
+ }
1102
+ },
1103
+ "node_modules/mongoose": {
1104
+ "version": "9.1.5",
1105
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-9.1.5.tgz",
1106
+ "integrity": "sha512-N6gypEO+wLmZp8kCYNQmrEWxVMT0KhyHvVttBZoKA/1ngY7aUsBjqHzCPtDgz+i8JAnqMOiEKmuJIDEQu1b9Dw==",
1107
+ "license": "MIT",
1108
+ "dependencies": {
1109
+ "kareem": "3.0.0",
1110
+ "mongodb": "~7.0",
1111
+ "mpath": "0.9.0",
1112
+ "mquery": "6.0.0",
1113
+ "ms": "2.1.3",
1114
+ "sift": "17.1.3"
1115
+ },
1116
+ "engines": {
1117
+ "node": ">=20.19.0"
1118
+ },
1119
+ "funding": {
1120
+ "type": "opencollective",
1121
+ "url": "https://opencollective.com/mongoose"
1122
+ }
1123
+ },
1124
+ "node_modules/mpath": {
1125
+ "version": "0.9.0",
1126
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
1127
+ "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
1128
+ "license": "MIT",
1129
+ "engines": {
1130
+ "node": ">=4.0.0"
1131
+ }
1132
+ },
1133
+ "node_modules/mquery": {
1134
+ "version": "6.0.0",
1135
+ "resolved": "https://registry.npmjs.org/mquery/-/mquery-6.0.0.tgz",
1136
+ "integrity": "sha512-b2KQNsmgtkscfeDgkYMcWGn9vZI9YoXh802VDEwE6qc50zxBFQ0Oo8ROkawbPAsXCY1/Z1yp0MagqsZStPWJjw==",
1137
+ "license": "MIT",
1138
+ "engines": {
1139
+ "node": ">=20.19.0"
1140
+ }
1141
+ },
1142
+ "node_modules/ms": {
1143
+ "version": "2.1.3",
1144
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1145
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1146
+ "license": "MIT"
1147
+ },
1148
+ "node_modules/negotiator": {
1149
+ "version": "1.0.0",
1150
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
1151
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
1152
+ "license": "MIT",
1153
+ "engines": {
1154
+ "node": ">= 0.6"
1155
+ }
1156
+ },
1157
+ "node_modules/nodemon": {
1158
+ "version": "3.1.11",
1159
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.11.tgz",
1160
+ "integrity": "sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==",
1161
+ "dev": true,
1162
+ "license": "MIT",
1163
+ "dependencies": {
1164
+ "chokidar": "^3.5.2",
1165
+ "debug": "^4",
1166
+ "ignore-by-default": "^1.0.1",
1167
+ "minimatch": "^3.1.2",
1168
+ "pstree.remy": "^1.1.8",
1169
+ "semver": "^7.5.3",
1170
+ "simple-update-notifier": "^2.0.0",
1171
+ "supports-color": "^5.5.0",
1172
+ "touch": "^3.1.0",
1173
+ "undefsafe": "^2.0.5"
1174
+ },
1175
+ "bin": {
1176
+ "nodemon": "bin/nodemon.js"
1177
+ },
1178
+ "engines": {
1179
+ "node": ">=10"
1180
+ },
1181
+ "funding": {
1182
+ "type": "opencollective",
1183
+ "url": "https://opencollective.com/nodemon"
1184
+ }
1185
+ },
1186
+ "node_modules/nodemon/node_modules/debug": {
1187
+ "version": "4.4.3",
1188
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1189
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1190
+ "dev": true,
1191
+ "license": "MIT",
1192
+ "dependencies": {
1193
+ "ms": "^2.1.3"
1194
+ },
1195
+ "engines": {
1196
+ "node": ">=6.0"
1197
+ },
1198
+ "peerDependenciesMeta": {
1199
+ "supports-color": {
1200
+ "optional": true
1201
+ }
1202
+ }
1203
+ },
1204
+ "node_modules/normalize-path": {
1205
+ "version": "3.0.0",
1206
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1207
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1208
+ "dev": true,
1209
+ "license": "MIT",
1210
+ "engines": {
1211
+ "node": ">=0.10.0"
1212
+ }
1213
+ },
1214
+ "node_modules/oauth": {
1215
+ "version": "0.10.2",
1216
+ "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.10.2.tgz",
1217
+ "integrity": "sha512-JtFnB+8nxDEXgNyniwz573xxbKSOu3R8D40xQKqcjwJ2CDkYqUDI53o6IuzDJBx60Z8VKCm271+t8iFjakrl8Q==",
1218
+ "license": "MIT"
1219
+ },
1220
+ "node_modules/object-assign": {
1221
+ "version": "4.1.1",
1222
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
1223
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
1224
+ "license": "MIT",
1225
+ "engines": {
1226
+ "node": ">=0.10.0"
1227
+ }
1228
+ },
1229
+ "node_modules/object-inspect": {
1230
+ "version": "1.13.4",
1231
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
1232
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
1233
+ "license": "MIT",
1234
+ "engines": {
1235
+ "node": ">= 0.4"
1236
+ },
1237
+ "funding": {
1238
+ "url": "https://github.com/sponsors/ljharb"
1239
+ }
1240
+ },
1241
+ "node_modules/on-finished": {
1242
+ "version": "2.4.1",
1243
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
1244
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
1245
+ "license": "MIT",
1246
+ "dependencies": {
1247
+ "ee-first": "1.1.1"
1248
+ },
1249
+ "engines": {
1250
+ "node": ">= 0.8"
1251
+ }
1252
+ },
1253
+ "node_modules/on-headers": {
1254
+ "version": "1.1.0",
1255
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
1256
+ "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
1257
+ "license": "MIT",
1258
+ "engines": {
1259
+ "node": ">= 0.8"
1260
+ }
1261
+ },
1262
+ "node_modules/once": {
1263
+ "version": "1.4.0",
1264
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1265
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
1266
+ "license": "ISC",
1267
+ "dependencies": {
1268
+ "wrappy": "1"
1269
+ }
1270
+ },
1271
+ "node_modules/parseurl": {
1272
+ "version": "1.3.3",
1273
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
1274
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
1275
+ "license": "MIT",
1276
+ "engines": {
1277
+ "node": ">= 0.8"
1278
+ }
1279
+ },
1280
+ "node_modules/passport": {
1281
+ "version": "0.7.0",
1282
+ "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz",
1283
+ "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==",
1284
+ "license": "MIT",
1285
+ "dependencies": {
1286
+ "passport-strategy": "1.x.x",
1287
+ "pause": "0.0.1",
1288
+ "utils-merge": "^1.0.1"
1289
+ },
1290
+ "engines": {
1291
+ "node": ">= 0.4.0"
1292
+ },
1293
+ "funding": {
1294
+ "type": "github",
1295
+ "url": "https://github.com/sponsors/jaredhanson"
1296
+ }
1297
+ },
1298
+ "node_modules/passport-google-oauth20": {
1299
+ "version": "2.0.0",
1300
+ "resolved": "https://registry.npmjs.org/passport-google-oauth20/-/passport-google-oauth20-2.0.0.tgz",
1301
+ "integrity": "sha512-KSk6IJ15RoxuGq7D1UKK/8qKhNfzbLeLrG3gkLZ7p4A6DBCcv7xpyQwuXtWdpyR0+E0mwkpjY1VfPOhxQrKzdQ==",
1302
+ "license": "MIT",
1303
+ "dependencies": {
1304
+ "passport-oauth2": "1.x.x"
1305
+ },
1306
+ "engines": {
1307
+ "node": ">= 0.4.0"
1308
+ }
1309
+ },
1310
+ "node_modules/passport-oauth2": {
1311
+ "version": "1.8.0",
1312
+ "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.8.0.tgz",
1313
+ "integrity": "sha512-cjsQbOrXIDE4P8nNb3FQRCCmJJ/utnFKEz2NX209f7KOHPoX18gF7gBzBbLLsj2/je4KrgiwLLGjf0lm9rtTBA==",
1314
+ "license": "MIT",
1315
+ "dependencies": {
1316
+ "base64url": "3.x.x",
1317
+ "oauth": "0.10.x",
1318
+ "passport-strategy": "1.x.x",
1319
+ "uid2": "0.0.x",
1320
+ "utils-merge": "1.x.x"
1321
+ },
1322
+ "engines": {
1323
+ "node": ">= 0.4.0"
1324
+ },
1325
+ "funding": {
1326
+ "type": "github",
1327
+ "url": "https://github.com/sponsors/jaredhanson"
1328
+ }
1329
+ },
1330
+ "node_modules/passport-strategy": {
1331
+ "version": "1.0.0",
1332
+ "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz",
1333
+ "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==",
1334
+ "engines": {
1335
+ "node": ">= 0.4.0"
1336
+ }
1337
+ },
1338
+ "node_modules/path-to-regexp": {
1339
+ "version": "8.3.0",
1340
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
1341
+ "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
1342
+ "license": "MIT",
1343
+ "funding": {
1344
+ "type": "opencollective",
1345
+ "url": "https://opencollective.com/express"
1346
+ }
1347
+ },
1348
+ "node_modules/pause": {
1349
+ "version": "0.0.1",
1350
+ "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
1351
+ "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg=="
1352
+ },
1353
+ "node_modules/picomatch": {
1354
+ "version": "2.3.1",
1355
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
1356
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
1357
+ "dev": true,
1358
+ "license": "MIT",
1359
+ "engines": {
1360
+ "node": ">=8.6"
1361
+ },
1362
+ "funding": {
1363
+ "url": "https://github.com/sponsors/jonschlinkert"
1364
+ }
1365
+ },
1366
+ "node_modules/proxy-addr": {
1367
+ "version": "2.0.7",
1368
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
1369
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
1370
+ "license": "MIT",
1371
+ "dependencies": {
1372
+ "forwarded": "0.2.0",
1373
+ "ipaddr.js": "1.9.1"
1374
+ },
1375
+ "engines": {
1376
+ "node": ">= 0.10"
1377
+ }
1378
+ },
1379
+ "node_modules/pstree.remy": {
1380
+ "version": "1.1.8",
1381
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
1382
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
1383
+ "dev": true,
1384
+ "license": "MIT"
1385
+ },
1386
+ "node_modules/punycode": {
1387
+ "version": "2.3.1",
1388
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
1389
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
1390
+ "license": "MIT",
1391
+ "engines": {
1392
+ "node": ">=6"
1393
+ }
1394
+ },
1395
+ "node_modules/qs": {
1396
+ "version": "6.14.1",
1397
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
1398
+ "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
1399
+ "license": "BSD-3-Clause",
1400
+ "dependencies": {
1401
+ "side-channel": "^1.1.0"
1402
+ },
1403
+ "engines": {
1404
+ "node": ">=0.6"
1405
+ },
1406
+ "funding": {
1407
+ "url": "https://github.com/sponsors/ljharb"
1408
+ }
1409
+ },
1410
+ "node_modules/range-parser": {
1411
+ "version": "1.2.1",
1412
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
1413
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
1414
+ "license": "MIT",
1415
+ "engines": {
1416
+ "node": ">= 0.6"
1417
+ }
1418
+ },
1419
+ "node_modules/raw-body": {
1420
+ "version": "3.0.2",
1421
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
1422
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
1423
+ "license": "MIT",
1424
+ "dependencies": {
1425
+ "bytes": "~3.1.2",
1426
+ "http-errors": "~2.0.1",
1427
+ "iconv-lite": "~0.7.0",
1428
+ "unpipe": "~1.0.0"
1429
+ },
1430
+ "engines": {
1431
+ "node": ">= 0.10"
1432
+ }
1433
+ },
1434
+ "node_modules/readdirp": {
1435
+ "version": "3.6.0",
1436
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
1437
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
1438
+ "dev": true,
1439
+ "license": "MIT",
1440
+ "dependencies": {
1441
+ "picomatch": "^2.2.1"
1442
+ },
1443
+ "engines": {
1444
+ "node": ">=8.10.0"
1445
+ }
1446
+ },
1447
+ "node_modules/router": {
1448
+ "version": "2.2.0",
1449
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
1450
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
1451
+ "license": "MIT",
1452
+ "dependencies": {
1453
+ "debug": "^4.4.0",
1454
+ "depd": "^2.0.0",
1455
+ "is-promise": "^4.0.0",
1456
+ "parseurl": "^1.3.3",
1457
+ "path-to-regexp": "^8.0.0"
1458
+ },
1459
+ "engines": {
1460
+ "node": ">= 18"
1461
+ }
1462
+ },
1463
+ "node_modules/router/node_modules/debug": {
1464
+ "version": "4.4.3",
1465
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1466
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1467
+ "license": "MIT",
1468
+ "dependencies": {
1469
+ "ms": "^2.1.3"
1470
+ },
1471
+ "engines": {
1472
+ "node": ">=6.0"
1473
+ },
1474
+ "peerDependenciesMeta": {
1475
+ "supports-color": {
1476
+ "optional": true
1477
+ }
1478
+ }
1479
+ },
1480
+ "node_modules/safe-buffer": {
1481
+ "version": "5.2.1",
1482
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
1483
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
1484
+ "funding": [
1485
+ {
1486
+ "type": "github",
1487
+ "url": "https://github.com/sponsors/feross"
1488
+ },
1489
+ {
1490
+ "type": "patreon",
1491
+ "url": "https://www.patreon.com/feross"
1492
+ },
1493
+ {
1494
+ "type": "consulting",
1495
+ "url": "https://feross.org/support"
1496
+ }
1497
+ ],
1498
+ "license": "MIT"
1499
+ },
1500
+ "node_modules/safer-buffer": {
1501
+ "version": "2.1.2",
1502
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1503
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
1504
+ "license": "MIT"
1505
+ },
1506
+ "node_modules/semver": {
1507
+ "version": "7.7.3",
1508
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
1509
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
1510
+ "dev": true,
1511
+ "license": "ISC",
1512
+ "bin": {
1513
+ "semver": "bin/semver.js"
1514
+ },
1515
+ "engines": {
1516
+ "node": ">=10"
1517
+ }
1518
+ },
1519
+ "node_modules/send": {
1520
+ "version": "1.2.1",
1521
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
1522
+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
1523
+ "license": "MIT",
1524
+ "dependencies": {
1525
+ "debug": "^4.4.3",
1526
+ "encodeurl": "^2.0.0",
1527
+ "escape-html": "^1.0.3",
1528
+ "etag": "^1.8.1",
1529
+ "fresh": "^2.0.0",
1530
+ "http-errors": "^2.0.1",
1531
+ "mime-types": "^3.0.2",
1532
+ "ms": "^2.1.3",
1533
+ "on-finished": "^2.4.1",
1534
+ "range-parser": "^1.2.1",
1535
+ "statuses": "^2.0.2"
1536
+ },
1537
+ "engines": {
1538
+ "node": ">= 18"
1539
+ },
1540
+ "funding": {
1541
+ "type": "opencollective",
1542
+ "url": "https://opencollective.com/express"
1543
+ }
1544
+ },
1545
+ "node_modules/send/node_modules/debug": {
1546
+ "version": "4.4.3",
1547
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1548
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1549
+ "license": "MIT",
1550
+ "dependencies": {
1551
+ "ms": "^2.1.3"
1552
+ },
1553
+ "engines": {
1554
+ "node": ">=6.0"
1555
+ },
1556
+ "peerDependenciesMeta": {
1557
+ "supports-color": {
1558
+ "optional": true
1559
+ }
1560
+ }
1561
+ },
1562
+ "node_modules/serve-static": {
1563
+ "version": "2.2.1",
1564
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
1565
+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
1566
+ "license": "MIT",
1567
+ "dependencies": {
1568
+ "encodeurl": "^2.0.0",
1569
+ "escape-html": "^1.0.3",
1570
+ "parseurl": "^1.3.3",
1571
+ "send": "^1.2.0"
1572
+ },
1573
+ "engines": {
1574
+ "node": ">= 18"
1575
+ },
1576
+ "funding": {
1577
+ "type": "opencollective",
1578
+ "url": "https://opencollective.com/express"
1579
+ }
1580
+ },
1581
+ "node_modules/setprototypeof": {
1582
+ "version": "1.2.0",
1583
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1584
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
1585
+ "license": "ISC"
1586
+ },
1587
+ "node_modules/side-channel": {
1588
+ "version": "1.1.0",
1589
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
1590
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
1591
+ "license": "MIT",
1592
+ "dependencies": {
1593
+ "es-errors": "^1.3.0",
1594
+ "object-inspect": "^1.13.3",
1595
+ "side-channel-list": "^1.0.0",
1596
+ "side-channel-map": "^1.0.1",
1597
+ "side-channel-weakmap": "^1.0.2"
1598
+ },
1599
+ "engines": {
1600
+ "node": ">= 0.4"
1601
+ },
1602
+ "funding": {
1603
+ "url": "https://github.com/sponsors/ljharb"
1604
+ }
1605
+ },
1606
+ "node_modules/side-channel-list": {
1607
+ "version": "1.0.0",
1608
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
1609
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
1610
+ "license": "MIT",
1611
+ "dependencies": {
1612
+ "es-errors": "^1.3.0",
1613
+ "object-inspect": "^1.13.3"
1614
+ },
1615
+ "engines": {
1616
+ "node": ">= 0.4"
1617
+ },
1618
+ "funding": {
1619
+ "url": "https://github.com/sponsors/ljharb"
1620
+ }
1621
+ },
1622
+ "node_modules/side-channel-map": {
1623
+ "version": "1.0.1",
1624
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
1625
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
1626
+ "license": "MIT",
1627
+ "dependencies": {
1628
+ "call-bound": "^1.0.2",
1629
+ "es-errors": "^1.3.0",
1630
+ "get-intrinsic": "^1.2.5",
1631
+ "object-inspect": "^1.13.3"
1632
+ },
1633
+ "engines": {
1634
+ "node": ">= 0.4"
1635
+ },
1636
+ "funding": {
1637
+ "url": "https://github.com/sponsors/ljharb"
1638
+ }
1639
+ },
1640
+ "node_modules/side-channel-weakmap": {
1641
+ "version": "1.0.2",
1642
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
1643
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
1644
+ "license": "MIT",
1645
+ "dependencies": {
1646
+ "call-bound": "^1.0.2",
1647
+ "es-errors": "^1.3.0",
1648
+ "get-intrinsic": "^1.2.5",
1649
+ "object-inspect": "^1.13.3",
1650
+ "side-channel-map": "^1.0.1"
1651
+ },
1652
+ "engines": {
1653
+ "node": ">= 0.4"
1654
+ },
1655
+ "funding": {
1656
+ "url": "https://github.com/sponsors/ljharb"
1657
+ }
1658
+ },
1659
+ "node_modules/sift": {
1660
+ "version": "17.1.3",
1661
+ "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
1662
+ "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==",
1663
+ "license": "MIT"
1664
+ },
1665
+ "node_modules/simple-update-notifier": {
1666
+ "version": "2.0.0",
1667
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
1668
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
1669
+ "dev": true,
1670
+ "license": "MIT",
1671
+ "dependencies": {
1672
+ "semver": "^7.5.3"
1673
+ },
1674
+ "engines": {
1675
+ "node": ">=10"
1676
+ }
1677
+ },
1678
+ "node_modules/socket.io": {
1679
+ "version": "4.8.3",
1680
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.3.tgz",
1681
+ "integrity": "sha512-2Dd78bqzzjE6KPkD5fHZmDAKRNe3J15q+YHDrIsy9WEkqttc7GY+kT9OBLSMaPbQaEd0x1BjcmtMtXkfpc+T5A==",
1682
+ "license": "MIT",
1683
+ "dependencies": {
1684
+ "accepts": "~1.3.4",
1685
+ "base64id": "~2.0.0",
1686
+ "cors": "~2.8.5",
1687
+ "debug": "~4.4.1",
1688
+ "engine.io": "~6.6.0",
1689
+ "socket.io-adapter": "~2.5.2",
1690
+ "socket.io-parser": "~4.2.4"
1691
+ },
1692
+ "engines": {
1693
+ "node": ">=10.2.0"
1694
+ }
1695
+ },
1696
+ "node_modules/socket.io-adapter": {
1697
+ "version": "2.5.6",
1698
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.6.tgz",
1699
+ "integrity": "sha512-DkkO/dz7MGln0dHn5bmN3pPy+JmywNICWrJqVWiVOyvXjWQFIv9c2h24JrQLLFJ2aQVQf/Cvl1vblnd4r2apLQ==",
1700
+ "license": "MIT",
1701
+ "dependencies": {
1702
+ "debug": "~4.4.1",
1703
+ "ws": "~8.18.3"
1704
+ }
1705
+ },
1706
+ "node_modules/socket.io-adapter/node_modules/debug": {
1707
+ "version": "4.4.3",
1708
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1709
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1710
+ "license": "MIT",
1711
+ "dependencies": {
1712
+ "ms": "^2.1.3"
1713
+ },
1714
+ "engines": {
1715
+ "node": ">=6.0"
1716
+ },
1717
+ "peerDependenciesMeta": {
1718
+ "supports-color": {
1719
+ "optional": true
1720
+ }
1721
+ }
1722
+ },
1723
+ "node_modules/socket.io-parser": {
1724
+ "version": "4.2.5",
1725
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.5.tgz",
1726
+ "integrity": "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ==",
1727
+ "license": "MIT",
1728
+ "dependencies": {
1729
+ "@socket.io/component-emitter": "~3.1.0",
1730
+ "debug": "~4.4.1"
1731
+ },
1732
+ "engines": {
1733
+ "node": ">=10.0.0"
1734
+ }
1735
+ },
1736
+ "node_modules/socket.io-parser/node_modules/debug": {
1737
+ "version": "4.4.3",
1738
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1739
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1740
+ "license": "MIT",
1741
+ "dependencies": {
1742
+ "ms": "^2.1.3"
1743
+ },
1744
+ "engines": {
1745
+ "node": ">=6.0"
1746
+ },
1747
+ "peerDependenciesMeta": {
1748
+ "supports-color": {
1749
+ "optional": true
1750
+ }
1751
+ }
1752
+ },
1753
+ "node_modules/socket.io/node_modules/accepts": {
1754
+ "version": "1.3.8",
1755
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
1756
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
1757
+ "license": "MIT",
1758
+ "dependencies": {
1759
+ "mime-types": "~2.1.34",
1760
+ "negotiator": "0.6.3"
1761
+ },
1762
+ "engines": {
1763
+ "node": ">= 0.6"
1764
+ }
1765
+ },
1766
+ "node_modules/socket.io/node_modules/debug": {
1767
+ "version": "4.4.3",
1768
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1769
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1770
+ "license": "MIT",
1771
+ "dependencies": {
1772
+ "ms": "^2.1.3"
1773
+ },
1774
+ "engines": {
1775
+ "node": ">=6.0"
1776
+ },
1777
+ "peerDependenciesMeta": {
1778
+ "supports-color": {
1779
+ "optional": true
1780
+ }
1781
+ }
1782
+ },
1783
+ "node_modules/socket.io/node_modules/mime-db": {
1784
+ "version": "1.52.0",
1785
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
1786
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
1787
+ "license": "MIT",
1788
+ "engines": {
1789
+ "node": ">= 0.6"
1790
+ }
1791
+ },
1792
+ "node_modules/socket.io/node_modules/mime-types": {
1793
+ "version": "2.1.35",
1794
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
1795
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
1796
+ "license": "MIT",
1797
+ "dependencies": {
1798
+ "mime-db": "1.52.0"
1799
+ },
1800
+ "engines": {
1801
+ "node": ">= 0.6"
1802
+ }
1803
+ },
1804
+ "node_modules/socket.io/node_modules/negotiator": {
1805
+ "version": "0.6.3",
1806
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
1807
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
1808
+ "license": "MIT",
1809
+ "engines": {
1810
+ "node": ">= 0.6"
1811
+ }
1812
+ },
1813
+ "node_modules/sparse-bitfield": {
1814
+ "version": "3.0.3",
1815
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
1816
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
1817
+ "license": "MIT",
1818
+ "dependencies": {
1819
+ "memory-pager": "^1.0.2"
1820
+ }
1821
+ },
1822
+ "node_modules/statuses": {
1823
+ "version": "2.0.2",
1824
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
1825
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
1826
+ "license": "MIT",
1827
+ "engines": {
1828
+ "node": ">= 0.8"
1829
+ }
1830
+ },
1831
+ "node_modules/supports-color": {
1832
+ "version": "5.5.0",
1833
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1834
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1835
+ "dev": true,
1836
+ "license": "MIT",
1837
+ "dependencies": {
1838
+ "has-flag": "^3.0.0"
1839
+ },
1840
+ "engines": {
1841
+ "node": ">=4"
1842
+ }
1843
+ },
1844
+ "node_modules/to-regex-range": {
1845
+ "version": "5.0.1",
1846
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1847
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1848
+ "dev": true,
1849
+ "license": "MIT",
1850
+ "dependencies": {
1851
+ "is-number": "^7.0.0"
1852
+ },
1853
+ "engines": {
1854
+ "node": ">=8.0"
1855
+ }
1856
+ },
1857
+ "node_modules/toidentifier": {
1858
+ "version": "1.0.1",
1859
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1860
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
1861
+ "license": "MIT",
1862
+ "engines": {
1863
+ "node": ">=0.6"
1864
+ }
1865
+ },
1866
+ "node_modules/touch": {
1867
+ "version": "3.1.1",
1868
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
1869
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
1870
+ "dev": true,
1871
+ "license": "ISC",
1872
+ "bin": {
1873
+ "nodetouch": "bin/nodetouch.js"
1874
+ }
1875
+ },
1876
+ "node_modules/tr46": {
1877
+ "version": "5.1.1",
1878
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",
1879
+ "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",
1880
+ "license": "MIT",
1881
+ "dependencies": {
1882
+ "punycode": "^2.3.1"
1883
+ },
1884
+ "engines": {
1885
+ "node": ">=18"
1886
+ }
1887
+ },
1888
+ "node_modules/tsscmp": {
1889
+ "version": "1.0.6",
1890
+ "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz",
1891
+ "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==",
1892
+ "license": "MIT",
1893
+ "engines": {
1894
+ "node": ">=0.6.x"
1895
+ }
1896
+ },
1897
+ "node_modules/type-is": {
1898
+ "version": "2.0.1",
1899
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
1900
+ "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
1901
+ "license": "MIT",
1902
+ "dependencies": {
1903
+ "content-type": "^1.0.5",
1904
+ "media-typer": "^1.1.0",
1905
+ "mime-types": "^3.0.0"
1906
+ },
1907
+ "engines": {
1908
+ "node": ">= 0.6"
1909
+ }
1910
+ },
1911
+ "node_modules/uid2": {
1912
+ "version": "0.0.4",
1913
+ "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.4.tgz",
1914
+ "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==",
1915
+ "license": "MIT"
1916
+ },
1917
+ "node_modules/undefsafe": {
1918
+ "version": "2.0.5",
1919
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
1920
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
1921
+ "dev": true,
1922
+ "license": "MIT"
1923
+ },
1924
+ "node_modules/undici-types": {
1925
+ "version": "7.16.0",
1926
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
1927
+ "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
1928
+ "license": "MIT"
1929
+ },
1930
+ "node_modules/unpipe": {
1931
+ "version": "1.0.0",
1932
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1933
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
1934
+ "license": "MIT",
1935
+ "engines": {
1936
+ "node": ">= 0.8"
1937
+ }
1938
+ },
1939
+ "node_modules/utils-merge": {
1940
+ "version": "1.0.1",
1941
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1942
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
1943
+ "license": "MIT",
1944
+ "engines": {
1945
+ "node": ">= 0.4.0"
1946
+ }
1947
+ },
1948
+ "node_modules/vary": {
1949
+ "version": "1.1.2",
1950
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1951
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
1952
+ "license": "MIT",
1953
+ "engines": {
1954
+ "node": ">= 0.8"
1955
+ }
1956
+ },
1957
+ "node_modules/webidl-conversions": {
1958
+ "version": "7.0.0",
1959
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
1960
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
1961
+ "license": "BSD-2-Clause",
1962
+ "engines": {
1963
+ "node": ">=12"
1964
+ }
1965
+ },
1966
+ "node_modules/whatwg-url": {
1967
+ "version": "14.2.0",
1968
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
1969
+ "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",
1970
+ "license": "MIT",
1971
+ "dependencies": {
1972
+ "tr46": "^5.1.0",
1973
+ "webidl-conversions": "^7.0.0"
1974
+ },
1975
+ "engines": {
1976
+ "node": ">=18"
1977
+ }
1978
+ },
1979
+ "node_modules/wrappy": {
1980
+ "version": "1.0.2",
1981
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1982
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
1983
+ "license": "ISC"
1984
+ },
1985
+ "node_modules/ws": {
1986
+ "version": "8.18.3",
1987
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
1988
+ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
1989
+ "license": "MIT",
1990
+ "engines": {
1991
+ "node": ">=10.0.0"
1992
+ },
1993
+ "peerDependencies": {
1994
+ "bufferutil": "^4.0.1",
1995
+ "utf-8-validate": ">=5.0.2"
1996
+ },
1997
+ "peerDependenciesMeta": {
1998
+ "bufferutil": {
1999
+ "optional": true
2000
+ },
2001
+ "utf-8-validate": {
2002
+ "optional": true
2003
+ }
2004
+ }
2005
+ }
2006
+ }
2007
+ }
package.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cragy-server",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "start": "node src/index.js",
8
+ "dev": "nodemon src/index.js"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "description": "",
14
+ "dependencies": {
15
+ "cloudinary": "^2.9.0",
16
+ "cookie-session": "^2.1.1",
17
+ "cors": "^2.8.6",
18
+ "dotenv": "^17.2.3",
19
+ "express": "^5.2.1",
20
+ "helmet": "^8.1.0",
21
+ "mongoose": "^9.1.5",
22
+ "passport": "^0.7.0",
23
+ "passport-google-oauth20": "^2.0.0",
24
+ "socket.io": "^4.8.3"
25
+ },
26
+ "devDependencies": {
27
+ "nodemon": "^3.1.11"
28
+ }
29
+ }
src/config/cloudinary.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { v2 as cloudinary } from 'cloudinary';
2
+ import dotenv from 'dotenv';
3
+ dotenv.config();
4
+
5
+ cloudinary.config({
6
+ cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
7
+ api_key: process.env.CLOUDINARY_API_KEY,
8
+ api_secret: process.env.CLOUDINARY_API_SECRET,
9
+ });
10
+
11
+ export default cloudinary;
src/config/db.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import mongoose from 'mongoose';
2
+
3
+ const connectDB = async () => {
4
+ try {
5
+ const conn = await mongoose.connect(process.env.MONGO_URI);
6
+ console.log(`✅ MongoDB Connected: ${conn.connection.host}`);
7
+ } catch (error) {
8
+ console.error(`❌ Error: ${error.message}`);
9
+ process.exit(1);
10
+ }
11
+ };
12
+
13
+ export default connectDB;
src/config/passport.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import passport from 'passport';
2
+ import { Strategy as GoogleStrategy } from 'passport-google-oauth20';
3
+ import User from '../models/User.js';
4
+
5
+ passport.serializeUser((user, done) => {
6
+ done(null, user.id); // Save only ID to session
7
+ });
8
+
9
+ passport.deserializeUser(async (id, done) => {
10
+ try {
11
+ const user = await User.findById(id);
12
+ done(null, user); // Attach full user object to req.user
13
+ } catch (err) {
14
+ done(err, null);
15
+ }
16
+ });
17
+
18
+ passport.use(
19
+ new GoogleStrategy(
20
+ {
21
+ clientID: process.env.GOOGLE_CLIENT_ID,
22
+ clientSecret: process.env.GOOGLE_CLIENT_SECRET,
23
+ callbackURL: '/auth/google/callback',
24
+ proxy: true // Important for Cloudflare/HuggingFace proxies
25
+ },
26
+ async (accessToken, refreshToken, profile, done) => {
27
+ try {
28
+ // Check if user exists
29
+ const existingUser = await User.findOne({ googleId: profile.id });
30
+
31
+ if (existingUser) {
32
+ return done(null, existingUser);
33
+ }
34
+
35
+ // Create new user
36
+ const newUser = await new User({
37
+ googleId: profile.id,
38
+ email: profile.emails[0].value,
39
+ displayName: profile.displayName,
40
+ firstName: profile.name.givenName,
41
+ lastName: profile.name.familyName
42
+ }).save();
43
+
44
+ done(null, newUser);
45
+ } catch (err) {
46
+ console.error("Auth Error:", err);
47
+ done(err, null);
48
+ }
49
+ }
50
+ )
51
+ );
src/index.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import 'dotenv/config';
2
+ import express from 'express';
3
+ import mongoose from 'mongoose';
4
+ import cookieSession from 'cookie-session';
5
+ import passport from 'passport';
6
+ import cors from 'cors';
7
+ import helmet from 'helmet';
8
+ import { createServer } from 'http'; // REQUIRED for Socket.io
9
+
10
+ // Config
11
+ import connectDB from './config/db.js';
12
+ import './config/passport.js'; // Execute passport config
13
+ import authRoutes from './routes/authRoutes.js';
14
+ import userRoutes from './routes/userRoutes.js';
15
+ import friendRoutes from './routes/friendRoutes.js';
16
+ import { initSocket } from './services/SocketManager.js';
17
+
18
+ // Connect to DB
19
+ connectDB();
20
+
21
+ const app = express();
22
+
23
+ // Security Middleware
24
+ app.use(helmet());
25
+ app.use(cors({
26
+ origin: process.env.CLIENT_URL || "http://localhost:5173",
27
+ methods: "GET,POST,PUT,DELETE",
28
+ credentials: true // Allow cookies
29
+ }));
30
+
31
+ // Body Parsers
32
+ app.use(express.json());
33
+
34
+ // Session Middleware (Encryption for Cookie)
35
+ app.use(
36
+ cookieSession({
37
+ name: 'cragy_session',
38
+ maxAge: 30 * 24 * 60 * 60 * 1000,
39
+ keys: [process.env.COOKIE_KEY],
40
+
41
+ httpOnly: true,
42
+ secure: process.env.NODE_ENV === 'production',
43
+ sameSite: 'lax',
44
+ })
45
+ );
46
+
47
+
48
+ app.use((req, res, next) => {
49
+ if (req.session && !req.session.regenerate) {
50
+ req.session.regenerate = (cb) => {
51
+ cb();
52
+ };
53
+ }
54
+ if (req.session && !req.session.save) {
55
+ req.session.save = (cb) => {
56
+ cb();
57
+ };
58
+ }
59
+ next();
60
+ });
61
+
62
+ // Passport Middleware
63
+ app.use(passport.initialize());
64
+ app.use(passport.session());
65
+
66
+ // Routes
67
+ app.use('/auth', authRoutes);
68
+ app.use('/api/user', userRoutes);
69
+ app.use('/api/friends', friendRoutes);
70
+
71
+ app.get('/', (req, res) => {
72
+ res.send({ status: 'Online', user: req.user });
73
+ });
74
+
75
+ const httpServer = createServer(app); // Wrap Express
76
+ initSocket(httpServer); // Initialize Socket
77
+
78
+ const PORT = process.env.PORT || 3000;
79
+ httpServer.listen(PORT, () => { // Listen on httpServer, NOT app
80
+ console.log(`🚀 Server + Socket running on port ${PORT}`);
81
+ });
src/middleware/requireAdmin.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ export const requireAdmin = (req, res, next) => {
2
+ if (!req.user || req.user.role !== 'admin') {
3
+ return res.status(403).send({ error: 'Admin only' });
4
+ }
5
+ next();
6
+ };
7
+
src/models/CallSession.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import mongoose from 'mongoose';
2
+
3
+ const sessionSchema = new mongoose.Schema({
4
+ participants: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User' }],
5
+ startTime: { type: Date, default: Date.now },
6
+ endTime: Date,
7
+ durationSeconds: Number,
8
+ endedBy: { type: mongoose.Schema.Types.ObjectId, ref: 'User' }, // Null if network drop
9
+ status: { type: String, enum: ['active', 'completed', 'dropped'], default: 'active' }
10
+ }, { timestamps: true });
11
+
12
+ export default mongoose.model('CallSession', sessionSchema);
src/models/Message.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import mongoose from 'mongoose';
2
+
3
+ const messageSchema = new mongoose.Schema({
4
+ sender: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
5
+ receiver: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
6
+ content: { type: String, required: true, trim: true },
7
+ read: { type: Boolean, default: false }
8
+ }, { timestamps: true });
9
+
10
+ export default mongoose.model('Message', messageSchema);
src/models/SupportTicket.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import mongoose from 'mongoose';
2
+
3
+ const supportTicketSchema = new mongoose.Schema(
4
+ {
5
+ email: {
6
+ type: String,
7
+ required: true,
8
+ trim: true,
9
+ },
10
+ category: {
11
+ type: String,
12
+ enum: ['General Inquiry', 'Report a User', 'Bug Report', 'Account Issue'],
13
+ default: 'General Inquiry',
14
+ },
15
+ message: {
16
+ type: String,
17
+ required: true,
18
+ },
19
+ user: {
20
+ type: mongoose.Schema.Types.ObjectId,
21
+ ref: 'User',
22
+ required: false, // allow non-logged-in contact if needed later
23
+ },
24
+ status: {
25
+ type: String,
26
+ enum: ['open', 'resolved'],
27
+ default: 'open',
28
+ },
29
+ },
30
+ { timestamps: true }
31
+ );
32
+
33
+ export default mongoose.model('SupportTicket', supportTicketSchema);
34
+
src/models/User.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import mongoose from 'mongoose';
2
+
3
+ const userSchema = new mongoose.Schema({
4
+ googleId: {
5
+ type: String,
6
+ required: true,
7
+ unique: true,
8
+ },
9
+ email: {
10
+ type: String,
11
+ required: true,
12
+ unique: true,
13
+ },
14
+ displayName: String,
15
+ firstName: String,
16
+ lastName: String,
17
+
18
+ role: { type: String, default: 'user' },
19
+
20
+ // Profile Details (Filled during Onboarding)
21
+ profile: {
22
+ isComplete: { type: Boolean, default: false },
23
+ college: { type: String, default: '' },
24
+ city: { type: String, default: '' },
25
+ gender: { type: String, enum: ['Male', 'Female', 'Non-binary', ''], default: '' },
26
+ relationshipStatus: { type: String, default: '' },
27
+ photos: [String], // Array of Cloudinary URLs
28
+ bio: { type: String, maxlength: 100 },
29
+ socials: {
30
+ instagram: { type: String, default: '' },
31
+ snapchat: { type: String, default: '' },
32
+ whatsapp: { type: String, default: '' } // Optional per Bible
33
+ }
34
+ },
35
+
36
+ // The Cragy Safety Engine
37
+ karma: {
38
+ type: Number,
39
+ default: 60, // Starts in "Normal" range (50-79)
40
+ min: 0,
41
+ max: 100
42
+ },
43
+
44
+ flags: {
45
+ nsfwCount: { type: Number, default: 0 },
46
+ reportsReceived: { type: Number, default: 0 },
47
+ isBanned: { type: Boolean, default: false }
48
+ },
49
+
50
+ // Social Layer
51
+ friends: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User' }],
52
+ friendRequests: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User' }]
53
+
54
+ }, { timestamps: true });
55
+
56
+ export default mongoose.model('User', userSchema);
src/routes/authRoutes.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import express from 'express';
2
+ import passport from 'passport';
3
+
4
+ const router = express.Router();
5
+
6
+ // 1. Initiate Google Auth
7
+ router.get(
8
+ '/google',
9
+ passport.authenticate('google', {
10
+ scope: ['profile', 'email']
11
+ })
12
+ );
13
+
14
+ // 2. Callback handling
15
+ router.get(
16
+ '/google/callback',
17
+ passport.authenticate('google', { failureRedirect: '/' }),
18
+ (req, res) => {
19
+ // If onboarding is incomplete, go to onboarding. Else, dashboard.
20
+ // Since frontend handles routing, we redirect to a check page or dashboard.
21
+ // For MVP, we redirect to Client Root.
22
+ res.redirect(process.env.CLIENT_URL || 'http://localhost:5173');
23
+ }
24
+ );
25
+
26
+ // 3. Get Current User (Frontend calls this to see who is logged in)
27
+ router.get('/current_user', (req, res) => {
28
+ res.set('Cache-Control', 'no-store');
29
+ res.status(200).json(req.user || null);
30
+ });
31
+
32
+
33
+
34
+ // 4. Logout
35
+ router.post('/logout', (req, res) => {
36
+ req.logout(() => {
37
+ req.session = null;
38
+ res.clearCookie('cragy_session');
39
+ res.status(200).json({ success: true });
40
+ });
41
+ });
42
+
43
+ export default router;
src/routes/friendRoutes.js ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import express from 'express';
2
+ import User from '../models/User.js';
3
+ import Message from '../models/Message.js';
4
+
5
+ const router = express.Router();
6
+
7
+ const requireAuth = (req, res, next) => {
8
+ if (!req.user) return res.status(401).send({ error: 'Unauthorized' });
9
+ next();
10
+ };
11
+
12
+ // 0. Get My Network (Friends & Requests)
13
+ router.get('/network', requireAuth, async (req, res) => {
14
+ try {
15
+ const user = await User.findById(req.user._id)
16
+ .populate('friends', 'displayName profile.college profile.photos karma profile.city')
17
+ .populate('friendRequests', 'displayName profile.college profile.photos karma profile.city');
18
+
19
+ res.send({
20
+ friends: user.friends,
21
+ requests: user.friendRequests
22
+ });
23
+ } catch (err) {
24
+ res.status(500).send({ error: 'Fetch failed' });
25
+ }
26
+ });
27
+
28
+
29
+ // 1. Search Users (by Name or College)
30
+ router.get('/search', requireAuth, async (req, res) => {
31
+ const { query } = req.query;
32
+ if (!query) return res.send([]);
33
+
34
+ try {
35
+ const users = await User.find({
36
+ $or: [
37
+ { displayName: { $regex: query, $options: 'i' } },
38
+ { 'profile.college': { $regex: query, $options: 'i' } }
39
+ ],
40
+ _id: { $ne: req.user._id } // Exclude self
41
+ }).select('displayName profile.college profile.photos karma'); // minimal data
42
+
43
+ res.send(users);
44
+ } catch (err) {
45
+ res.status(500).send({ error: 'Search failed' });
46
+ }
47
+ });
48
+
49
+ // 2. Send Friend Request
50
+ router.post('/request/:id', requireAuth, async (req, res) => {
51
+ try {
52
+ const target = await User.findById(req.params.id);
53
+ if (!target) return res.status(404).send('User not found');
54
+
55
+ // Check duplicates
56
+ if (target.friendRequests.includes(req.user._id) || target.friends.includes(req.user._id)) {
57
+ return res.status(400).send('Request already pending or accepted');
58
+ }
59
+
60
+ target.friendRequests.push(req.user._id);
61
+ await target.save();
62
+
63
+ res.send({ success: true });
64
+ } catch (err) {
65
+ res.status(500).send({ error: 'Request failed' });
66
+ }
67
+ });
68
+
69
+ // 3. Accept Friend Request
70
+ router.post('/accept/:id', requireAuth, async (req, res) => {
71
+ try {
72
+ const sender = await User.findById(req.params.id);
73
+ const me = await User.findById(req.user._id);
74
+
75
+ if (!me.friendRequests.includes(sender._id)) {
76
+ return res.status(400).send('No request found');
77
+ }
78
+
79
+ // Add to both friends lists
80
+ me.friends.push(sender._id);
81
+ sender.friends.push(me._id);
82
+
83
+ // Remove request
84
+ me.friendRequests = me.friendRequests.filter(id => !id.equals(sender._id));
85
+
86
+ await me.save();
87
+ await sender.save();
88
+
89
+ res.send({ success: true });
90
+ } catch (err) {
91
+ res.status(500).send({ error: 'Accept failed' });
92
+ }
93
+ });
94
+
95
+ // 4. Get Chat History
96
+ router.get('/messages/:friendId', requireAuth, async (req, res) => {
97
+ try {
98
+ const messages = await Message.find({
99
+ $or: [
100
+ { sender: req.user._id, receiver: req.params.friendId },
101
+ { sender: req.params.friendId, receiver: req.user._id }
102
+ ]
103
+ }).sort({ createdAt: 1 }); // Oldest first
104
+
105
+ res.send(messages);
106
+ } catch (err) {
107
+ res.status(500).send({ error: 'Fetch failed' });
108
+ }
109
+ });
110
+
111
+ // 5. Remove Friend
112
+ router.post('/remove/:id', requireAuth, async (req, res) => {
113
+ try {
114
+ const friend = await User.findById(req.params.id);
115
+ const me = await User.findById(req.user._id);
116
+
117
+ if (!friend) return res.status(404).send('User not found');
118
+
119
+ // Remove from both sides
120
+ me.friends = me.friends.filter(id => !id.equals(friend._id));
121
+ friend.friends = friend.friends.filter(id => !id.equals(me._id));
122
+
123
+ await me.save();
124
+ await friend.save();
125
+
126
+ res.send({ success: true });
127
+ } catch (err) {
128
+ res.status(500).send({ error: 'Remove failed' });
129
+ }
130
+ });
131
+
132
+ export default router;
src/routes/userRoutes.js ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import express from 'express';
2
+ import cloudinary from '../config/cloudinary.js';
3
+ import User from '../models/User.js';
4
+ import { updateKarma } from '../services/KarmaService.js';
5
+ import CallSession from '../models/CallSession.js';
6
+ import SupportTicket from '../models/SupportTicket.js';
7
+ import { requireAdmin } from '../middleware/requireAdmin.js';
8
+
9
+ const router = express.Router();
10
+
11
+ // Middleware to check auth
12
+ const requireAuth = (req, res, next) => {
13
+ if (!req.user) return res.status(401).send({ error: 'You must log in!' });
14
+ next();
15
+ };
16
+
17
+ // 1. Get Cloudinary Signature (Secure Upload)
18
+ router.get('/upload-signature', requireAuth, (req, res) => {
19
+ const timestamp = Math.round((new Date()).getTime() / 1000);
20
+
21
+ const signature = cloudinary.utils.api_sign_request({
22
+ timestamp: timestamp,
23
+ folder: 'cragy_profiles',
24
+ }, process.env.CLOUDINARY_API_SECRET);
25
+
26
+ res.json({
27
+ signature,
28
+ timestamp,
29
+ cloudName: process.env.CLOUDINARY_CLOUD_NAME,
30
+ apiKey: process.env.CLOUDINARY_API_KEY
31
+ });
32
+ });
33
+
34
+ // 2. Update Profile (Finalize Onboarding)
35
+ router.post('/update-profile', requireAuth, async (req, res) => {
36
+ try {
37
+ const user = await User.findById(req.user._id);
38
+ if (!user) return res.status(404).send({ error: 'User not found' });
39
+
40
+ const {
41
+ gender,
42
+ college,
43
+ city,
44
+ relationshipStatus,
45
+ photos,
46
+ bio,
47
+ socials
48
+ } = req.body;
49
+
50
+ // ✅ Update ONLY provided fields
51
+ if (gender !== undefined) user.profile.gender = gender;
52
+ if (college !== undefined) user.profile.college = college;
53
+ if (city !== undefined) user.profile.city = city;
54
+ if (relationshipStatus !== undefined) user.profile.relationshipStatus = relationshipStatus;
55
+ if (photos !== undefined) user.profile.photos = photos;
56
+ if (bio !== undefined) user.profile.bio = bio;
57
+ if (socials !== undefined) user.profile.socials = socials;
58
+
59
+ // ✅ Only enforce completion rules once
60
+ if (!user.profile.isComplete) {
61
+ if (!user.profile.gender || !user.profile.college || !user.profile.photos?.length) {
62
+ return res.status(400).send({ error: 'Missing required onboarding fields' });
63
+ }
64
+ user.profile.isComplete = true;
65
+ }
66
+
67
+ await user.save();
68
+ res.send(user);
69
+ } catch (err) {
70
+ console.error(err);
71
+ res.status(500).send({ error: 'Update failed' });
72
+ }
73
+ });
74
+
75
+
76
+ // 3. Rate a User (Post-Call)
77
+ router.post('/rate', requireAuth, async (req, res) => {
78
+ const { targetUserId, rating } = req.body; // rating: 'UP' or 'DOWN'
79
+
80
+ if (!targetUserId || !rating) return res.status(400).send({ error: 'Invalid data' });
81
+
82
+ // Prevent rating yourself
83
+ if (req.user._id.toString() === targetUserId) {
84
+ return res.status(400).send({ error: "Cannot rate yourself" });
85
+ }
86
+
87
+ try {
88
+ if (rating === 'UP') {
89
+ await updateKarma(targetUserId, 1, 'Good Conversation');
90
+ } else if (rating === 'DOWN') {
91
+ await updateKarma(targetUserId, -5, 'Bad Experience');
92
+ }
93
+
94
+ res.send({ success: true });
95
+ } catch (err) {
96
+ res.status(500).send({ error: 'Rating failed' });
97
+ }
98
+ });
99
+
100
+ // 4. Get Missed Connection
101
+ router.get('/recent-match', requireAuth, async (req, res) => {
102
+ try {
103
+ // Find the most recent session involving this user that ended < 5 minutes ago
104
+ const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000);
105
+
106
+ const lastSession = await CallSession.findOne({
107
+ participants: req.user._id,
108
+ endTime: { $gte: fiveMinutesAgo }
109
+ })
110
+ .sort({ endTime: -1 })
111
+ .populate('participants', 'displayName profile.photos'); // Get partner details
112
+
113
+ if (!lastSession) return res.send(null);
114
+
115
+ // Identify the partner
116
+ const partner = lastSession.participants.find(p => !p._id.equals(req.user._id));
117
+
118
+ res.send({
119
+ sessionId: lastSession._id,
120
+ partner: {
121
+ _id: partner._id,
122
+ name: partner.displayName,
123
+ photo: partner.profile.photos[0]
124
+ }
125
+ });
126
+ } catch (err) {
127
+ res.status(500).send({ error: 'Fetch failed' });
128
+ }
129
+ });
130
+
131
+ // 5. Contact Support
132
+ router.post('/contact', async (req, res) => {
133
+ const { email, message, category } = req.body;
134
+
135
+ if (!email || !message) {
136
+ return res.status(400).send({ error: 'Missing required fields' });
137
+ }
138
+
139
+ try {
140
+ const ticket = await SupportTicket.create({
141
+ email,
142
+ message,
143
+ category,
144
+ user: req.user?._id || null,
145
+ });
146
+
147
+ console.log(`📩 Support ticket saved: ${ticket._id}`);
148
+
149
+ res.send({ success: true });
150
+ } catch (err) {
151
+ console.error('Support ticket failed', err);
152
+ res.status(500).send({ error: 'Failed to submit ticket' });
153
+ }
154
+ });
155
+
156
+ // ADMIN: Get all support tickets
157
+ router.get(
158
+ '/admin/support-tickets',
159
+ requireAuth,
160
+ requireAdmin,
161
+ async (req, res) => {
162
+ try {
163
+ const tickets = await SupportTicket.find()
164
+ .sort({ createdAt: -1 })
165
+ .populate('user', 'displayName email');
166
+
167
+ res.send(tickets);
168
+ } catch (err) {
169
+ res.status(500).send({ error: 'Failed to load tickets' });
170
+ }
171
+ }
172
+ );
173
+
174
+ // ADMIN: Update ticket status
175
+ router.post(
176
+ '/admin/support-tickets/:id/status',
177
+ requireAuth,
178
+ requireAdmin,
179
+ async (req, res) => {
180
+ const { status } = req.body;
181
+
182
+ if (!['open', 'resolved'].includes(status)) {
183
+ return res.status(400).send({ error: 'Invalid status' });
184
+ }
185
+
186
+ try {
187
+ const ticket = await SupportTicket.findByIdAndUpdate(
188
+ req.params.id,
189
+ { status },
190
+ { new: true }
191
+ );
192
+
193
+ res.send(ticket);
194
+ } catch (err) {
195
+ res.status(500).send({ error: 'Failed to update ticket' });
196
+ }
197
+ }
198
+ );
199
+
200
+
201
+ export default router;
src/services/KarmaService.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import User from '../models/User.js';
2
+
3
+ export const updateKarma = async (userId, change, reason) => {
4
+ try {
5
+ const user = await User.findById(userId);
6
+ if (!user) return;
7
+
8
+ // Calculate new score
9
+ let newScore = user.karma + change;
10
+
11
+ // Clamp between 0 and 100
12
+ if (newScore > 100) newScore = 100;
13
+ if (newScore < 0) newScore = 0;
14
+
15
+ user.karma = newScore;
16
+
17
+ // Auto-Ban Logic (Bible Rule: < 30)
18
+ if (newScore < 30) {
19
+ user.flags.isBanned = true;
20
+ console.log(`🚫 BANNED User ${userId} (Karma: ${newScore})`);
21
+ }
22
+
23
+ // Log the reason (for future admin tools)
24
+ // In MVP, we just console log, but we could push to a 'karmaHistory' array
25
+ console.log(`Karma Update [${userId}]: ${change} (${reason}) => ${newScore}`);
26
+
27
+ await user.save();
28
+ return user;
29
+ } catch (err) {
30
+ console.error("Karma Update Failed", err);
31
+ }
32
+ };
src/services/MatchingQueue.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class MatchingQueue {
2
+ constructor() {
3
+ this.queue = []; // Array of { socketId, user }
4
+ }
5
+
6
+ add(socketId, user) {
7
+ this.queue.push({ socketId, user, joinedAt: Date.now() });
8
+ }
9
+
10
+ remove(socketId) {
11
+ this.queue = this.queue.filter(client => client.socketId !== socketId);
12
+ }
13
+
14
+ findMatch(currentUser) {
15
+ // 1. Filter out self and blocked users (omitted for MVP basics)
16
+ const candidates = this.queue.filter(c => c.user._id !== currentUser._id);
17
+
18
+ if (candidates.length === 0) return null;
19
+
20
+ // 2. Priority: Opposite Gender
21
+ const oppositeGender = candidates.find(
22
+ c => c.user.profile.gender !== currentUser.profile.gender
23
+ );
24
+
25
+ if (oppositeGender) return oppositeGender;
26
+
27
+ // 3. Fallback: Anyone (First in, First out)
28
+ return candidates[0];
29
+ }
30
+ }
31
+
32
+ export default new MatchingQueue();
src/services/SocketManager.js ADDED
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Server } from 'socket.io';
2
+ import matchingQueue from './MatchingQueue.js';
3
+ import { updateKarma } from './KarmaService.js';
4
+ import User from '../models/User.js';
5
+ import Message from '../models/Message.js';
6
+ import CallSession from '../models/CallSession.js';
7
+
8
+ let io;
9
+
10
+ const ICEBREAKERS = [
11
+ "What's your most controversial food opinion?",
12
+ "If you could teleport anywhere right now, where to?",
13
+ "What's the last song you listened to on repeat?",
14
+ "Zombie apocalypse team: You + 2 fictional characters. Who?",
15
+ "Cats or Dogs? Defend your answer.",
16
+ "What's a movie you can watch 100 times?",
17
+ "Best Wi-Fi name you've ever seen?",
18
+ "If you were a ghost, who would you haunt?",
19
+ "What's the weirdest talent you have?",
20
+ "Pineapple on pizza: Yes or Criminal?",
21
+ "What's something you're oddly passionate about?",
22
+ "If your life had a theme song right now, what would it be?",
23
+ "What's the most random thing you've learned this semester?",
24
+ "What's a hot take you're willing to defend?",
25
+ "What's the best late-night food near your campus?",
26
+ "What's your go-to comfort show or YouTube channel?",
27
+ "What's a hobby you picked up and then immediately dropped?",
28
+ "What's something small that instantly makes your day better?",
29
+ "What's the most college thing that's happened to you this week?",
30
+ "What's your current obsession?",
31
+ "What's your major—and do you actually like it?",
32
+ "Hardest class you've taken so far?",
33
+ "Are you more of a library studier or last-minute grinder?",
34
+ "Best campus spot nobody talks about?",
35
+ "Most useless class requirement you've had?",
36
+ "What's one class everyone should avoid?",
37
+ "What's your ideal class schedule: mornings or afternoons?",
38
+ "Biggest academic struggle right now?",
39
+ "Group projects: blessing or curse?",
40
+ "What's one thing you wish freshmen knew?",
41
+ "What's a hill you're willing to die on?",
42
+ "If sleep were a class, would you pass?",
43
+ "What's your most controversial campus opinion?",
44
+ "What's something you pretend to enjoy but actually don't?",
45
+ "What's the worst fashion phase you went through?",
46
+ "What's your most irrational fear?",
47
+ "What's a weird habit you have?",
48
+ "What's the worst app you still use daily?",
49
+ "If procrastination were a sport, how good would you be?",
50
+ "What's the dumbest thing you've done this month?",
51
+ "If money didn't matter, what would you be doing right now?",
52
+ "If you could restart college, what would you do differently?",
53
+ "If you could instantly master one skill, what would it be?",
54
+ "What would your dream elective be?",
55
+ "If you could time-travel to one moment in your life, when?",
56
+ "What's a random dream you haven't told many people?",
57
+ "What would your perfect day look like?",
58
+ "If you had to teach a class, what would it be about?",
59
+ "What's something you want to get better at?",
60
+ "If you disappeared for a year, what would you do?",
61
+ "What's something you're proud of lately?",
62
+ "What's been stressing you out recently?",
63
+ "What's one thing you're looking forward to?",
64
+ "Who's had the biggest influence on you?",
65
+ "What's something you're trying to improve about yourself?",
66
+ "What's the best advice you've gotten?",
67
+ "What's something you're grateful for today?",
68
+ "What's one goal you have this semester?",
69
+ "What's something that motivates you?",
70
+ "What's one thing that always cheers you up?",
71
+ "Coffee or energy drinks?",
72
+ "Night owl or early bird?",
73
+ "Introvert, extrovert, or depends?",
74
+ "Study music or silence?",
75
+ "Netflix or YouTube?",
76
+ "Gym, sports, or neither?",
77
+ "Homebody or always out?",
78
+ "Texting or calling?",
79
+ "Winter or summer?",
80
+ "Spontaneous or planned?"
81
+ ];
82
+
83
+ const onlineUsers = new Set();
84
+
85
+ export const initSocket = (httpServer) => {
86
+ io = new Server(httpServer, {
87
+ cors: {
88
+ origin: process.env.CLIENT_URL || "*",
89
+ methods: ["GET", "POST"]
90
+ }
91
+ });
92
+
93
+ io.on('connection', (socket) => {
94
+ console.log(`🔌 Client connected: ${socket.id}`);
95
+
96
+ socket.on('register_online', (userId) => {
97
+ socket.userId = userId.toString();
98
+ onlineUsers.add(socket.userId);
99
+
100
+ io.emit('online_count', { count: onlineUsers.size });
101
+ });
102
+
103
+ // 1. User joins the "Looking for Match" queue
104
+ socket.on('join_queue', (user) => {
105
+ console.log(`🔍 User ${user.displayName} joined queue`);
106
+ socket.userId = user._id.toString();
107
+ onlineUsers.add(socket.userId);
108
+
109
+ // Broadcast correct count
110
+ io.emit('online_count', { count: onlineUsers.size });
111
+
112
+ const match = matchingQueue.findMatch(user);
113
+
114
+ if (match) {
115
+ // MATCH FOUND!
116
+ socket.partnerSocketId = match.socketId;
117
+
118
+ const partnerSocket = io.sockets.sockets.get(match.socketId);
119
+ if (partnerSocket) {
120
+ partnerSocket.partnerSocketId = socket.id;
121
+ }
122
+
123
+ const createSession = async (userA_id, userB_id) => {
124
+ try {
125
+ const session = await new CallSession({
126
+ participants: [userA_id, userB_id]
127
+ }).save();
128
+ return session._id;
129
+ } catch (err) {
130
+ console.error("Session log error", err);
131
+ }
132
+ };
133
+
134
+ matchingQueue.remove(match.socketId);
135
+ const roomId = `${socket.id}-${match.socketId}`;
136
+
137
+ socket.join(roomId);
138
+ io.to(match.socketId).socketsJoin(roomId);
139
+
140
+ // PICK RANDOM QUESTION
141
+ const question = ICEBREAKERS[Math.floor(Math.random() * ICEBREAKERS.length)];
142
+
143
+ // NOTIFY USER A (Current Socket)
144
+ io.to(socket.id).emit('match_found', {
145
+ roomId,
146
+ peerId: match.user._id.toString(), // <--- FIX: Ensure String
147
+ peerName: match.user.displayName,
148
+ peerKarma: match.user.karma,
149
+ peerProfile: match.user.profile,
150
+ remoteSocketId: match.socketId, // Pass this for social signaling
151
+ icebreaker: question
152
+ });
153
+
154
+ // NOTIFY USER B (Target Socket)
155
+ io.to(match.socketId).emit('match_found', {
156
+ roomId,
157
+ peerId: user._id.toString(), // <--- FIX: Ensure String
158
+ peerName: user.displayName,
159
+ peerKarma: user.karma,
160
+ peerProfile: user.profile,
161
+ remoteSocketId: socket.id,
162
+ icebreaker: question
163
+ });
164
+
165
+ // Tell Initiator (Current Socket) to send Offer
166
+ socket.emit('initiate_call', { remoteSocketId: match.socketId });
167
+
168
+ } else {
169
+ // NO MATCH -> Wait in queue
170
+ matchingQueue.add(socket.id, user);
171
+ }
172
+ });
173
+
174
+ // 2. WebRTC Signaling (The Handshake)
175
+ socket.on('offer', (payload) => {
176
+ io.to(payload.target).emit('offer', payload);
177
+ });
178
+
179
+ socket.on('answer', (payload) => {
180
+ io.to(payload.target).emit('answer', payload);
181
+ });
182
+
183
+ socket.on('ice-candidate', (payload) => {
184
+ io.to(payload.target).emit('ice-candidate', payload);
185
+ });
186
+
187
+ // 3. Cleanup
188
+ socket.on('disconnect', async () => {
189
+ console.log(`🔌 Client disconnected: ${socket.id}`);
190
+
191
+ if (socket.userId) {
192
+ onlineUsers.delete(socket.userId);
193
+ }
194
+
195
+ io.emit('online_count', { count: onlineUsers.size });
196
+
197
+ if (socket.partnerSocketId) {
198
+ io.to(socket.partnerSocketId).emit('call_ended');
199
+ }
200
+
201
+ // 1. Remove from Matching Queue (Critical)
202
+ matchingQueue.remove(socket.id);
203
+
204
+ // 2. Handle Dropped Calls (Phase 10 Logic)
205
+ if (socket.activeSessionId) {
206
+ await CallSession.findByIdAndUpdate(socket.activeSessionId, {
207
+ endTime: Date.now(),
208
+ status: 'dropped'
209
+ });
210
+
211
+ // 3. Notify the partner (if they are still there)
212
+ // We need to know who the partner was.
213
+ // Ideally, store `socket.partnerId` during match.
214
+ if (socket.partnerSocketId) {
215
+ io.to(socket.partnerSocketId).emit('peer_disconnected');
216
+ }
217
+ }
218
+ });
219
+
220
+ socket.on('report_violation', async ({ type }) => {
221
+ if (!socket.userId) return;
222
+
223
+ console.log(`🚨 AI REPORT on ${socket.userId}: ${type}`);
224
+
225
+ if (type === 'NSFW_AUTO') {
226
+ // Heavy Penalty for Flashing
227
+ await updateKarma(socket.userId, -20, 'NSFW AI Detection');
228
+
229
+ // Force disconnect
230
+ socket.disconnect();
231
+ }
232
+ });
233
+
234
+ socket.on('share_social', async ({ targetId, platform }) => {
235
+ try {
236
+ // 1. Fetch Sender's Profile securely
237
+ const sender = await User.findById(socket.userId);
238
+ if (!sender) return;
239
+
240
+ const handle = sender.profile.socials?.[platform];
241
+
242
+ if (!handle) {
243
+ // Notify sender they haven't set this up
244
+ socket.emit('error_toast', { message: `No ${platform} handle set in profile.` });
245
+ return;
246
+ }
247
+
248
+ // 2. Emit to Target
249
+ io.to(targetId).emit('social_received', {
250
+ platform,
251
+ handle,
252
+ senderName: sender.displayName
253
+ });
254
+
255
+ // 3. Confirm to Sender
256
+ socket.emit('social_shared_success', { platform });
257
+
258
+ } catch (err) {
259
+ console.error("Share failed", err);
260
+ }
261
+ });
262
+
263
+ socket.on('send_message', async ({ receiverId, content }) => {
264
+ try {
265
+ // 1. Save to DB
266
+ const newMsg = await new Message({
267
+ sender: socket.userId,
268
+ receiver: receiverId,
269
+ content
270
+ }).save();
271
+
272
+ // 2. Emit to Receiver (if online)
273
+ // We need a way to find Receiver's Socket ID.
274
+ // Ideally, maintain a Map: userId -> socketId
275
+ // For MVP: We broadcast to a room named after the userId (User joins room "user:ID" on connect)
276
+
277
+ io.to(`user:${receiverId}`).emit('receive_message', newMsg);
278
+
279
+ // 3. Emit back to Sender (to confirm sent)
280
+ socket.emit('message_sent', newMsg);
281
+
282
+ } catch (err) {
283
+ console.error("Chat error", err);
284
+ }
285
+ });
286
+
287
+ socket.on('login_flow', (userId) => {
288
+ socket.join(`user:${userId}`);
289
+ });
290
+
291
+ // 4. EXPLICIT END CALL
292
+ socket.on('end_call', ({ roomId }) => {
293
+ if (socket.partnerSocketId) {
294
+ io.to(socket.partnerSocketId).emit('call_ended');
295
+ }
296
+
297
+ socket.leave(roomId);
298
+ socket.partnerSocketId = null;
299
+ });
300
+ });
301
+ };
302
+
303
+ export const getIO = () => io;