summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAnjana Vakil <contact@anjana.dev>2025-08-26 12:40:16 -0500
committerAnjana Vakil <contact@anjana.dev>2025-08-26 12:40:16 -0500
commit1dc4f56425209d4ce1d7bb78ec8b5e7b5a755a82 (patch)
tree58d06cd695ae17302daff7a87d9096f1d39ea54a /backend
reset
Diffstat (limited to 'backend')
-rw-r--r--backend/.gitignore24
-rwxr-xr-xbackend/bin/www90
-rw-r--r--backend/package-lock.json1367
-rw-r--r--backend/package.json18
-rw-r--r--backend/src/data/events.json162
-rw-r--r--backend/src/data/rsvps.json452
-rw-r--r--backend/src/data/users.json152
-rw-r--r--backend/src/db.js72
-rw-r--r--backend/src/routes/api.js12
-rw-r--r--backend/src/routes/events.js97
-rw-r--r--backend/src/routes/users.js65
-rw-r--r--backend/src/server.js40
12 files changed, 2551 insertions, 0 deletions
diff --git a/backend/.gitignore b/backend/.gitignore
new file mode 100644
index 0000000..942c176
--- /dev/null
+++ b/backend/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules/*
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/backend/bin/www b/backend/bin/www
new file mode 100755
index 0000000..4b20e4d
--- /dev/null
+++ b/backend/bin/www
@@ -0,0 +1,90 @@
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+import debugLog from 'debug';
+import app, { set } from '../server.js';
+const debug = debugLog('backend:server');
+import { createServer } from 'http';
+
+/**
+ * Get port from environment and store in Express.
+ */
+
+const port = normalizePort(process.env.PORT || '3000');
+set('port', port);
+
+/**
+ * Create HTTP server.
+ */
+
+const server = createServer(app);
+
+/**
+ * Listen on provided port, on all network interfaces.
+ */
+
+server.listen(port);
+server.on('error', onError);
+server.on('listening', onListening);
+
+/**
+ * Normalize a port into a number, string, or false.
+ */
+
+function normalizePort(val) {
+ const port = parseInt(val, 10);
+
+ if (isNaN(port)) {
+ // named pipe
+ return val;
+ }
+
+ if (port >= 0) {
+ // port number
+ return port;
+ }
+
+ return false;
+}
+
+/**
+ * Event listener for HTTP server "error" event.
+ */
+
+function onError(error) {
+ if (error.syscall !== 'listen') {
+ throw error;
+ }
+
+ const bind = typeof port === 'string'
+ ? 'Pipe ' + port
+ : 'Port ' + port;
+
+ // handle specific listen errors with friendly messages
+ switch (error.code) {
+ case 'EACCES':
+ console.error(bind + ' requires elevated privileges');
+ process.exit(1);
+ break;
+ case 'EADDRINUSE':
+ console.error(bind + ' is already in use');
+ process.exit(1);
+ break;
+ default:
+ throw error;
+ }
+}
+
+/**
+ * Event listener for HTTP server "listening" event.
+ */
+
+function onListening() {
+ const addr = server.address();
+ const bind = typeof addr === 'string'
+ ? 'pipe ' + addr
+ : 'port ' + addr.port;
+ debug('Listening on ' + bind);
+}
diff --git a/backend/package-lock.json b/backend/package-lock.json
new file mode 100644
index 0000000..47e566a
--- /dev/null
+++ b/backend/package-lock.json
@@ -0,0 +1,1367 @@
+{
+ "name": "event-me-server",
+ "version": "0.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "event-me-server",
+ "version": "0.0.0",
+ "dependencies": {
+ "better-sqlite3": "^11.10.0",
+ "cookie-parser": "~1.4.4",
+ "cors": "^2.8.5",
+ "express": "^4.21.2",
+ "helmet": "^8.1.0",
+ "morgan": "^1.10.1"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "license": "MIT"
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/basic-auth": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
+ "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/basic-auth/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
+ "node_modules/better-sqlite3": {
+ "version": "11.10.0",
+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz",
+ "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "bindings": "^1.5.0",
+ "prebuild-install": "^7.1.1"
+ }
+ },
+ "node_modules/bindings": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+ "license": "MIT",
+ "dependencies": {
+ "file-uri-to-path": "1.0.0"
+ }
+ },
+ "node_modules/bl": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.3",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.13.0",
+ "raw-body": "2.5.2",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/chownr": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+ "license": "ISC"
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-parser": {
+ "version": "1.4.7",
+ "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz",
+ "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==",
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "0.7.2",
+ "cookie-signature": "1.0.6"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "license": "MIT"
+ },
+ "node_modules/cors": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/decompress-response": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/detect-libc": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
+ "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/end-of-stream": {
+ "version": "1.4.5",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
+ "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
+ "license": "MIT",
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/expand-template": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
+ "license": "(MIT OR WTFPL)",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.21.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
+ "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.3",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.7.1",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.3.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.3",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.12",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.13.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.19.0",
+ "serve-static": "1.16.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/cookie": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
+ "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+ "license": "MIT"
+ },
+ "node_modules/finalhandler": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
+ "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fs-constants": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+ "license": "MIT"
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/github-from-package": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
+ "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
+ "license": "MIT"
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/helmet": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.1.0.tgz",
+ "integrity": "sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+ "license": "ISC"
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mkdirp-classic": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+ "license": "MIT"
+ },
+ "node_modules/morgan": {
+ "version": "1.10.1",
+ "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz",
+ "integrity": "sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==",
+ "license": "MIT",
+ "dependencies": {
+ "basic-auth": "~2.0.1",
+ "debug": "2.6.9",
+ "depd": "~2.0.0",
+ "on-finished": "~2.3.0",
+ "on-headers": "~1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/morgan/node_modules/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/napi-build-utils": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
+ "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/node-abi": {
+ "version": "3.75.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz",
+ "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==",
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/on-headers": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
+ "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
+ "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
+ "license": "MIT"
+ },
+ "node_modules/prebuild-install": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
+ "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
+ "license": "MIT",
+ "dependencies": {
+ "detect-libc": "^2.0.0",
+ "expand-template": "^2.0.3",
+ "github-from-package": "0.0.0",
+ "minimist": "^1.2.3",
+ "mkdirp-classic": "^0.5.3",
+ "napi-build-utils": "^2.0.0",
+ "node-abi": "^3.3.0",
+ "pump": "^3.0.0",
+ "rc": "^1.2.7",
+ "simple-get": "^4.0.0",
+ "tar-fs": "^2.0.0",
+ "tunnel-agent": "^0.6.0"
+ },
+ "bin": {
+ "prebuild-install": "bin.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/pump": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
+ "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
+ "license": "MIT",
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.0.6"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+ "dependencies": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "bin": {
+ "rc": "cli.js"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.19.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/serve-static": {
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.19.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/simple-concat": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/simple-get": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
+ "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decompress-response": "^6.0.0",
+ "once": "^1.3.1",
+ "simple-concat": "^1.0.0"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tar-fs": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz",
+ "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==",
+ "license": "MIT",
+ "dependencies": {
+ "chownr": "^1.1.1",
+ "mkdirp-classic": "^0.5.2",
+ "pump": "^3.0.0",
+ "tar-stream": "^2.1.4"
+ }
+ },
+ "node_modules/tar-stream": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "bl": "^4.0.3",
+ "end-of-stream": "^1.4.1",
+ "fs-constants": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "license": "MIT"
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "license": "ISC"
+ }
+ }
+}
diff --git a/backend/package.json b/backend/package.json
new file mode 100644
index 0000000..b6c45cd
--- /dev/null
+++ b/backend/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "event-me-server",
+ "version": "0.0.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "start": "NODE_ENV=production node src/server.js",
+ "dev": "node --watch src/server.js"
+ },
+ "dependencies": {
+ "better-sqlite3": "^11.10.0",
+ "cookie-parser": "~1.4.4",
+ "cors": "^2.8.5",
+ "express": "^4.21.2",
+ "helmet": "^8.1.0",
+ "morgan": "^1.10.1"
+ }
+}
diff --git a/backend/src/data/events.json b/backend/src/data/events.json
new file mode 100644
index 0000000..da5b0a9
--- /dev/null
+++ b/backend/src/data/events.json
@@ -0,0 +1,162 @@
+[
+ {
+ "id": "1",
+ "title": "Community Thanksgiving Potluck",
+ "date": "2025-11-29",
+ "image_url": "https://images.unsplash.com/photo-1574672280600-4accfa5b6f98?w=500",
+ "description": "Join our annual community feast! Bring your favorite dish to share and celebrate gratitude with neighbors. All are welcome to this warm gathering of food and friendship.",
+ "host_id": "1"
+ },
+ {
+ "id": "2",
+ "title": "Solstice Celebration",
+ "date": "2025-12-21",
+ "image_url": "https://images.unsplash.com/photo-1482517967863-00e15c9b44be?w=500",
+ "description": "Welcome the winter solstice with music, meditation, and seasonal ceremonies. Experience the magic of the longest night of the year in community.",
+ "host_id": "2"
+ },
+ {
+ "id": "3",
+ "title": "EventExpo 2026",
+ "date": "2026-04-01",
+ "image_url": "https://images.unsplash.com/photo-1511578314322-379afb476865?w=500",
+ "description": "Discover the future of event planning at EventExpo 2026. Network with industry leaders, explore cutting-edge technologies, and attend inspiring workshops.",
+ "host_id": "3"
+ },
+ {
+ "id": "4",
+ "title": "Critical Mass Bike Ride",
+ "date": "2025-09-25",
+ "image_url": "https://images.unsplash.com/photo-1593259525326-ef1511674267?w=500",
+ "description": "Take back the streets in this monthly community bike ride. Promote cycling awareness and safety while enjoying a scenic tour through the city with fellow cyclists.",
+ "host_id": "4"
+ },
+ {
+ "id": "5",
+ "title": "New Year Celebration",
+ "date": "2026-01-01",
+ "image_url": "https://images.unsplash.com/photo-1521478413868-1bbd982fa4a5?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
+ "description": "Celebrate the start of the new year with fireworks, music, and community festivities.",
+ "host_id": "5"
+ },
+ {
+ "id": "6",
+ "title": "Summer Music Festival",
+ "date": "2025-07-15",
+ "image_url": "https://images.unsplash.com/photo-1589553975453-d7e36c7cfbf8?w=500",
+ "description": "Enjoy a day of live music, food trucks, and fun activities at the annual Summer Music Festival.",
+ "host_id": "2"
+ },
+ {
+ "id": "7",
+ "title": "Tech Startup Meetup",
+ "date": "2025-09-15",
+ "image_url": "https://images.unsplash.com/photo-1515187029135-18ee286d815b?w=500",
+ "description": "Connect with fellow entrepreneurs, developers, and investors. Share ideas, get feedback, and build meaningful relationships in the tech community.",
+ "host_id": "6"
+ },
+ {
+ "id": "8",
+ "title": "Yoga in the Park",
+ "date": "2025-08-08",
+ "image_url": "https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?w=500",
+ "description": "Start your day with a refreshing yoga session in the beautiful city park. All skill levels welcome. Don't forget to bring your mat!",
+ "host_id": "7"
+ },
+ {
+ "id": "9",
+ "title": "Art Gallery Opening",
+ "date": "2025-10-14",
+ "image_url": "https://images.unsplash.com/photo-1541961017774-22349e4a1262?w=500",
+ "description": "Join us for the opening of 'Urban Perspectives' featuring local artists. Enjoy wine, hors d'oeuvres, and engaging conversations about contemporary art.",
+ "host_id": "8"
+ },
+ {
+ "id": "10",
+ "title": "Cooking Class: Mediterranean Cuisine",
+ "date": "2025-09-28",
+ "image_url": "https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?w=500",
+ "description": "Learn to cook authentic Mediterranean dishes from scratch. Includes ingredients, recipes, and a delicious meal to enjoy together.",
+ "host_id": "9"
+ },
+ {
+ "id": "11",
+ "title": "Book Club: Science Fiction",
+ "date": "2025-08-20",
+ "image_url": "https://images.unsplash.com/photo-1481627834876-b7833e8f5570?w=500",
+ "description": "Discuss this month's selection: 'The Three-Body Problem' by Liu Cixin. Coffee and snacks provided. New members always welcome!",
+ "host_id": "10"
+ },
+ {
+ "id": "12",
+ "title": "Photography Workshop",
+ "date": "2025-11-22",
+ "image_url": "https://images.unsplash.com/photo-1516035069371-29a1b244cc32?w=500",
+ "description": "Master the basics of digital photography. Learn composition, lighting, and editing techniques. Bring your camera or smartphone.",
+ "host_id": "11"
+ },
+ {
+ "id": "13",
+ "title": "Language Exchange: Spanish/English",
+ "date": "2025-09-10",
+ "image_url": "https://images.unsplash.com/photo-1546410531-bb4caa6b424d?w=500",
+ "description": "Practice Spanish and English in a friendly, conversational setting. All levels welcome. Coffee and light refreshments included.",
+ "host_id": "12"
+ },
+ {
+ "id": "14",
+ "title": "Board Game Night",
+ "date": "2025-10-08",
+ "image_url": "https://images.unsplash.com/photo-1610890716171-6b1bb98ffd09?w=500",
+ "description": "Join us for an evening of strategy, fun, and friendly competition. We'll have a variety of games for all skill levels.",
+ "host_id": "13"
+ },
+ {
+ "id": "15",
+ "title": "Hiking Adventure",
+ "date": "2025-07-12",
+ "image_url": "https://images.unsplash.com/photo-1551632811-561732d1e306?w=500",
+ "description": "Explore the beautiful mountain trails with our experienced guide. Moderate difficulty, 4-hour hike with stunning views.",
+ "host_id": "14"
+ },
+ {
+ "id": "16",
+ "title": "Jazz Night at the Lounge",
+ "date": "2025-09-25",
+ "image_url": "https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=500",
+ "description": "Enjoy live jazz music in an intimate setting. Featuring local musicians and craft cocktails. Reservations recommended.",
+ "host_id": "15"
+ },
+ {
+ "id": "17",
+ "title": "Volunteer Day: Community Garden",
+ "date": "2025-10-15",
+ "image_url": "https://images.unsplash.com/photo-1416879595882-3373a0480b5b?w=500",
+ "description": "Help maintain our community garden. Tasks include planting, weeding, and general maintenance. Tools provided, bring work gloves.",
+ "host_id": "16"
+ },
+ {
+ "id": "18",
+ "title": "Film Screening: Documentary Night",
+ "date": "2025-08-15",
+ "image_url": "https://images.unsplash.com/photo-1489599835382-957593cb2371?w=500",
+ "description": "Watch and discuss thought-provoking documentaries about environmental conservation. Popcorn and refreshments provided.",
+ "host_id": "17"
+ },
+ {
+ "id": "19",
+ "title": "Dance Workshop: Salsa Basics",
+ "date": "2025-09-18",
+ "image_url": "https://images.unsplash.com/photo-1504609773096-104ff2c73ba4?w=500",
+ "description": "Learn the fundamentals of salsa dancing in a fun, beginner-friendly environment. No partner required, comfortable shoes recommended.",
+ "host_id": "18"
+ },
+ {
+ "id": "20",
+ "title": "Craft Fair & Market",
+ "date": "2025-12-05",
+ "image_url": "https://images.unsplash.com/photo-1441986300917-64674bd600d8?w=500",
+ "description": "Support local artisans and discover unique handmade goods. Food trucks, live music, and family-friendly activities throughout the day.",
+ "host_id": "19"
+ }
+] \ No newline at end of file
diff --git a/backend/src/data/rsvps.json b/backend/src/data/rsvps.json
new file mode 100644
index 0000000..eb9c868
--- /dev/null
+++ b/backend/src/data/rsvps.json
@@ -0,0 +1,452 @@
+[
+ {
+ "event_id": 1,
+ "name": "Carlos Mendoza",
+ "email": "carlos.mendoza@example.com"
+ },
+ {
+ "event_id": 1,
+ "name": "Yuki Tanaka",
+ "email": "yuki.tanaka@example.com"
+ },
+ {
+ "event_id": 1,
+ "name": "Mohammed Ali",
+ "email": "mohammed.ali@example.com"
+ },
+ {
+ "event_id": 1,
+ "name": "Amina Jafari",
+ "email": "amina.jafari@example.com"
+ },
+ {
+ "event_id": 1,
+ "name": "Ravi Kumar",
+ "email": "ravi.kumar@example.com"
+ },
+ {
+ "event_id": 1,
+ "name": "Sarah Mitchell",
+ "email": "sarah.mitchell@example.com"
+ },
+ {
+ "event_id": 1,
+ "name": "Alex Thompson",
+ "email": "alex.thompson@example.com"
+ },
+ {
+ "event_id": 2,
+ "name": "Aisha Khan",
+ "email": "aisha.khan@example.com"
+ },
+ {
+ "event_id": 2,
+ "name": "Chloe Dubois",
+ "email": "chloe.dubois@example.com"
+ },
+ {
+ "event_id": 2,
+ "name": "Nia Mwangi",
+ "email": "nia.mwangi@example.com"
+ },
+ {
+ "event_id": 2,
+ "name": "Kofi Mensah",
+ "email": "kofi.mensah@example.com"
+ },
+ {
+ "event_id": 2,
+ "name": "Tariq Aziz",
+ "email": "tariq.aziz@example.com"
+ },
+ {
+ "event_id": 2,
+ "name": "Maria Rodriguez",
+ "email": "maria.rodriguez@example.com"
+ },
+ {
+ "event_id": 3,
+ "name": "Liam O'Connor",
+ "email": "liam.oconnor@example.com"
+ },
+ {
+ "event_id": 3,
+ "name": "Santiago Garcia",
+ "email": "santiago.garcia@example.com"
+ },
+ {
+ "event_id": 3,
+ "name": "Priya Singh",
+ "email": "priya.singh@example.com"
+ },
+ {
+ "event_id": 3,
+ "name": "Elena Petrova",
+ "email": "elena.petrova@example.com"
+ },
+ {
+ "event_id": 3,
+ "name": "James Anderson",
+ "email": "james.anderson@example.com"
+ },
+ {
+ "event_id": 3,
+ "name": "Lisa Park",
+ "email": "lisa.park@example.com"
+ },
+ {
+ "event_id": 4,
+ "name": "Fatima Al-Sayed",
+ "email": "fatima.alsayed@example.com"
+ },
+ {
+ "event_id": 4,
+ "name": "Omar Faruk",
+ "email": "omar.faruk@example.com"
+ },
+ {
+ "event_id": 4,
+ "name": "Lina Chen",
+ "email": "lina.chen@example.com"
+ },
+ {
+ "event_id": 4,
+ "name": "Jamal Carter",
+ "email": "jamal.carter@example.com"
+ },
+ {
+ "event_id": 4,
+ "name": "David Johnson",
+ "email": "david.johnson@example.com"
+ },
+ {
+ "event_id": 5,
+ "name": "Raj Patel",
+ "email": "raj.patel@example.com"
+ },
+ {
+ "event_id": 5,
+ "name": "Zara Khan",
+ "email": "zara.khan@example.com"
+ },
+ {
+ "event_id": 5,
+ "name": "Sofia Martinez",
+ "email": "sofia.martinez@example.com"
+ },
+ {
+ "event_id": 5,
+ "name": "Emma Wilson",
+ "email": "emma.wilson@example.com"
+ },
+ {
+ "event_id": 6,
+ "name": "Sofia Rossi",
+ "email": "sofia.rossi@example.com"
+ },
+ {
+ "event_id": 6,
+ "name": "Emma Wilson",
+ "email": "emma.wilson@example.com"
+ },
+ {
+ "event_id": 6,
+ "name": "Liam Smith",
+ "email": "liam.smith@example.com"
+ },
+ {
+ "event_id": 6,
+ "name": "Nina Schmidt",
+ "email": "nina.schmidt@example.com"
+ },
+ {
+ "event_id": 6,
+ "name": "Marcus Johnson",
+ "email": "marcus.johnson@example.com"
+ },
+ {
+ "event_id": 7,
+ "name": "Alex Thompson",
+ "email": "alex.thompson@example.com"
+ },
+ {
+ "event_id": 7,
+ "name": "James Anderson",
+ "email": "james.anderson@example.com"
+ },
+ {
+ "event_id": 7,
+ "name": "Lisa Park",
+ "email": "lisa.park@example.com"
+ },
+ {
+ "event_id": 7,
+ "name": "Elena Petrova",
+ "email": "elena.petrova@example.com"
+ },
+ {
+ "event_id": 8,
+ "name": "Yuki Tanaka",
+ "email": "yuki.tanaka@example.com"
+ },
+ {
+ "event_id": 8,
+ "name": "Chloe Dubois",
+ "email": "chloe.dubois@example.com"
+ },
+ {
+ "event_id": 8,
+ "name": "Sarah Mitchell",
+ "email": "sarah.mitchell@example.com"
+ },
+ {
+ "event_id": 8,
+ "name": "Nina Schmidt",
+ "email": "nina.schmidt@example.com"
+ },
+ {
+ "event_id": 9,
+ "name": "Priya Singh",
+ "email": "priya.singh@example.com"
+ },
+ {
+ "event_id": 9,
+ "name": "Maria Rodriguez",
+ "email": "maria.rodriguez@example.com"
+ },
+ {
+ "event_id": 9,
+ "name": "Lina Chen",
+ "email": "lina.chen@example.com"
+ },
+ {
+ "event_id": 9,
+ "name": "Sofia Garcia",
+ "email": "sofia.garcia@example.com"
+ },
+ {
+ "event_id": 10,
+ "name": "Carlos Mendoza",
+ "email": "carlos.mendoza@example.com"
+ },
+ {
+ "event_id": 10,
+ "name": "Fatima Al-Farsi",
+ "email": "fatima.alfarsi@example.com"
+ },
+ {
+ "event_id": 10,
+ "name": "Omar Faruk",
+ "email": "omar.faruk@example.com"
+ },
+ {
+ "event_id": 10,
+ "name": "Tariq Aziz",
+ "email": "tariq.aziz@example.com"
+ },
+ {
+ "event_id": 11,
+ "name": "Liam O'Connor",
+ "email": "liam.oconnor@example.com"
+ },
+ {
+ "event_id": 11,
+ "name": "Ravi Kumar",
+ "email": "ravi.kumar@example.com"
+ },
+ {
+ "event_id": 11,
+ "name": "Elena Petrova",
+ "email": "elena.petrova@example.com"
+ },
+ {
+ "event_id": 11,
+ "name": "James Anderson",
+ "email": "james.anderson@example.com"
+ },
+ {
+ "event_id": 12,
+ "name": "Yuki Tanaka",
+ "email": "yuki.tanaka@example.com"
+ },
+ {
+ "event_id": 12,
+ "name": "Lina Chen",
+ "email": "lina.chen@example.com"
+ },
+ {
+ "event_id": 12,
+ "name": "Sarah Mitchell",
+ "email": "sarah.mitchell@example.com"
+ },
+ {
+ "event_id": 12,
+ "name": "Alex Thompson",
+ "email": "alex.thompson@example.com"
+ },
+ {
+ "event_id": 13,
+ "name": "Sofia Garcia",
+ "email": "sofia.garcia@example.com"
+ },
+ {
+ "event_id": 13,
+ "name": "Carlos Mendoza",
+ "email": "carlos.mendoza@example.com"
+ },
+ {
+ "event_id": 13,
+ "name": "Maria Rodriguez",
+ "email": "maria.rodriguez@example.com"
+ },
+ {
+ "event_id": 13,
+ "name": "Omar Faruk",
+ "email": "omar.faruk@example.com"
+ },
+ {
+ "event_id": 14,
+ "name": "Jamal Carter",
+ "email": "jamal.carter@example.com"
+ },
+ {
+ "event_id": 14,
+ "name": "David Johnson",
+ "email": "david.johnson@example.com"
+ },
+ {
+ "event_id": 14,
+ "name": "Marcus Johnson",
+ "email": "marcus.johnson@example.com"
+ },
+ {
+ "event_id": 14,
+ "name": "James Anderson",
+ "email": "james.anderson@example.com"
+ },
+ {
+ "event_id": 15,
+ "name": "Kofi Mensah",
+ "email": "kofi.mensah@example.com"
+ },
+ {
+ "event_id": 15,
+ "name": "Nia Mwangi",
+ "email": "nia.mwangi@example.com"
+ },
+ {
+ "event_id": 15,
+ "name": "Sarah Mitchell",
+ "email": "sarah.mitchell@example.com"
+ },
+ {
+ "event_id": 15,
+ "name": "Alex Thompson",
+ "email": "alex.thompson@example.com"
+ },
+ {
+ "event_id": 16,
+ "name": "Nina Schmidt",
+ "email": "nina.schmidt@example.com"
+ },
+ {
+ "event_id": 16,
+ "name": "Chloe Dubois",
+ "email": "chloe.dubois@example.com"
+ },
+ {
+ "event_id": 16,
+ "name": "Emma Wilson",
+ "email": "emma.wilson@example.com"
+ },
+ {
+ "event_id": 16,
+ "name": "Lisa Park",
+ "email": "lisa.park@example.com"
+ },
+ {
+ "event_id": 17,
+ "name": "Fatima Al-Farsi",
+ "email": "fatima.alfarsi@example.com"
+ },
+ {
+ "event_id": 17,
+ "name": "Omar Faruk",
+ "email": "omar.faruk@example.com"
+ },
+ {
+ "event_id": 17,
+ "name": "Tariq Aziz",
+ "email": "tariq.aziz@example.com"
+ },
+ {
+ "event_id": 17,
+ "name": "Carlos Mendoza",
+ "email": "carlos.mendoza@example.com"
+ },
+ {
+ "event_id": 18,
+ "name": "Elena Petrova",
+ "email": "elena.petrova@example.com"
+ },
+ {
+ "event_id": 18,
+ "name": "Ravi Kumar",
+ "email": "ravi.kumar@example.com"
+ },
+ {
+ "event_id": 18,
+ "name": "James Anderson",
+ "email": "james.anderson@example.com"
+ },
+ {
+ "event_id": 18,
+ "name": "Liam O'Connor",
+ "email": "liam.oconnor@example.com"
+ },
+ {
+ "event_id": 19,
+ "name": "Sofia Garcia",
+ "email": "sofia.garcia@example.com"
+ },
+ {
+ "event_id": 19,
+ "name": "Maria Rodriguez",
+ "email": "maria.rodriguez@example.com"
+ },
+ {
+ "event_id": 19,
+ "name": "Chloe Dubois",
+ "email": "chloe.dubois@example.com"
+ },
+ {
+ "event_id": 19,
+ "name": "Nina Schmidt",
+ "email": "nina.schmidt@example.com"
+ },
+ {
+ "event_id": 20,
+ "name": "Emma Wilson",
+ "email": "emma.wilson@example.com"
+ },
+ {
+ "event_id": 20,
+ "name": "Lisa Park",
+ "email": "lisa.park@example.com"
+ },
+ {
+ "event_id": 20,
+ "name": "Sarah Mitchell",
+ "email": "sarah.mitchell@example.com"
+ },
+ {
+ "event_id": 20,
+ "name": "Yuki Tanaka",
+ "email": "yuki.tanaka@example.com"
+ },
+ {
+ "event_id": 20,
+ "name": "Lina Chen",
+ "email": "lina.chen@example.com"
+ }
+] \ No newline at end of file
diff --git a/backend/src/data/users.json b/backend/src/data/users.json
new file mode 100644
index 0000000..0615d81
--- /dev/null
+++ b/backend/src/data/users.json
@@ -0,0 +1,152 @@
+[
+ {
+ "id": 1,
+ "username": "amina",
+ "name": "Amina Khan",
+ "email": "amina.khan@example.com"
+ },
+ {
+ "id": 2,
+ "username": "liam",
+ "name": "Liam O'Connor",
+ "email": "liam.oconnor@example.com"
+ },
+ {
+ "id": 3,
+ "username": "sofia",
+ "name": "Sofia Garcia",
+ "email": "sofia.garcia@example.com"
+ },
+ {
+ "id": 4,
+ "username": "raj",
+ "name": "Raj Patel",
+ "email": "raj.patel@example.com"
+ },
+ {
+ "id": 5,
+ "username": "fatima",
+ "name": "Fatima Al-Farsi",
+ "email": "fatima.alfarsi@example.com"
+ },
+ {
+ "id": 6,
+ "username": "marcus",
+ "name": "Marcus Johnson",
+ "email": "marcus.johnson@example.com"
+ },
+ {
+ "id": 7,
+ "username": "yuki",
+ "name": "Yuki Tanaka",
+ "email": "yuki.tanaka@example.com"
+ },
+ {
+ "id": 8,
+ "username": "priya",
+ "name": "Priya Singh",
+ "email": "priya.singh@example.com"
+ },
+ {
+ "id": 9,
+ "username": "carlos",
+ "name": "Carlos Mendoza",
+ "email": "carlos.mendoza@example.com"
+ },
+ {
+ "id": 10,
+ "username": "emma",
+ "name": "Emma Wilson",
+ "email": "emma.wilson@example.com"
+ },
+ {
+ "id": 11,
+ "username": "omar",
+ "name": "Omar Faruk",
+ "email": "omar.faruk@example.com"
+ },
+ {
+ "id": 12,
+ "username": "lina",
+ "name": "Lina Chen",
+ "email": "lina.chen@example.com"
+ },
+ {
+ "id": 13,
+ "username": "david",
+ "name": "David Johnson",
+ "email": "david.johnson@example.com"
+ },
+ {
+ "id": 14,
+ "username": "chloe",
+ "name": "Chloe Dubois",
+ "email": "chloe.dubois@example.com"
+ },
+ {
+ "id": 15,
+ "username": "kofi",
+ "name": "Kofi Mensah",
+ "email": "kofi.mensah@example.com"
+ },
+ {
+ "id": 16,
+ "username": "elena",
+ "name": "Elena Petrova",
+ "email": "elena.petrova@example.com"
+ },
+ {
+ "id": 17,
+ "username": "jamal",
+ "name": "Jamal Carter",
+ "email": "jamal.carter@example.com"
+ },
+ {
+ "id": 18,
+ "username": "nina",
+ "name": "Nina Schmidt",
+ "email": "nina.schmidt@example.com"
+ },
+ {
+ "id": 19,
+ "username": "ravi",
+ "name": "Ravi Kumar",
+ "email": "ravi.kumar@example.com"
+ },
+ {
+ "id": 20,
+ "username": "tariq",
+ "name": "Tariq Aziz",
+ "email": "tariq.aziz@example.com"
+ },
+ {
+ "id": 21,
+ "username": "sarah",
+ "name": "Sarah Mitchell",
+ "email": "sarah.mitchell@example.com"
+ },
+ {
+ "id": 22,
+ "username": "alex",
+ "name": "Alex Thompson",
+ "email": "alex.thompson@example.com"
+ },
+ {
+ "id": 23,
+ "username": "maria",
+ "name": "Maria Rodriguez",
+ "email": "maria.rodriguez@example.com"
+ },
+ {
+ "id": 24,
+ "username": "james",
+ "name": "James Anderson",
+ "email": "james.anderson@example.com"
+ },
+ {
+ "id": 25,
+ "username": "lisa",
+ "name": "Lisa Park",
+ "email": "lisa.park@example.com"
+ }
+] \ No newline at end of file
diff --git a/backend/src/db.js b/backend/src/db.js
new file mode 100644
index 0000000..f20cac1
--- /dev/null
+++ b/backend/src/db.js
@@ -0,0 +1,72 @@
+import Database from 'better-sqlite3';
+import EVENTS from './data/events.json' with {type: 'json'};
+import USERS from './data/users.json' with {type: 'json'};
+import RSVPS from './data/rsvps.json' with {type: 'json'};
+
+
+const db = new Database('src/sqlite.db', { verbose: console.log });
+
+console.log(`Initializing database: ${db.name} `);
+
+
+db.pragma('foreign_keys = ON');
+
+
+db.exec(`
+ CREATE TABLE IF NOT EXISTS users (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ username TEXT NOT NULL UNIQUE,
+ name TEXT NOT NULL,
+ email TEXT
+ );
+ `);
+db.exec(`
+ CREATE TABLE IF NOT EXISTS events (
+ id INTEGER PRIMARY KEY,
+ title TEXT NOT NULL,
+ description TEXT,
+ image_url TEXT,
+ date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ host_id INTEGER REFERENCES users NOT NULL
+ );
+ CREATE INDEX IF NOT EXISTS eventhosts ON events(host_id);
+ `);
+
+
+const upsertUser = db.prepare(`
+ INSERT INTO users VALUES (@id, @username, @name, @email)
+ ON CONFLICT(id) DO NOTHING
+ `)
+
+USERS.map((user) => upsertUser.run(user));
+
+const upsertEvent = db.prepare(`
+ INSERT INTO events VALUES (@id, @title, @description, @image_url, @date, @host_id)
+ ON CONFLICT(id) DO NOTHING
+ `)
+
+EVENTS.map((event) => {
+ upsertEvent.run(event);
+});
+
+
+db.exec(`
+ CREATE TABLE IF NOT EXISTS rsvps (
+ event_id INTEGER REFERENCES events NOT NULL,
+ name TEXT NOT NULL,
+ email TEXT NOT NULL,
+ UNIQUE(event_id, email) ON CONFLICT REPLACE
+ );
+ CREATE INDEX IF NOT EXISTS rsvpevents ON rsvps(event_id);
+`);
+
+const upsertRSVP = db.prepare(`
+ INSERT INTO rsvps VALUES (@event_id, @name, @email)
+`);
+RSVPS.map((rsvp) => {
+ upsertRSVP.run(rsvp);
+});
+
+
+
+export default db; \ No newline at end of file
diff --git a/backend/src/routes/api.js b/backend/src/routes/api.js
new file mode 100644
index 0000000..2eb07d1
--- /dev/null
+++ b/backend/src/routes/api.js
@@ -0,0 +1,12 @@
+import { Router } from 'express';
+import usersRouter from './users.js';
+import eventsRouter from './events.js';
+
+
+const router = Router();
+
+router.use('/users', usersRouter);
+router.use('/events', eventsRouter);
+
+
+export default router;
diff --git a/backend/src/routes/events.js b/backend/src/routes/events.js
new file mode 100644
index 0000000..b95c747
--- /dev/null
+++ b/backend/src/routes/events.js
@@ -0,0 +1,97 @@
+import db from '../db.js';
+import { Router } from 'express';
+import { getUser } from './users.js';
+
+const router = Router();
+
+const joinHost = (event) => {
+ const host = getUser(event.host_id);
+ return { ...event, host };
+}
+
+const joinRSVPs = (event) => {
+ const { id } = event;
+ const getRSVPs = db.prepare('SELECT * FROM rsvps WHERE event_id = @id');
+ const rsvps = getRSVPs.all({ id });
+ return { ...event, rsvps };
+}
+
+const getEvent = (eventId) => {
+ const byId = db.prepare('SELECT * FROM events WHERE id = @eventId');
+ const event = byId.get({ eventId });
+ return joinHost(event);
+}
+
+router.get('/', (_req, res) => {
+ const listEvents = db.prepare(`SELECT * FROM events`);
+ const events = listEvents.all();
+ res.json(events.map(joinHost).map(joinRSVPs));
+});
+
+const insertEvent = db.prepare(`INSERT INTO events VALUES (@id, @title, @description, @image_url, @date, @host_id)`);
+
+router.post('/new', (req, res) => {
+ const data = req.body;
+ const { lastInsertRowid: id } = insertEvent.run(data);
+ const event = getEvent(id);
+ res.status(201).json(event);
+});
+
+router.get('/:id', (req, res) => {
+ const id = parseInt(req.params.id);
+ const event = getEvent(id);
+ if (!event) {
+ return res.status(404).json({ error: 'Event not found' });
+ }
+ res.json(event);
+});
+
+router.patch('/:id', (req, res) => {
+ const eventId = parseInt(req.params.id);
+ const patch = req.body;
+
+ const updateCol = db.prepare(`
+ UPDATE events SET @col = @val WHERE id = @eventId
+ `);
+ const updateEvent = db.transaction((patch) => {
+ for (const [col, val] of Object.entries(patch)) {
+ updateCol.run({ col, val, eventId });
+ }
+ });
+
+ updateEvent(Object.entries(patch));
+ const updated = getEvent(eventId);
+ res.json(updated);
+});
+
+router.delete('/:id', (req, res) => {
+ const deleteEvent = db.prepare(`DELETE FROM events WHERE id = @eventId`);
+ const eventId = parseInt(req.params.id);
+ const event = getEvent(eventId);
+ if (!event) {
+ return res.status(404).json({ error: 'Event not found' });
+ }
+ deleteEvent.run({ eventId });
+ res.json(event);
+});
+
+router.post('/:id/rsvp', (req, res) => {
+ const eventId = parseInt(req.params.id);
+ const { name, email } = req.body;
+
+ const getRSVP = db.prepare(`SELECT * FROM rsvps WHERE (event_id = ${eventId} AND email = '${email}')`);
+ const insertRSVP = db.prepare(`INSERT INTO rsvps VALUES (@eventId, @name, @email)`);
+
+ let [rsvp] = getRSVP.all({ eventId, email });
+ if (rsvp) {
+ // This email has already RSVPed
+ res.status(200).json({ rsvp });
+ } else {
+ // New RSVP
+ insertRSVP.run({ name, email, eventId });
+ rsvp = getRSVP.run({ eventId, email });
+ res.status(201).json({ rsvp });
+ }
+});
+
+export default router;
diff --git a/backend/src/routes/users.js b/backend/src/routes/users.js
new file mode 100644
index 0000000..6d874e9
--- /dev/null
+++ b/backend/src/routes/users.js
@@ -0,0 +1,65 @@
+import { Router } from 'express';
+import db from '../db.js';
+
+const router = Router();
+
+export const getUser = (userId) => {
+ const byId = db.prepare('SELECT * FROM users WHERE id = @userId');
+ return byId.get({ userId });
+}
+
+router.get('/', (_req, res) => {
+ const listUsers = db.prepare(`SELECT * FROM users`)
+ const users = listUsers.all();
+ res.json(users);
+});
+
+router.post('/new', (req, res) => {
+ const data = req.body;
+ const cols = Object.keys(data).join(' , ');
+ const vals = Object.values(data).join(' , ');
+ const insertUser = db.prepare(`INSERT INTO users(@cols) VALUES (@vals)`);
+ const { lastInsertRowid: id } = insertUser.run({ cols, vals });
+ const user = getUser(id);
+ res.json(user);
+});
+
+router.get('/:id', (req, res) => {
+ const id = req.params.id;
+ const user = getUser(id);
+ if (!user) {
+ res.status(404).json({ error: 'User not found' });
+ }
+ res.json(user);
+});
+
+router.patch('/:id', (req, res) => {
+ const userId = req.params.id;
+ const patch = req.body;
+
+ const updateCol = db.prepare(`
+ UPDATE users SET @col = @val WHERE id = @userId
+ `);
+ const updateUser = db.transaction((patch) => {
+ for (const [col, val] of Object.entries(patch)) {
+ updateCol.run(col, val, userId);
+ };
+ });
+
+ updateUser(Object.entries(patch));
+ const updated = getUser(userId);
+ res.json(updated);
+});
+
+router.delete('/:id', (req, res) => {
+ const deleteUser = db.prepare(`DELETE FROM users WHERE id = @userId`)
+ const userId = parseInt(req.params.id);
+ const user = getUser(userId);
+ if (!user) {
+ res.status(404).json({ error: 'User not found' });
+ }
+ deleteUser.run({ userId });
+ res.json(user);
+});
+
+export default router;
diff --git a/backend/src/server.js b/backend/src/server.js
new file mode 100644
index 0000000..1861150
--- /dev/null
+++ b/backend/src/server.js
@@ -0,0 +1,40 @@
+import express from 'express';
+import cookieParser from 'cookie-parser';
+import logger from 'morgan';
+import cors from 'cors';
+import helmet from 'helmet';
+
+import apiRouter from './routes/api.js';
+
+
+const PORT = process.env.PORT || 3000;
+const NODE_ENV = process.env.NODE_ENV || 'development';
+
+const app = express();
+
+
+app.use(logger('dev'));
+app.use(express.json());
+app.use(express.urlencoded({ extended: false }));
+app.use(cookieParser());
+app.use(helmet());
+app.use(cors({
+ origin: 'http://localhost:5173'
+}));
+
+app.use('/api', apiRouter);
+
+app.use((_req, res) => {
+ res.status(404).json({
+ error: 'Not Found',
+ endpoints: [
+ '/api/events',
+ '/api/users'
+ ]
+ });
+});
+
+app.listen(PORT, () => {
+ console.log(`\nServer listening at http://localhost:${PORT}`);
+ console.log(`Server running in ${NODE_ENV} mode\n`);
+}) \ No newline at end of file