diff --git a/next.config.js b/next.config.js index 767719fc4..065338eda 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,8 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = { + images:{ + domains:["lh3.googleusercontent.com","firebasestorage.googleapis.com"] + } +} module.exports = nextConfig diff --git a/package-lock.json b/package-lock.json index 0dcce7adf..2c0e3e6aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,11 +8,18 @@ "name": "starter", "version": "0.1.0", "dependencies": { + "@auth/prisma-adapter": "^1.0.1", + "@prisma/client": "^5.2.0", "eslint": "8.48.0", "eslint-config-next": "13.4.19", + "firebase": "^10.3.0", "next": "13.4.19", + "next-auth": "^4.23.1", + "prisma": "^5.2.0", "react": "18.2.0", - "react-dom": "18.2.0" + "react-dom": "18.2.0", + "react-quill": "^2.0.0", + "swr": "^2.2.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -23,6 +30,38 @@ "node": ">=0.10.0" } }, + "node_modules/@auth/core": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@auth/core/-/core-0.9.0.tgz", + "integrity": "sha512-W2WO0WCBg1T3P8+yjQPzurTQhPv6ecBYfJ2oE3uvXPAX5ZLWAMSjKFAIa9oLZy5pwrB+YehJZPnlIxVilhrVcg==", + "dependencies": { + "@panva/hkdf": "^1.0.4", + "cookie": "0.5.0", + "jose": "^4.11.1", + "oauth4webapi": "^2.0.6", + "preact": "10.11.3", + "preact-render-to-string": "5.2.3" + }, + "peerDependencies": { + "nodemailer": "^6.8.0" + }, + "peerDependenciesMeta": { + "nodemailer": { + "optional": true + } + } + }, + "node_modules/@auth/prisma-adapter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@auth/prisma-adapter/-/prisma-adapter-1.0.1.tgz", + "integrity": "sha512-sBp9l/jVr7l9y7rp2Pv6eoP7i8X2CgRNE3jDWJ0B/u+HnKRofXflD1cldPqRSAkJhqH3UxhVtMTEijT9FoofmQ==", + "dependencies": { + "@auth/core": "0.9.0" + }, + "peerDependencies": { + "@prisma/client": ">=2.26.0 || >=3 || >=4" + } + }, "node_modules/@babel/runtime": { "version": "7.22.11", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.11.tgz", @@ -86,6 +125,529 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@firebase/analytics": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", + "integrity": "sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/analytics-compat": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz", + "integrity": "sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q==", + "dependencies": { + "@firebase/analytics": "0.10.0", + "@firebase/analytics-types": "0.8.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/analytics-types": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.0.tgz", + "integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==" + }, + "node_modules/@firebase/app": { + "version": "0.9.17", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.17.tgz", + "integrity": "sha512-jBEGJ3km90M6sAc2O0baScDs0JAD1gGvZo7AniNVg06kvmaj+KEfGOaASwhlHNvIE2sYrOBqgobZADgaiYp5KQ==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "idb": "7.1.1", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/app-check": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.0.tgz", + "integrity": "sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/app-check-compat": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.7.tgz", + "integrity": "sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw==", + "dependencies": { + "@firebase/app-check": "0.8.0", + "@firebase/app-check-types": "0.5.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/app-check-interop-types": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.0.tgz", + "integrity": "sha512-xAxHPZPIgFXnI+vb4sbBjZcde7ZluzPPaSK7Lx3/nmuVk4TjZvnL8ONnkd4ERQKL8WePQySU+pRcWkh8rDf5Sg==" + }, + "node_modules/@firebase/app-check-types": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.0.tgz", + "integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==" + }, + "node_modules/@firebase/app-compat": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.17.tgz", + "integrity": "sha512-1vtnLdxe7lXN5jtv5hUpoKsHPvE56YUgelxmpY/OA1JELIH9ATBv/dsbDvSnsiaRkoQz/4F4B3iMma0JdxlIQA==", + "dependencies": { + "@firebase/app": "0.9.17", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/app-types": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz", + "integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==" + }, + "node_modules/@firebase/auth": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.3.0.tgz", + "integrity": "sha512-vjK4CHbY9aWdiVOrKi6mpa8z6uxeaf7LB/MZTHuZOiGHMcUoTGB6TeMbRShyqk1uaMrxhhZ5Ar/dR0965E1qyA==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@react-native-async-storage/async-storage": "^1.18.1" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } + } + }, + "node_modules/@firebase/auth-compat": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.4.6.tgz", + "integrity": "sha512-pKp1d4fSf+yoy1EBjTx9ISxlunqhW0vTICk0ByZ3e+Lp6ZIXThfUy4F1hAJlEafD/arM0oepRiAh7LXS1xn/BA==", + "dependencies": { + "@firebase/auth": "1.3.0", + "@firebase/auth-types": "0.12.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/auth-interop-types": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz", + "integrity": "sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg==" + }, + "node_modules/@firebase/auth-types": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.0.tgz", + "integrity": "sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/component": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz", + "integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==", + "dependencies": { + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.1.tgz", + "integrity": "sha512-VAhF7gYwunW4Lw/+RQZvW8dlsf2r0YYqV9W0Gi2Mz8+0TGg1mBJWoUtsHfOr8kPJXhcLsC4eP/z3x6L/Fvjk/A==", + "dependencies": { + "@firebase/auth-interop-types": "0.2.1", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database-compat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-1.0.1.tgz", + "integrity": "sha512-ky82yLIboLxtAIWyW/52a6HLMVTzD2kpZlEilVDok73pNPLjkJYowj8iaIWK5nTy7+6Gxt7d00zfjL6zckGdXQ==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/database": "1.0.1", + "@firebase/database-types": "1.0.0", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.0.tgz", + "integrity": "sha512-SjnXStoE0Q56HcFgNQ+9SsmJc0c8TqGARdI/T44KXy+Ets3r6x/ivhQozT66bMnCEjJRywYoxNurRTMlZF8VNg==", + "dependencies": { + "@firebase/app-types": "0.9.0", + "@firebase/util": "1.9.3" + } + }, + "node_modules/@firebase/firestore": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.1.2.tgz", + "integrity": "sha512-PZkXw2yfVcKgVvsd1rohOJ27bJz/p+TccwdraMgE701eDAj5xccGPmCVvMfFq0nz+BmQVuD5wUUVBBRMVCGOfw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "@firebase/webchannel-wrapper": "0.10.2", + "@grpc/grpc-js": "~1.8.17", + "@grpc/proto-loader": "^0.7.8", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10.10.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/firestore-compat": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.16.tgz", + "integrity": "sha512-+UsOsLLtFLIU1fGjFZE6BL3LzEwknkrzv/U3ZcNk/C6cKcThuGBu53yZ6gxW9S7o1GUFiIey86HQi8kwdcAVZA==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/firestore": "4.1.2", + "@firebase/firestore-types": "3.0.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/firestore-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.0.tgz", + "integrity": "sha512-Meg4cIezHo9zLamw0ymFYBD4SMjLb+ZXIbuN7T7ddXN6MGoICmOTq3/ltdCGoDCS2u+H1XJs2u/cYp75jsX9Qw==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/functions": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.10.0.tgz", + "integrity": "sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA==", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.0", + "@firebase/auth-interop-types": "0.2.1", + "@firebase/component": "0.6.4", + "@firebase/messaging-interop-types": "0.2.0", + "@firebase/util": "1.9.3", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/functions-compat": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.5.tgz", + "integrity": "sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/functions": "0.10.0", + "@firebase/functions-types": "0.6.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/functions-types": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.0.tgz", + "integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw==" + }, + "node_modules/@firebase/installations": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.4.tgz", + "integrity": "sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/installations-compat": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.4.tgz", + "integrity": "sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/installations-types": "0.5.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/installations-types": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.0.tgz", + "integrity": "sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg==", + "peerDependencies": { + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/installations/node_modules/idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + }, + "node_modules/@firebase/logger": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz", + "integrity": "sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/messaging": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.4.tgz", + "integrity": "sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/messaging-interop-types": "0.2.0", + "@firebase/util": "1.9.3", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/messaging-compat": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz", + "integrity": "sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/messaging": "0.12.4", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/messaging-interop-types": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz", + "integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ==" + }, + "node_modules/@firebase/messaging/node_modules/idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + }, + "node_modules/@firebase/performance": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz", + "integrity": "sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/performance-compat": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.4.tgz", + "integrity": "sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/performance": "0.6.4", + "@firebase/performance-types": "0.2.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/performance-types": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.0.tgz", + "integrity": "sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA==" + }, + "node_modules/@firebase/remote-config": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.4.tgz", + "integrity": "sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/remote-config-compat": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz", + "integrity": "sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/remote-config": "0.4.4", + "@firebase/remote-config-types": "0.3.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/remote-config-types": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.0.tgz", + "integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==" + }, + "node_modules/@firebase/storage": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.11.2.tgz", + "integrity": "sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/storage-compat": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.2.tgz", + "integrity": "sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/storage": "0.11.2", + "@firebase/storage-types": "0.8.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/storage-types": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.0.tgz", + "integrity": "sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/util": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz", + "integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/webchannel-wrapper": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.2.tgz", + "integrity": "sha512-xDxhD9++451HuCv3xKBEdSYaArX9NcokODXZYH/MxGw1XFFOz7OKkTRItZ5wf6npBN/inwp8dUZCP7SpAg46yQ==" + }, + "node_modules/@grpc/grpc-js": { + "version": "1.8.21", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.21.tgz", + "integrity": "sha512-KeyQeZpxeEBSqFVTi3q2K7PiPXmgBfECc4updA1ejCLjYmoAlvvM3ZMp5ztTDUCUQmoY3CpDxvchjO1+rFkoHg==", + "dependencies": { + "@grpc/proto-loader": "^0.7.0", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.9.tgz", + "integrity": "sha512-YJsOehVXzgurc+lLAxYnlSMc1p/Gu6VAvnfx0ATi2nzvr0YZcjhmZDeY8SeAKv1M7zE3aEJH0Xo9mK1iZ8GYoQ==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.4", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -296,6 +858,99 @@ "node": ">= 8" } }, + "node_modules/@panva/hkdf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.1.1.tgz", + "integrity": "sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/@prisma/client": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.2.0.tgz", + "integrity": "sha512-AiTjJwR4J5Rh6Z/9ZKrBBLel3/5DzUNntMohOy7yObVnVoTNVFi2kvpLZlFuKO50d7yDspOtW6XBpiAd0BVXbQ==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines-version": "5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f" + }, + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/engines": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.2.0.tgz", + "integrity": "sha512-dT7FOLUCdZmq+AunLqB1Iz+ZH/IIS1Fz2THmKZQ6aFONrQD/BQ5ecJ7g2wGS2OgyUFf4OaLam6/bxmgdOBDqig==", + "hasInstallScript": true + }, + "node_modules/@prisma/engines-version": { + "version": "5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f.tgz", + "integrity": "sha512-jsnKT5JIDIE01lAeCj2ghY9IwxkedhKNvxQeoyLs6dr4ZXynetD0vTy7u6wMJt8vVPv8I5DPy/I4CFaoXAgbtg==" + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@rushstack/eslint-patch": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.3.3.tgz", @@ -314,6 +969,19 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, + "node_modules/@types/node": { + "version": "20.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", + "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==" + }, + "node_modules/@types/quill": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@types/quill/-/quill-1.3.10.tgz", + "integrity": "sha512-IhW3fPW+bkt9MLNlycw8u8fWb7oO7W5URC9MfZYHBlA24rex9rs23D5DETChu1zvgVdc5ka64ICjJOgQMr6Shw==", + "dependencies": { + "parchment": "^1.1.2" + } + }, "node_modules/@typescript-eslint/parser": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz", @@ -736,6 +1404,27 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -757,6 +1446,14 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -791,6 +1488,22 @@ } } }, + "node_modules/deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dependencies": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -968,6 +1681,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1372,11 +2093,26 @@ "node": ">=0.10.0" } }, + "node_modules/eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -1421,6 +2157,17 @@ "reusify": "^1.0.4" } }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1458,6 +2205,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/firebase": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.3.0.tgz", + "integrity": "sha512-1dy6KqAvGlnFUEFE+IaHQNygG/4v1OwB5KVIC/G1/qwbHEFws0FVHe3n/aRZ+Oo0tINO9s2Lim496p9wprMbNQ==", + "dependencies": { + "@firebase/analytics": "0.10.0", + "@firebase/analytics-compat": "0.2.6", + "@firebase/app": "0.9.17", + "@firebase/app-check": "0.8.0", + "@firebase/app-check-compat": "0.3.7", + "@firebase/app-compat": "0.2.17", + "@firebase/app-types": "0.9.0", + "@firebase/auth": "1.3.0", + "@firebase/auth-compat": "0.4.6", + "@firebase/database": "1.0.1", + "@firebase/database-compat": "1.0.1", + "@firebase/firestore": "4.1.2", + "@firebase/firestore-compat": "0.3.16", + "@firebase/functions": "0.10.0", + "@firebase/functions-compat": "0.3.5", + "@firebase/installations": "0.6.4", + "@firebase/installations-compat": "0.2.4", + "@firebase/messaging": "0.12.4", + "@firebase/messaging-compat": "0.2.4", + "@firebase/performance": "0.6.4", + "@firebase/performance-compat": "0.2.4", + "@firebase/remote-config": "0.4.4", + "@firebase/remote-config-compat": "0.2.4", + "@firebase/storage": "0.11.2", + "@firebase/storage-compat": "0.3.2", + "@firebase/util": "1.9.3" + } + }, "node_modules/flat-cache": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", @@ -1519,6 +2299,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -1736,6 +2524,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" + }, + "node_modules/idb": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -1794,6 +2592,21 @@ "node": ">= 0.4" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -1902,6 +2715,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-generator-function": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", @@ -2105,6 +2926,14 @@ "reflect.getprototypeof": "^1.0.3" } }, + "node_modules/jose": { + "version": "4.14.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", + "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2208,11 +3037,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2347,6 +3191,65 @@ } } }, + "node_modules/next-auth": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.23.1.tgz", + "integrity": "sha512-mL083z8KgRtlrIV6CDca2H1kduWJuK/3pTS0Fe2og15KOm4v2kkLGdSDfc2g+019aEBrJUT0pPW2Xx42ImN1WA==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@panva/hkdf": "^1.0.2", + "cookie": "^0.5.0", + "jose": "^4.11.4", + "oauth": "^0.9.15", + "openid-client": "^5.4.0", + "preact": "^10.6.3", + "preact-render-to-string": "^5.1.19", + "uuid": "^8.3.2" + }, + "peerDependencies": { + "next": "^12.2.5 || ^13", + "nodemailer": "^6.6.5", + "react": "^17.0.2 || ^18", + "react-dom": "^17.0.2 || ^18" + }, + "peerDependenciesMeta": { + "nodemailer": { + "optional": true + } + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/oauth": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", + "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" + }, + "node_modules/oauth4webapi": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-2.3.0.tgz", + "integrity": "sha512-JGkb5doGrwzVDuHwgrR4nHJayzN4h59VCed6EW8Tql6iHDfZIabCJvg6wtbn5q6pyB2hZruI3b77Nudvq7NmvA==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -2355,6 +3258,14 @@ "node": ">=0.10.0" } }, + "node_modules/object-hash": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", + "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==", + "engines": { + "node": ">= 6" + } + }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -2363,6 +3274,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -2456,6 +3382,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oidc-token-hash": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz", + "integrity": "sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw==", + "engines": { + "node": "^10.13.0 || >=12.0.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2464,6 +3398,20 @@ "wrappy": "1" } }, + "node_modules/openid-client": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.4.3.tgz", + "integrity": "sha512-sVQOvjsT/sbSfYsQI/9liWQGVZH/Pp3rrtlGEwgk/bbHfrUDZ24DN57lAagIwFtuEu+FM9Ev7r85s8S/yPjimQ==", + "dependencies": { + "jose": "^4.14.4", + "lru-cache": "^6.0.0", + "object-hash": "^2.2.0", + "oidc-token-hash": "^5.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -2508,6 +3456,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parchment": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2595,6 +3548,26 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/preact": { + "version": "10.11.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.3.tgz", + "integrity": "sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/preact-render-to-string": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.3.tgz", + "integrity": "sha512-aPDxUn5o3GhWdtJtW0svRC2SS/l8D9MAgo2+AWml+BhDImb27ALf04Q2d+AHqUUOc6RdSXFIBVa2gxzgMKgtZA==", + "dependencies": { + "pretty-format": "^3.8.0" + }, + "peerDependencies": { + "preact": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2603,6 +3576,26 @@ "node": ">= 0.8.0" } }, + "node_modules/pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + }, + "node_modules/prisma": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.2.0.tgz", + "integrity": "sha512-FfFlpjVCkZwrqxDnP4smlNYSH1so+CbfjgdpioFzGGqlQAEm6VHAYSzV7jJgC3ebtY9dNOhDMS2+4/1DDSM7bQ==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines": "5.2.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -2613,6 +3606,29 @@ "react-is": "^16.13.1" } }, + "node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -2640,6 +3656,32 @@ } ] }, + "node_modules/quill": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "dependencies": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + } + }, + "node_modules/quill-delta": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "dependencies": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -2668,6 +3710,20 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-quill": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/react-quill/-/react-quill-2.0.0.tgz", + "integrity": "sha512-4qQtv1FtCfLgoD3PXAur5RyxuUbPXQGOHgTlFie3jtxp43mXDtzCKaOgQ3mLyZfi1PUlyjycfivKelFhy13QUg==", + "dependencies": { + "@types/quill": "^1.3.10", + "lodash": "^4.17.4", + "quill": "^1.3.7" + }, + "peerDependencies": { + "react": "^16 || ^17 || ^18", + "react-dom": "^16 || ^17 || ^18" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.3.tgz", @@ -2708,6 +3764,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", @@ -2802,6 +3866,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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" + } + ] + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -2893,6 +3976,24 @@ "node": ">=10.0.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -3027,6 +4128,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swr": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.2.tgz", + "integrity": "sha512-CbR41AoMD4TQBQw9ic3GTXspgfM9Y8Mdhb5Ob4uIKXhWqnRLItwA5fpGvB7SmSw3+zEjb0PdhiEumtUvYoQ+bQ==", + "dependencies": { + "client-only": "^0.0.1", + "use-sync-external-store": "^1.2.0" + }, + "peerDependencies": { + "react": "^16.11.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -3051,6 +4164,11 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/ts-api-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", @@ -3196,6 +4314,22 @@ "punycode": "^2.1.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -3208,6 +4342,41 @@ "node": ">=10.13.0" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3294,16 +4463,65 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "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==" }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 11062eba7..d26d8bef1 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,17 @@ "lint": "next lint" }, "dependencies": { + "@auth/prisma-adapter": "^1.0.1", + "@prisma/client": "^5.2.0", "eslint": "8.48.0", "eslint-config-next": "13.4.19", + "firebase": "^10.3.0", "next": "13.4.19", + "next-auth": "^4.23.1", + "prisma": "^5.2.0", "react": "18.2.0", - "react-dom": "18.2.0" + "react-dom": "18.2.0", + "react-quill": "^2.0.0", + "swr": "^2.2.2" } } diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 000000000..dbcffaa84 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,91 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "mongodb" + url = env("DATABASE_URL") +} + +model Account { + id String @id @default(cuid()) @map("_id") + userId String + type String + provider String + providerAccountId String + refresh_token String? + access_token String? + expires_at Int? + token_type String? + scope String? + id_token String? + session_state String? + + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@unique([provider, providerAccountId]) +} + +model Session { + id String @id @default(cuid()) @map("_id") + sessionToken String @unique + userId String + expires DateTime + user User @relation(fields: [userId], references: [id], onDelete: Cascade) +} + +model User { + id String @id @default(cuid()) @map("_id") + name String? + email String @unique + emailVerified DateTime? + image String? + accounts Account[] + sessions Session[] + Post Post[] + Comment Comment[] +} + +model VerificationToken { + identifier String @id @map("_id") + token String @unique + expires DateTime + + @@unique([identifier, token]) +} + +model Category { + id String @id @default(cuid()) @map("_id") + slug String @unique + title String + img String? + Posts Post[] +} + +model Post { + id String @id @default(cuid()) @map("_id") + createdAt DateTime @default(now()) + slug String @unique + title String + desc String + img String? + views Int @default(0) + catSlug String + cat Category @relation(fields: [catSlug], references: [slug]) + userEmail String + user User @relation(fields: [userEmail], references: [email]) + comments Comment[] +} + +model Comment { + id String @id @default(cuid()) @map("_id") + createdAt DateTime @default(now()) + desc String + userEmail String + user User @relation(fields: [userEmail], references: [email]) + postSlug String + post Post @relation(fields: [postSlug], references: [slug]) +} diff --git a/public/external.png b/public/external.png new file mode 100644 index 000000000..a244b5dd8 Binary files /dev/null and b/public/external.png differ diff --git a/public/image.png b/public/image.png new file mode 100644 index 000000000..b9245be00 Binary files /dev/null and b/public/image.png differ diff --git a/public/plus.png b/public/plus.png new file mode 100644 index 000000000..19c093a76 Binary files /dev/null and b/public/plus.png differ diff --git a/public/video.png b/public/video.png new file mode 100644 index 000000000..f0d8b431e Binary files /dev/null and b/public/video.png differ diff --git a/src/app/api/auth/[...nextauth]/route.js b/src/app/api/auth/[...nextauth]/route.js new file mode 100644 index 000000000..1810374ca --- /dev/null +++ b/src/app/api/auth/[...nextauth]/route.js @@ -0,0 +1,6 @@ +import { authOptions } from "@/utils/auth"; +import NextAuth from "next-auth"; + +const handler = NextAuth(authOptions); + +export { handler as GET, handler as POST }; \ No newline at end of file diff --git a/src/app/api/categories/route.js b/src/app/api/categories/route.js new file mode 100644 index 000000000..abe4fb180 --- /dev/null +++ b/src/app/api/categories/route.js @@ -0,0 +1,15 @@ +import prisma from "@/utils/connect"; +import { NextResponse } from "next/server"; + +export const GET = async () => { + try { + const categories = await prisma.category.findMany(); + + return new NextResponse(JSON.stringify(categories, { status: 200 })); + } catch (err) { + console.log(err); + return new NextResponse( + JSON.stringify({ message: "Something went wrong!" }, { status: 500 }) + ); + } +}; diff --git a/src/app/api/comments/route.js b/src/app/api/comments/route.js new file mode 100644 index 000000000..c1d68293a --- /dev/null +++ b/src/app/api/comments/route.js @@ -0,0 +1,51 @@ +import { getAuthSession } from "@/utils/auth"; +import prisma from "@/utils/connect"; +import { NextResponse } from "next/server"; + +// GET ALL COMMENTS OF A POST +export const GET = async (req) => { + const { searchParams } = new URL(req.url); + + const postSlug = searchParams.get("postSlug"); + + try { + const comments = await prisma.comment.findMany({ + where: { + ...(postSlug && { postSlug }), + }, + include: { user: true }, + }); + + return new NextResponse(JSON.stringify(comments, { status: 200 })); + } catch (err) { + // console.log(err); + return new NextResponse( + JSON.stringify({ message: "Something went wrong!" }, { status: 500 }) + ); + } +}; + +// CREATE A COMMENT +export const POST = async (req) => { + const session = await getAuthSession(); + + if (!session) { + return new NextResponse( + JSON.stringify({ message: "Not Authenticated!" }, { status: 401 }) + ); + } + + try { + const body = await req.json(); + const comment = await prisma.comment.create({ + data: { ...body, userEmail: session.user.email }, + }); + + return new NextResponse(JSON.stringify(comment, { status: 200 })); + } catch (err) { + console.log(err); + return new NextResponse( + JSON.stringify({ message: "Something went wrong!" }, { status: 500 }) + ); + } +}; diff --git a/src/app/api/posts/[slug]/route.js b/src/app/api/posts/[slug]/route.js new file mode 100644 index 000000000..dbcbd203a --- /dev/null +++ b/src/app/api/posts/[slug]/route.js @@ -0,0 +1,22 @@ +import prisma from "@/utils/connect"; +import { NextResponse } from "next/server"; + +// GET SINGLE POST +export const GET = async (req, { params }) => { + const { slug } = params; + + try { + const post = await prisma.post.update({ + where: { slug }, + data: { views: { increment: 1 } }, + include: { user: true }, + }); + + return new NextResponse(JSON.stringify(post, { status: 200 })); + } catch (err) { + console.log(err); + return new NextResponse( + JSON.stringify({ message: "Something went wrong!" }, { status: 500 }) + ); + } +}; diff --git a/src/app/api/posts/route.js b/src/app/api/posts/route.js new file mode 100644 index 000000000..7c5674f2a --- /dev/null +++ b/src/app/api/posts/route.js @@ -0,0 +1,74 @@ +import { getAuthSession } from "@/utils/auth"; +import prisma from "@/utils/connect"; +import { NextResponse } from "next/server"; + +export const GET = async (req) => { + const { searchParams } = new URL(req.url); + + const page = searchParams.get("page"); + const cat = searchParams.get("cat"); + + const POST_PER_PAGE = 2; + + const query = { + take: POST_PER_PAGE, + skip: POST_PER_PAGE * (page - 1), + where: { + ...(cat && { catSlug: cat }), + }, + }; + + + + + + + + + try { + const [posts, count] = await prisma.$transaction([ + prisma.post.findMany(query), + prisma.post.count({ where: query.where }), + ]); + return new NextResponse(JSON.stringify({ posts, count }, { status: 200 })); + } catch (err) { + console.log(err); + return new NextResponse( + JSON.stringify({ message: "Something went wrong!" }, { status: 500 }) + ); + } +}; + + + + + + + + + + +// CREATE A POST +export const POST = async (req) => { + const session = await getAuthSession(); + + if (!session) { + return new NextResponse( + JSON.stringify({ message: "Not Authenticated!" }, { status: 401 }) + ); + } + + try { + const body = await req.json(); + const post = await prisma.post.create({ + data: { ...body, userEmail: session.user.email }, + }); + + return new NextResponse(JSON.stringify(post, { status: 200 })); + } catch (err) { + console.log(err); + return new NextResponse( + JSON.stringify({ message: "Something went wrong!" }, { status: 500 }) + ); + } +}; diff --git a/src/app/blog/blogPage.module.css b/src/app/blog/blogPage.module.css new file mode 100644 index 000000000..91ed7c1c5 --- /dev/null +++ b/src/app/blog/blogPage.module.css @@ -0,0 +1,13 @@ +.title{ + background-color: coral; + color: white; + padding: 5px 10px; + text-align: center; + text-transform: capitalize; +} + +.content{ + display: flex; + gap: 50px; +} + diff --git a/src/app/blog/page.jsx b/src/app/blog/page.jsx new file mode 100644 index 000000000..544c07562 --- /dev/null +++ b/src/app/blog/page.jsx @@ -0,0 +1,20 @@ +import CardList from "@/components/cardList/CardList"; +import styles from "./blogPage.module.css"; +import Menu from "@/components/Menu/Menu"; + +const BlogPage = ({ searchParams }) => { + const page = parseInt(searchParams.page) || 1; + const { cat } = searchParams; + + return ( +
+

{cat} Blog

+
+ + +
+
+ ); +}; + +export default BlogPage; diff --git a/src/app/globals.css b/src/app/globals.css index e69de29bb..0e7cb4b13 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -0,0 +1,86 @@ +:root { + --bg: white; + --textColor: black; + --softBg: #f0f0f0; + --softTextColor: #626262; +} + +* { + padding: 0; + margin: 0; + box-sizing: border-box; +} + +body { + max-width: 100vw; + overflow-x: hidden; +} + +a { + color: inherit; + text-decoration: none; +} + +.dark { + --bg: #0f172a; + --textColor: #ddd; + --softBg: #1f273a; + --softTextColor: #a6a6a6; +} + +.light { + --bg: white; + --textColor: black; + --softBg: #f0f0f0; + --softTextColor: #626262; +} + +.container { + min-height: 100vh; + background-color: var(--bg); + color: var(--textColor); +} + +.wrapper { + max-width: 1536px; + margin-left: auto; + margin-right: auto; + padding-left: 80px; + padding-right: 80px; +} + +@media screen and (max-width: 1536px) { + .wrapper { + max-width: 1366px; + } +} +@media screen and (max-width: 1280px) { + .wrapper { + max-width: 1024px; + } +} +@media screen and (max-width: 1024px) { + .wrapper { + max-width: 768px; + padding-left: 40px; + padding-right: 40px; + } +} +@media screen and (max-width: 768px) { + .wrapper { + max-width: 640px; + } +} +@media screen and (max-width: 640px) { + .wrapper { + max-width: 475px; + } +} + +.ql-container{ + font-size: 28px !important; +} + +.quill > .ql-container > .ql-editor.ql-blank::before{ + color: #b3b3b1; +} \ No newline at end of file diff --git a/src/app/homepage.module.css b/src/app/homepage.module.css index e69de29bb..a12caa4fc 100644 --- a/src/app/homepage.module.css +++ b/src/app/homepage.module.css @@ -0,0 +1,4 @@ +.content{ + display: flex; + gap: 50px; +} \ No newline at end of file diff --git a/src/app/layout.js b/src/app/layout.js index 507fb0619..da097639f 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -1,17 +1,36 @@ -import './globals.css' -import { Inter } from 'next/font/google' +import Navbar from "@/components/navbar/Navbar"; +import "./globals.css"; +import { Inter } from "next/font/google"; +import Footer from "@/components/footer/Footer"; +import { ThemeContextProvider } from "@/context/ThemeContext"; +import ThemeProvider from "@/providers/ThemeProvider"; +import AuthProvider from "@/providers/AuthProvider"; -const inter = Inter({ subsets: ['latin'] }) +const inter = Inter({ subsets: ["latin"] }); export const metadata = { - title: 'Blog App', - description: 'The best blog app!', -} + title: "Lama Dev Blog App", + description: "The best blog app!", +}; export default function RootLayout({ children }) { return ( - {children} + + + + +
+
+ + {children} +
+
+
+
+
+ - ) + ); } diff --git a/src/app/login/loginPage.module.css b/src/app/login/loginPage.module.css new file mode 100644 index 000000000..067ec136e --- /dev/null +++ b/src/app/login/loginPage.module.css @@ -0,0 +1,55 @@ +.container { + display: flex; + align-items: center; + justify-content: center; + margin-top: 60px; +} + +.wrapper { + background-color: var(--softBg); + padding: 150px 200px; + display: flex; + flex-direction: column; + gap: 50px; + border-radius: 10px; +} + +.socialButton { + padding: 20px; + border-radius: 5px; + border: none; + color: white; + font-weight: bold; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; +} + +.socialButton:first-child { + background-color: #ff5555; +} + +.socialButton:nth-child(2) { + background-color: #111; +} + +.socialButton:nth-child(3) { + background-color: #087bea; +} + +@media screen and (max-width: 768px) { + .wrapper { + padding: 50px 100px; + } +} +@media screen and (max-width: 640px) { + .wrapper { + padding: 30px; + } + + .socialButton{ + font-weight: 400; + font-size: 14px; + } +} diff --git a/src/app/login/page.jsx b/src/app/login/page.jsx new file mode 100644 index 000000000..99a7cec45 --- /dev/null +++ b/src/app/login/page.jsx @@ -0,0 +1,32 @@ +"use client"; +import { signIn, useSession } from "next-auth/react"; +import styles from "./loginPage.module.css"; +import { useRouter } from "next/navigation"; + +const LoginPage = () => { + const { status } = useSession(); + + const router = useRouter(); + + if (status === "loading") { + return
Loading...
; + } + + if (status === "authenticated") { + router.push("/") + } + + return ( +
+
+
signIn("google")}> + Sign in with Google +
+
Sign in with Github
+
Sign in with Facebook
+
+
+ ); +}; + +export default LoginPage; diff --git a/src/app/page.jsx b/src/app/page.jsx index 02e8e8b92..0b10ed53e 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -1,5 +1,21 @@ +import Link from "next/link"; import styles from "./homepage.module.css"; +import Featured from "@/components/featured/Featured"; +import CategoryList from "@/components/categoryList/CategoryList"; +import CardList from "@/components/cardList/CardList"; +import Menu from "@/components/Menu/Menu"; -export default function Home() { - return
Hello
; +export default function Home({ searchParams }) { + const page = parseInt(searchParams.page) || 1; + + return ( +
+ + +
+ + +
+
+ ); } diff --git a/src/app/posts/[slug]/page.jsx b/src/app/posts/[slug]/page.jsx new file mode 100644 index 000000000..1dc8f715f --- /dev/null +++ b/src/app/posts/[slug]/page.jsx @@ -0,0 +1,64 @@ +import Menu from "@/components/Menu/Menu"; +import styles from "./singlePage.module.css"; +import Image from "next/image"; +import Comments from "@/components/comments/Comments"; + +const getData = async (slug) => { + const res = await fetch(`http://localhost:3000/api/posts/${slug}`, { + cache: "no-store", + }); + + if (!res.ok) { + throw new Error("Failed"); + } + + return res.json(); +}; + +const SinglePage = async ({ params }) => { + const { slug } = params; + + const data = await getData(slug); + + return ( +
+
+
+

{data?.title}

+
+ {data?.user?.image && ( +
+ +
+ )} +
+ {data?.user.name} + 01.01.2024 +
+
+
+ {data?.img && ( +
+ +
+ )} +
+
+
+ {typeof data?.desc === 'string' && +
+ } +
+ +
+
+ +
+
+ ); +}; + +export default SinglePage; diff --git a/src/app/posts/[slug]/singlePage.module.css b/src/app/posts/[slug]/singlePage.module.css new file mode 100644 index 000000000..e14a3604c --- /dev/null +++ b/src/app/posts/[slug]/singlePage.module.css @@ -0,0 +1,94 @@ +.infoContainer { + display: flex; + align-items: center; + gap: 50px; +} + +.textContainer { + flex: 1; +} + +.title { + font-size: 64px; + margin-bottom: 50px; +} + +.user { + display: flex; + align-items: center; + gap: 20px; +} + +.userImageContainer { + width: 50px; + height: 50px; + position: relative; +} + +.avatar { + border-radius: 50%; + object-fit: cover; +} + +.userTextContainer { + display: flex; + flex-direction: column; + gap: 5px; + color: var(--softTextColor); +} + +.username { + font-size: 20px; + font-weight: 500; +} + +.imageContainer { + flex: 1; + height: 350px; + position: relative; +} + +.image { + object-fit: cover; +} + +.content { + display: flex; + gap: 50px; +} + +.post { + flex: 5; + margin-top: 60px; +} + +.description p { + font-size: 20px; + font-weight: 300; + margin-bottom: 20px; +} + +@media screen and (max-width: 1536px) { + .title { + font-size: 54px; + } +} +@media screen and (max-width: 1280px) { + .title { + font-size: 48px; + } +} +@media screen and (max-width: 1024px) { + .imageContainer { + display: none; + } +} +@media screen and (max-width: 640px) { + .title { + font-size: 36px; + } + + .description p{ + font-size: 18px; + } +} diff --git a/src/app/write/page.jsx b/src/app/write/page.jsx new file mode 100644 index 000000000..e48239d81 --- /dev/null +++ b/src/app/write/page.jsx @@ -0,0 +1,154 @@ +"use client"; + +import Image from "next/image"; +import styles from "./writePage.module.css"; +import { useEffect, useState } from "react"; +import "react-quill/dist/quill.bubble.css"; +import { useRouter } from "next/navigation"; +import { useSession } from "next-auth/react"; +import { + getStorage, + ref, + uploadBytesResumable, + getDownloadURL, +} from "firebase/storage"; +import { app } from "@/utils/firebase"; +import ReactQuill from "react-quill"; + +const WritePage = () => { + const { status } = useSession(); + const router = useRouter(); + + const [open, setOpen] = useState(false); + const [file, setFile] = useState(null); + const [media, setMedia] = useState(""); + const [value, setValue] = useState(""); + const [title, setTitle] = useState(""); + const [catSlug, setCatSlug] = useState(""); + + useEffect(() => { + const storage = getStorage(app); + const upload = () => { + const name = new Date().getTime() + file.name; + const storageRef = ref(storage, name); + + const uploadTask = uploadBytesResumable(storageRef, file); + + uploadTask.on( + "state_changed", + (snapshot) => { + const progress = + (snapshot.bytesTransferred / snapshot.totalBytes) * 100; + console.log("Upload is " + progress + "% done"); + switch (snapshot.state) { + case "paused": + console.log("Upload is paused"); + break; + case "running": + console.log("Upload is running"); + break; + } + }, + (error) => {}, + () => { + getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => { + setMedia(downloadURL); + }); + } + ); + }; + + file && upload(); + }, [file]); + + if (status === "loading") { + return
Loading...
; + } + + if (status === "unauthenticated") { + router.push("/"); + } + + const slugify = (str) => + str + .toLowerCase() + .trim() + .replace(/[^\w\s-]/g, "") + .replace(/[\s_-]+/g, "-") + .replace(/^-+|-+$/g, ""); + + const handleSubmit = async () => { + const res = await fetch("/api/posts", { + method: "POST", + body: JSON.stringify({ + title, + desc: value, + img: media, + slug: slugify(title), + catSlug: catSlug || "style", //If not selected, choose the general category + }), + }); + + if (res.status === 200) { + const data = await res.json(); + router.push(`/posts/${data.slug}`); + } + }; + + return ( +
+ setTitle(e.target.value)} + /> + +
+ + {open && ( +
+ setFile(e.target.files[0])} + style={{ display: "none" }} + /> + + + +
+ )} + +
+ +
+ ); +}; + +export default WritePage; diff --git a/src/app/write/writePage.module.css b/src/app/write/writePage.module.css new file mode 100644 index 000000000..379c64b95 --- /dev/null +++ b/src/app/write/writePage.module.css @@ -0,0 +1,75 @@ +.container{ + position: relative; + display: flex; + flex-direction: column; +} + +.select{ + margin-bottom: 50px; + padding: 10px 20px; + margin-left: 50px; + width: max-content; +} + +.editor { + display: flex; + gap: 20px; + height: 700px; + position: relative; +} + +.button, +.addButton { + width: 36px; + height: 36px; + border-radius: 50%; + background-color: transparent; + border: 1px solid var(--textColor); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; +} + +.addButton { + border-color: #1a8917; +} + +.add { + display: flex; + gap: 20px; + background-color: var(--bg); + position: absolute; + z-index: 999; + width: 100%; + left: 50px; +} + +.input{ + padding: 50px; + font-size: 64px; + border: none; + outline: none; + background-color: transparent; + color: var(--textColor); +} + +.input::placeholder{ + color: #b3b3b1; +} + +.textArea { + width: 100%; +} + +.publish{ + position: absolute; + top: 0px; + right: 0px; + padding: 10px 20px; + border: none; + background-color: #1a8917; + color: white; + cursor: pointer; + border-radius: 20px; +} \ No newline at end of file diff --git a/src/components/Menu/Menu.jsx b/src/components/Menu/Menu.jsx new file mode 100644 index 000000000..421787728 --- /dev/null +++ b/src/components/Menu/Menu.jsx @@ -0,0 +1,24 @@ +import React from "react"; +import styles from "./menu.module.css"; +import Link from "next/link"; +import Image from "next/image"; +import MenuPosts from "../menuPosts/MenuPosts"; +import MenuCategories from "../menuCategories/MenuCategories"; + +const Menu = () => { + return ( +
+

{"What's hot"}

+

Most Popular

+ +

Discover by topic

+

Categories

+ +

Chosen by the editor

+

Editors Pick

+ +
+ ); +}; + +export default Menu; diff --git a/src/components/Menu/menu.module.css b/src/components/Menu/menu.module.css new file mode 100644 index 000000000..10404d145 --- /dev/null +++ b/src/components/Menu/menu.module.css @@ -0,0 +1,20 @@ +.container { + flex: 2; + margin-top: 60px; +} + +.subtitle { + color: gray; + font-size: 16px; + font-weight: 400; +} +.title { + font-size: 28px; +} + + +@media screen and (max-width: 1024px) { + .container { + display: none; + } +} \ No newline at end of file diff --git a/src/components/authLinks/AuthLinks.jsx b/src/components/authLinks/AuthLinks.jsx new file mode 100644 index 000000000..e9f74d2b3 --- /dev/null +++ b/src/components/authLinks/AuthLinks.jsx @@ -0,0 +1,52 @@ +"use client"; +import Link from "next/link"; +import styles from "./authLinks.module.css"; +import { useState } from "react"; +import { signOut, useSession } from "next-auth/react"; + +const AuthLinks = () => { + const [open, setOpen] = useState(false); + + const { status } = useSession(); + + return ( + <> + {status === "unauthenticated" ? ( + + Login + + ) : ( + <> + + Write + + + Logout + + + )} +
setOpen(!open)}> +
+
+
+
+ {open && ( +
+ Homepage + About + Contact + {status === "notauthenticated" ? ( + Login + ) : ( + <> + Write + Logout + + )} +
+ )} + + ); +}; + +export default AuthLinks; diff --git a/src/components/authLinks/authLinks.module.css b/src/components/authLinks/authLinks.module.css new file mode 100644 index 000000000..857547ca6 --- /dev/null +++ b/src/components/authLinks/authLinks.module.css @@ -0,0 +1,44 @@ +.link { + cursor: pointer; +} + +.burger { + width: 20px; + height: 16px; + flex-direction: column; + justify-content: space-between; + cursor: pointer; + display: none; +} + +.line { + width: 100%; + height: 2px; + background-color: var(--textColor); +} + +.responsiveMenu{ + position: absolute; + top: 100px; + left: 0; + background-color: var(--bg); + height: calc(100vh - 100px); + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 50px; + font-size: 36px; + z-index: 999; +} + +@media screen and (max-width: 640px) { + .burger { + display: flex; + } + + .link{ + display: none; + } +} diff --git a/src/components/card/Card.jsx b/src/components/card/Card.jsx new file mode 100644 index 000000000..fbd3e64a8 --- /dev/null +++ b/src/components/card/Card.jsx @@ -0,0 +1,33 @@ +import Image from "next/image"; +import styles from "./card.module.css"; +import Link from "next/link"; + +const Card = ({ key, item }) => { + return ( +
+ {item.img && ( +
+ +
+ )} +
+
+ + {item.createdAt.substring(0, 10)} -{" "} + + {item.catSlug} +
+ +

{item.title}

+ + {/*

{item.desc.substring(0, 60)}

*/} +
+ + Read More + +
+
+ ); +}; + +export default Card; diff --git a/src/components/card/card.module.css b/src/components/card/card.module.css new file mode 100644 index 000000000..97ba70ac0 --- /dev/null +++ b/src/components/card/card.module.css @@ -0,0 +1,50 @@ +.container { + margin-bottom: 50px; + display: flex; + align-items: center; + gap: 50px; +} + +.imageContainer { + flex: 1; + height: 350px; + position: relative; +} + +.image { + object-fit: cover; +} + +.textContainer { + flex: 1; + display: flex; + flex-direction: column; + gap: 30px; +} + +.date { + color: gray; +} + +.category { + color: crimson; + font-weight: 500; +} + +.desc { + font-size: 18px; + font-weight: 300; + color: var(--softTextColor); +} + +.link { + border-bottom: 1px solid crimson; + width: max-content; + padding: 2px 0px; +} + +@media screen and (max-width: 1280px) { + .imageContainer { + display: none; + } +} diff --git a/src/components/cardList/CardList.jsx b/src/components/cardList/CardList.jsx new file mode 100644 index 000000000..12dd45a29 --- /dev/null +++ b/src/components/cardList/CardList.jsx @@ -0,0 +1,43 @@ +import React from "react"; +import styles from "./cardList.module.css"; +import Pagination from "../pagination/Pagination"; +import Image from "next/image"; +import Card from "../card/Card"; + +const getData = async (page, cat) => { + const res = await fetch( + `http://localhost:3000/api/posts?page=${page}&cat=${cat || ""}`, + { + cache: "no-store", + } + ); + + if (!res.ok) { + throw new Error("Failed"); + } + + return res.json(); +}; + +const CardList = async ({ page, cat }) => { + const { posts, count } = await getData(page, cat); + + const POST_PER_PAGE = 2; + + const hasPrev = POST_PER_PAGE * (page - 1) > 0; + const hasNext = POST_PER_PAGE * (page - 1) + POST_PER_PAGE < count; + + return ( +
+

Recent Posts

+
+ {posts?.map((item) => ( + + ))} +
+ +
+ ); +}; + +export default CardList; diff --git a/src/components/cardList/cardList.module.css b/src/components/cardList/cardList.module.css new file mode 100644 index 000000000..4b88874e4 --- /dev/null +++ b/src/components/cardList/cardList.module.css @@ -0,0 +1,7 @@ +.container{ + flex:5 +} + +.title{ + margin: 50px 0px; +} \ No newline at end of file diff --git a/src/components/categoryList/CategoryList.jsx b/src/components/categoryList/CategoryList.jsx new file mode 100644 index 000000000..00a7ab2ce --- /dev/null +++ b/src/components/categoryList/CategoryList.jsx @@ -0,0 +1,47 @@ +import React from "react"; +import styles from "./categoryList.module.css"; +import Link from "next/link"; +import Image from "next/image"; + +const getData = async () => { + const res = await fetch("http://localhost:3000/api/categories", { + cache: "no-store", + }); + + if (!res.ok) { + throw new Error("Failed"); + } + + return res.json(); +}; + +const CategoryList = async () => { + const data = await getData(); + return ( +
+

Popular Categories

+
+ {data?.map((item) => ( + + {item.img && ( + + )} + {item.title} + + ))} +
+
+ ); +}; + +export default CategoryList; diff --git a/src/components/categoryList/categoryList.module.css b/src/components/categoryList/categoryList.module.css new file mode 100644 index 000000000..35b8244f5 --- /dev/null +++ b/src/components/categoryList/categoryList.module.css @@ -0,0 +1,73 @@ +.container { +} + +.title { + margin: 50px 0px; +} + +.categories { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + gap: 20px; +} + +.category { + display: flex; + align-items: center; + gap: 10px; + text-transform: capitalize; + width: 15%; + height: 80px; + justify-content: center; + border-radius: 10px; +} + +.category.style { + background-color: #57c4ff31; +} + +.category.fashion { + background-color: #da85c731; +} + +.category.food { + background-color: #7fb88133; +} + +.category.travel { + background-color: #ff795736; +} + +.category.culture { + background-color: #ffb04f45; +} + +.category.coding { + background-color: #5e4fff31; +} + +.image { + border-radius: 50%; +} + +@media screen and (max-width: 1280px) { + .category { + width: 20%; + } +} +@media screen and (max-width: 1024px) { + .category { + width: 25%; + } +} +@media screen and (max-width: 768px) { + .category { + width: 45%; + } +} +@media screen and (max-width: 640px) { + .category { + width: 100%; + } +} diff --git a/src/components/comments/Comments.jsx b/src/components/comments/Comments.jsx new file mode 100644 index 000000000..24d771d7f --- /dev/null +++ b/src/components/comments/Comments.jsx @@ -0,0 +1,86 @@ +"use client"; + +import Link from "next/link"; +import styles from "./comments.module.css"; +import Image from "next/image"; +import useSWR from "swr"; +import { useSession } from "next-auth/react"; +import { useState } from "react"; + +const fetcher = async (url) => { + const res = await fetch(url); + + const data = await res.json(); + + if (!res.ok) { + const error = new Error(data.message); + throw error; + } + + return data; +}; + +const Comments = ({ postSlug }) => { + const { status } = useSession(); + + const { data, mutate, isLoading } = useSWR( + `http://localhost:3000/api/comments?postSlug=${postSlug}`, + fetcher + ); + + const [desc, setDesc] = useState(""); + + const handleSubmit = async () => { + await fetch("/api/comments", { + method: "POST", + body: JSON.stringify({ desc, postSlug }), + }); + mutate(); + }; + + return ( +
+

Comments

+ {status === "authenticated" ? ( +
+