diff --git a/app/.firebaserc b/app/.firebaserc new file mode 100644 index 0000000..f33bc5b --- /dev/null +++ b/app/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "yoda-a67ff" + } +} diff --git a/app/.gitignore b/app/.gitignore index a547bf3..1cac559 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +.env \ No newline at end of file diff --git a/app/apphosting.yaml b/app/apphosting.yaml new file mode 100644 index 0000000..2325bef --- /dev/null +++ b/app/apphosting.yaml @@ -0,0 +1,23 @@ +# Settings for Backend (on Cloud Run). +# See https://firebase.google.com/docs/app-hosting/configure#cloud-run +runConfig: + minInstances: 0 + # maxInstances: 100 + # concurrency: 80 + # cpu: 1 + # memoryMiB: 512 + +# Environment variables and secrets. +# env: + # Configure environment variables. + # See https://firebase.google.com/docs/app-hosting/configure#user-defined-environment + # - variable: MESSAGE + # value: Hello world! + # availability: + # - BUILD + # - RUNTIME + + # Grant access to secrets in Cloud Secret Manager. + # See https://firebase.google.com/docs/app-hosting/configure#secret-parameters + # - variable: MY_SECRET + # secret: mySecretRef diff --git a/app/database.rules.json b/app/database.rules.json new file mode 100644 index 0000000..f54493d --- /dev/null +++ b/app/database.rules.json @@ -0,0 +1,7 @@ +{ + /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */ + "rules": { + ".read": false, + ".write": false + } +} \ No newline at end of file diff --git a/app/firebase.json b/app/firebase.json new file mode 100644 index 0000000..cb8dbfd --- /dev/null +++ b/app/firebase.json @@ -0,0 +1,28 @@ +{ + "emulators": { + "auth": { + "port": 9099 + }, + "firestore": { + "port": 8080 + }, + "database": { + "port": 9000 + }, + "storage": { + "port": 9199, + "rules": "storage.rules" + }, + "ui": { + "enabled": true + }, + "singleProjectMode": true + }, + "firestore": { + "rules": "firestore.rules", + "indexes": "firestore.indexes.json" + }, + "storage": { + "rules": "storage.rules" + } +} diff --git a/app/firestore.indexes.json b/app/firestore.indexes.json new file mode 100644 index 0000000..331b1e1 --- /dev/null +++ b/app/firestore.indexes.json @@ -0,0 +1,37 @@ +{ + "indexes": [ + { + "collectionGroup": "mentors", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "meetingMode", + "order": "ASCENDING" + }, + { + "fieldPath": "availability", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "utenti", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "meetingMode", + "order": "ASCENDING" + }, + { + "fieldPath": "occupazione", + "order": "ASCENDING" + }, + { + "fieldPath": "availability", + "order": "ASCENDING" + } + ] + } + ], + "fieldOverrides": [] +} diff --git a/app/firestore.rules b/app/firestore.rules new file mode 100644 index 0000000..ec3f67f --- /dev/null +++ b/app/firestore.rules @@ -0,0 +1,19 @@ +rules_version = '2'; + +service cloud.firestore { + match /databases/{database}/documents { + + // This rule allows anyone with your Firestore database reference to view, edit, + // and delete all data in your Firestore database. It is useful for getting + // started, but it is configured to expire after 30 days because it + // leaves your app open to attackers. At that time, all client + // requests to your Firestore database will be denied. + // + // Make sure to write security rules for your app before that time, or else + // all client requests to your Firestore database will be denied until you Update + // your rules + match /{document=**} { + allow read, write: if request.time < timestamp.date(2025, 1, 16); + } + } +} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index 0178c0a..dc99a84 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -8,12 +8,15 @@ "name": "yoda", "version": "0.0.0", "dependencies": { + "@firebasegen/default-connector": "file:dataconnect-generated/js/default-connector", "@radix-ui/react-slot": "^1.1.0", + "bcryptjs": "^2.4.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.468.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^7.1.1", "tailwind-merge": "^2.5.5", "tailwindcss-animate": "^1.0.7" }, @@ -34,6 +37,17 @@ "vite": "^6.0.1" } }, + "dataconnect-generated/js/default-connector": { + "name": "@firebasegen/default-connector", + "version": "1.0.0", + "license": "Apache-2.0", + "engines": { + "node": " >=18.0" + }, + "peerDependencies": { + "firebase": "^10.14.0 || ^11.0.0" + } + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -884,10 +898,697 @@ "dev": true, "license": "Apache-2.0", "dependencies": { - "levn": "^0.4.1" + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@firebase/analytics": { + "version": "0.10.10", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.10.tgz", + "integrity": "sha512-Psdo7c9g2SLAYh6u1XRA+RZ7ab2JfBVuAt/kLzXkhKZL/gS2cQUCMsOW5p0RIlDPRKqpdNSmvujd2TeRWLKOkQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/installations": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/analytics-compat": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.16.tgz", + "integrity": "sha512-Q/s+u/TEMSb2EDJFQMGsOzpSosybBl8HuoSEMyGZ99+0Pu7SIR9MPDGUjc8PKiCFQWDJ3QXxgqh1d/rujyAMbA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/analytics": "0.10.10", + "@firebase/analytics-types": "0.8.3", + "@firebase/component": "0.6.11", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/analytics-types": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.3.tgz", + "integrity": "sha512-VrIp/d8iq2g501qO46uGz3hjbDb8xzYMrbu8Tp0ovzIzrvJZ2fvmj649gTjge/b7cCCcjT0H37g1gVtlNhnkbg==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/app": { + "version": "0.10.17", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.10.17.tgz", + "integrity": "sha512-53sIYyAnYEPIZdaxuyq5OST7j4KBc2pqmktz+tEb1BIUSbXh8Gp4k/o6qzLelLpm4ngrBz7SRN0PZJqNRAyPog==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/app-check": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.10.tgz", + "integrity": "sha512-DWFfxxif/t+Ow4MmRUevDX+A3hVxm1rUf6y5ZP4sIomfnVCO1NNahqtsv9rb1/tKGkTeoVT40weiTS/WjQG1mA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/app-check-compat": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.17.tgz", + "integrity": "sha512-a/eadrGsY0MVCBPhrNbKUhoYpms4UKTYLKO7nswwSFVsm3Rw6NslQQCNLfvljcDqP4E7alQDRGJXjkxd/5gJ+Q==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app-check": "0.8.10", + "@firebase/app-check-types": "0.5.3", + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/app-check-interop-types": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.3.tgz", + "integrity": "sha512-gAlxfPLT2j8bTI/qfe3ahl2I2YcBQ8cFIBdhAQA4I2f3TndcO+22YizyGYuttLHPQEpWkhmpFW60VCFEPg4g5A==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/app-check-types": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.3.tgz", + "integrity": "sha512-hyl5rKSj0QmwPdsAxrI5x1otDlByQ7bvNvVt8G/XPO2CSwE++rmSVf3VEhaeOR4J8ZFaF0Z0NDSmLejPweZ3ng==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/app-compat": { + "version": "0.2.47", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.47.tgz", + "integrity": "sha512-TdEWGDp6kSwuO1mxiM2Fe39eLWygfyzqTZcoU3aPV0viqqphPCbBBnVjPbFJErZ4+yaS7uCWXEbFEP9m5/COKA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app": "0.10.17", + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/app-types": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.3.tgz", + "integrity": "sha512-kRVpIl4vVGJ4baogMDINbyrIOtOxqhkZQg4jTq3l8Lw6WSk0xfpEYzezFu+Kl4ve4fbPl79dvwRtaFqAC/ucCw==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/auth": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.8.1.tgz", + "integrity": "sha512-LX9N/Cf5Z35r5yqm2+5M3+2bRRe/+RFaa/+u4HDni7TA27C/Xm4XHLKcWcLg1BzjrS4zngSaBEOSODvp6RFOqQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.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.5.16", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.16.tgz", + "integrity": "sha512-YlYwJMBqAyv0ESy3jDUyshMhZlbUiwAm6B6+uUmigNDHU+uq7j4SFiDJEZlFFIz397yBzKn06SUdqutdQzGnCA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/auth": "1.8.1", + "@firebase/auth-types": "0.12.3", + "@firebase/component": "0.6.11", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/auth-interop-types": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.4.tgz", + "integrity": "sha512-JPgcXKCuO+CWqGDnigBtvo09HeBs5u/Ktc2GaFj2m01hLarbxthLNm7Fk8iOP1aqAtXV+fnnGj7U28xmk7IwVA==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/auth-types": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.3.tgz", + "integrity": "sha512-Zq9zI0o5hqXDtKg6yDkSnvMCMuLU6qAVS51PANQx+ZZX5xnzyNLEBO3GZgBUPsV5qIMFhjhqmLDxUqCbnAYy2A==", + "license": "Apache-2.0", + "peer": true, + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/component": { + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.11.tgz", + "integrity": "sha512-eQbeCgPukLgsKD0Kw5wQgsMDX5LeoI1MIrziNDjmc6XDq5ZQnuUymANQgAb2wp1tSF9zDSXyxJmIUXaKgN58Ug==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/data-connect": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.1.3.tgz", + "integrity": "sha512-FbAQpWNHownJx1VTCQI4ydbWGOZmSWXoFlirQn3ItHqsLJYSywqxSgDafzvyooifFh3J/2WqaM8y9hInnPcsTw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/auth-interop-types": "0.2.4", + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/database": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.10.tgz", + "integrity": "sha512-sWp2g92u7xT4BojGbTXZ80iaSIaL6GAL0pwvM0CO/hb0nHSnABAqsH7AhnWGsGvXuEvbPr7blZylPaR9J+GSuQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app-check-interop-types": "0.3.3", + "@firebase/auth-interop-types": "0.2.4", + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/database-compat": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.0.1.tgz", + "integrity": "sha512-IsFivOjdE1GrjTeKoBU/ZMenESKDXidFDzZzHBPQ/4P20ptGdrl3oLlWrV/QJqJ9lND4IidE3z4Xr5JyfUW1vg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/database": "1.0.10", + "@firebase/database-types": "1.0.7", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/database-types": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.7.tgz", + "integrity": "sha512-I7zcLfJXrM0WM+ksFmFdAMdlq/DFmpeMNa+/GNsLyFo5u/lX5zzkPzGe3srVWqaBQBY5KprylDGxOsP6ETfL0A==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app-types": "0.9.3", + "@firebase/util": "1.10.2" + } + }, + "node_modules/@firebase/firestore": { + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.5.tgz", + "integrity": "sha512-OO3rHvjC07jL2ITN255xH/UzCVSvh6xG8oTzQdFScQvFbcm1fjCL1hgAdpDZcx3vVcKMV+6ktr8wbllkB8r+FQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "@firebase/webchannel-wrapper": "1.0.3", + "@grpc/grpc-js": "~1.9.0", + "@grpc/proto-loader": "^0.7.8", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/firestore-compat": { + "version": "0.3.40", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.40.tgz", + "integrity": "sha512-18HopMN811KYBc9Ptpr1Rewwio0XF09FF3jc5wtV6rGyAs815SlFFw5vW7ZeLd43zv9tlEc2FzM0H+5Vr9ZRxw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/firestore": "4.7.5", + "@firebase/firestore-types": "3.0.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/firestore-types": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.3.tgz", + "integrity": "sha512-hD2jGdiWRxB/eZWF89xcK9gF8wvENDJkzpVFb4aGkzfEaKxVRD1kjz1t1Wj8VZEp2LCB53Yx1zD8mrhQu87R6Q==", + "license": "Apache-2.0", + "peer": true, + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/functions": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.12.0.tgz", + "integrity": "sha512-plTtzY/nT0jOgHzT0vB9qch4FpHFOhCnR8HhYBqqdArG6GOQMIruKZbiTyLybO8bcaaNgQ6kSm9yohGUwxHcIw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app-check-interop-types": "0.3.3", + "@firebase/auth-interop-types": "0.2.4", + "@firebase/component": "0.6.11", + "@firebase/messaging-interop-types": "0.2.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/functions-compat": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.17.tgz", + "integrity": "sha512-oj2XV8YsJYutyPCRYUfbN6swmfrL6zar0/qtqZsKT7P7btOiYRl+lD6fxtQaT+pKE5YgOBGZW//kLPZfY0jWhw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/functions": "0.12.0", + "@firebase/functions-types": "0.6.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/functions-types": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.3.tgz", + "integrity": "sha512-EZoDKQLUHFKNx6VLipQwrSMh01A1SaL3Wg6Hpi//x6/fJ6Ee4hrAeswK99I5Ht8roiniKHw4iO0B1Oxj5I4plg==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/installations": { + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.11.tgz", + "integrity": "sha512-w8fY8mw6fxJzsZM2ufmTtomopXl1+bn/syYon+Gpn+0p0nO1cIUEVEFrFazTLaaL9q1CaVhc3HmseRTsI3igAA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/util": "1.10.2", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/installations-compat": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.11.tgz", + "integrity": "sha512-SHRgw5LTa6v8LubmJZxcOCwEd1MfWQPUtKdiuCx2VMWnapX54skZd1PkQg0K4l3k+4ujbI2cn7FE6Li9hbChBw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/installations": "0.6.11", + "@firebase/installations-types": "0.5.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/installations-types": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.3.tgz", + "integrity": "sha512-2FJI7gkLqIE0iYsNQ1P751lO3hER+Umykel+TkLwHj6plzWVxqvfclPUZhcKFVQObqloEBTmpi2Ozn7EkCABAA==", + "license": "Apache-2.0", + "peer": true, + "peerDependencies": { + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/logger": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.4.tgz", + "integrity": "sha512-mH0PEh1zoXGnaR8gD1DeGeNZtWFKbnz9hDO91dIml3iou1gpOnLqXQ2dJfB71dj6dpmUjcQ6phY3ZZJbjErr9g==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/messaging": { + "version": "0.12.15", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.15.tgz", + "integrity": "sha512-Bz+qvWNEwEWAbYtG4An8hgcNco6NWNoNLuLbGVwPL2fAoCF1zz+dcaBp+iTR2+K199JyRyDT9yDPAXhNHNDaKQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/installations": "0.6.11", + "@firebase/messaging-interop-types": "0.2.3", + "@firebase/util": "1.10.2", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/messaging-compat": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.15.tgz", + "integrity": "sha512-mEKKASRvRWq1aBNHgioGsOYR2c5nBZpO7k90K794zjKe0WkGNf0k7PLs5SlCf8FKnzumEkhTAp/SjYxovuxa8A==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/messaging": "0.12.15", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/messaging-interop-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.3.tgz", + "integrity": "sha512-xfzFaJpzcmtDjycpDeCUj0Ge10ATFi/VHVIvEEjDNc3hodVBQADZ7BWQU7CuFpjSHE+eLuBI13z5F/9xOoGX8Q==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/performance": { + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.11.tgz", + "integrity": "sha512-FlkJFeqLlIeh5T4Am3uE38HVzggliDIEFy/fErEc1faINOUFCb6vQBEoNZGaXvRnTR8lh3X/hP7tv37C7BsK9g==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/installations": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/performance-compat": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.11.tgz", + "integrity": "sha512-DqeNBy51W2xzlklyC7Ht9JQ94HhTA08PCcM4MDeyG/ol3fqum/+YgtHWQ2IQuduqH9afETthZqLwCZiSgY7hiA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/performance": "0.6.11", + "@firebase/performance-types": "0.2.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/performance-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.3.tgz", + "integrity": "sha512-IgkyTz6QZVPAq8GSkLYJvwSLr3LS9+V6vNPQr0x4YozZJiLF5jYixj0amDtATf1X0EtYHqoPO48a9ija8GocxQ==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/remote-config": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.11.tgz", + "integrity": "sha512-9z0rgKuws2nj+7cdiqF+NY1QR4na6KnuOvP+jQvgilDOhGtKOcCMq5XHiu66i73A9kFhyU6QQ2pHXxcmaq1pBw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/installations": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/remote-config-compat": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.11.tgz", + "integrity": "sha512-zfIjpwPrGuIOZDmduukN086qjhZ1LnbJi/iYzgua+2qeTlO0XdlE1v66gJPwygGB3TOhT0yb9EiUZ3nBNttMqg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/remote-config": "0.4.11", + "@firebase/remote-config-types": "0.3.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/remote-config-types": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.3.tgz", + "integrity": "sha512-YlRI9CHxrk3lpQuFup9N1eohpwdWayKZUNZ/YeQ0PZoncJ66P32UsKUKqVXOaieTjJIOh7yH8JEzRdht5s+d6g==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebase/storage": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.13.4.tgz", + "integrity": "sha512-b1KaTTRiMupFurIhpGIbReaWev0k5O3ouTHkAPcEssT+FvU3q/1JwzvkX4+ZdB60Fc43Mbp8qQ1gWfT0Z2FP9Q==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/storage-compat": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.14.tgz", + "integrity": "sha512-Ok5FmXJiapaNAOQ8W8qppnfwgP8540jw2B8M0c4TFZqF4BD+CoKBxW0dRtOuLNGadLhzqqkDZZZtkexxrveQqA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.6.11", + "@firebase/storage": "0.13.4", + "@firebase/storage-types": "0.8.3", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/storage-types": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.3.tgz", + "integrity": "sha512-+Muk7g9uwngTpd8xn9OdF/D48uiQ7I1Fae7ULsWPuKoCH3HU7bfFPhxtJYzyhjdniowhuDpQcfPmuNRAqZEfvg==", + "license": "Apache-2.0", + "peer": true, + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/util": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.10.2.tgz", + "integrity": "sha512-qnSHIoE9FK+HYnNhTI8q14evyqbc/vHRivfB4TgCIUOl4tosmKSQlp7ltymOlMP4xVIJTg5wrkfcZ60X4nUf7Q==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@firebase/vertexai": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@firebase/vertexai/-/vertexai-1.0.2.tgz", + "integrity": "sha512-4dC9m2nD0tkfKJT5v+i27tELrmUePjFXW3CDAxhVHUEv647B2R7kqpGQnyPkNEeaXkCr76THe7GGg35EWn4lDw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app-check-interop-types": "0.3.3", + "@firebase/component": "0.6.11", + "@firebase/logger": "0.4.4", + "@firebase/util": "1.10.2", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/webchannel-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-1.0.3.tgz", + "integrity": "sha512-2xCRM9q9FlzGZCdgDMJwc0gyUkWFtkosy7Xxr6sFgQwn+wMNIWd7xIvYNauU1r64B5L5rsGKy/n9TKJ0aAFeqQ==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@firebasegen/default-connector": { + "resolved": "dataconnect-generated/js/default-connector", + "link": true + }, + "node_modules/@grpc/grpc-js": { + "version": "1.9.15", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.15.tgz", + "integrity": "sha512-nqE7Hc0AzI+euzUwDAy0aY5hCp10r734gMGRdU+qOPX0XSceI2ULrcXB5U2xSc5VkWwalCj4M7GzCAygZl2KoQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@grpc/proto-loader": "^0.7.8", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=6" } }, "node_modules/@humanfs/core": { @@ -1066,6 +1767,80 @@ "node": ">=14" } }, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause", + "peer": true + }, + "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==", + "license": "BSD-3-Clause", + "peer": true, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, + "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==", + "license": "BSD-3-Clause", + "peer": true + }, "node_modules/@radix-ui/react-compose-refs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", @@ -1410,6 +2185,12 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -1428,7 +2209,6 @@ "version": "22.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -1778,6 +2558,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", + "license": "MIT" + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -1984,6 +2770,84 @@ "url": "https://polar.sh/cva" } }, + "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==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/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==", + "license": "MIT", + "peer": true + }, + "node_modules/cliui/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==", + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/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==", + "license": "MIT", + "peer": true, + "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/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -2034,6 +2898,15 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2449,7 +3322,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2736,6 +3608,19 @@ "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==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -2778,6 +3663,43 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/firebase": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.1.0.tgz", + "integrity": "sha512-3OoNW3vBXmBLYJvcwbPCwfluptbDVp2zZYjrfHPVFAXfPgmyy/LWjidt+Sw2WNvRelsG0v++WN2Wor6J3OwDRg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/analytics": "0.10.10", + "@firebase/analytics-compat": "0.2.16", + "@firebase/app": "0.10.17", + "@firebase/app-check": "0.8.10", + "@firebase/app-check-compat": "0.3.17", + "@firebase/app-compat": "0.2.47", + "@firebase/app-types": "0.9.3", + "@firebase/auth": "1.8.1", + "@firebase/auth-compat": "0.5.16", + "@firebase/data-connect": "0.1.3", + "@firebase/database": "1.0.10", + "@firebase/database-compat": "2.0.1", + "@firebase/firestore": "4.7.5", + "@firebase/firestore-compat": "0.3.40", + "@firebase/functions": "0.12.0", + "@firebase/functions-compat": "0.3.17", + "@firebase/installations": "0.6.11", + "@firebase/installations-compat": "0.2.11", + "@firebase/messaging": "0.12.15", + "@firebase/messaging-compat": "0.2.15", + "@firebase/performance": "0.6.11", + "@firebase/performance-compat": "0.2.11", + "@firebase/remote-config": "0.4.11", + "@firebase/remote-config-compat": "0.2.11", + "@firebase/storage": "0.13.4", + "@firebase/storage-compat": "0.3.14", + "@firebase/util": "1.10.2", + "@firebase/vertexai": "1.0.2" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -2901,6 +3823,16 @@ "node": ">=6.9.0" } }, + "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==", + "license": "ISC", + "peer": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", @@ -3131,6 +4063,20 @@ "node": ">= 0.4" } }, + "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==", + "license": "MIT", + "peer": true + }, + "node_modules/idb": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==", + "license": "ISC", + "peer": true + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3771,6 +4717,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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==", + "license": "MIT", + "peer": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3778,6 +4731,13 @@ "dev": true, "license": "MIT" }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "license": "Apache-2.0", + "peer": true + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -4378,6 +5338,31 @@ "react-is": "^16.13.1" } }, + "node_modules/protobufjs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "peer": 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.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -4450,6 +5435,46 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.1.tgz", + "integrity": "sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==", + "license": "MIT", + "dependencies": { + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.1.1.tgz", + "integrity": "sha512-vSrQHWlJ5DCfyrhgo0k6zViOe9ToK8uT5XGSmnuC2R3/g261IdIMpZVqfjD6vWSXdnf5Czs4VA/V60oVR6/jnA==", + "license": "MIT", + "dependencies": { + "react-router": "7.1.1" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -4513,6 +5538,16 @@ "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==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "2.0.0-next.5", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", @@ -4632,6 +5667,27 @@ "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" + } + ], + "license": "MIT", + "peer": true + }, "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", @@ -4669,6 +5725,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -5122,6 +6184,19 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "license": "Apache-2.0" }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD", + "peer": true + }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5233,7 +6308,6 @@ "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true, "license": "MIT" }, "node_modules/update-browserslist-db": { @@ -5355,6 +6429,31 @@ } } }, + "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==", + "license": "Apache-2.0", + "peer": true, + "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==", + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5555,6 +6654,16 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -5574,6 +6683,80 @@ "node": ">= 14" } }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/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==", + "license": "MIT", + "peer": true + }, + "node_modules/yargs/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==", + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/app/package.json b/app/package.json index 3ac7a0d..a701869 100644 --- a/app/package.json +++ b/app/package.json @@ -10,12 +10,15 @@ "preview": "vite preview" }, "dependencies": { + "@firebasegen/default-connector": "file:dataconnect-generated/js/default-connector", "@radix-ui/react-slot": "^1.1.0", + "bcryptjs": "^2.4.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.468.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^7.1.1", "tailwind-merge": "^2.5.5", "tailwindcss-animate": "^1.0.7" }, diff --git a/app/public/vite.svg b/app/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/app/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/src/App.jsx b/app/src/App.jsx index 87d7cfc..e390405 100644 --- a/app/src/App.jsx +++ b/app/src/App.jsx @@ -1,38 +1,30 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' -import { Button } from './components/ui/button' +// App.jsx +import React, { useEffect } from "react"; +import { BrowserRouter, Routes, Route } from "react-router-dom"; +import Error404 from "./components/pages/Error404"; +import Error500 from "./components/pages/Error500"; +import Error403 from "./components/pages/Error403"; +import populateDatabase from "./populateFirebase"; // Importa la funzione di popolamento -function App() { - const [count, setCount] = useState(0) +const App = () => { + useEffect(() => { + // Popola il database all'avvio del progetto + populateDatabase(); + }, []); return ( - <> -
- + + + {/* Pagine di errore */} + } /> + } /> + } /> - - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.jsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- - ) -} + {/* Rotta di fallback */} + } /> + + + ); +}; -export default App +export default App; diff --git a/app/src/Documents/Documents1.pdf b/app/src/Documents/Documents1.pdf new file mode 100644 index 0000000..3601b99 Binary files /dev/null and b/app/src/Documents/Documents1.pdf differ diff --git a/app/src/Documents/Documents10.pdf b/app/src/Documents/Documents10.pdf new file mode 100644 index 0000000..4e4f1e9 Binary files /dev/null and b/app/src/Documents/Documents10.pdf differ diff --git a/app/src/Documents/Documents2.pdf b/app/src/Documents/Documents2.pdf new file mode 100644 index 0000000..a4092c0 Binary files /dev/null and b/app/src/Documents/Documents2.pdf differ diff --git a/app/src/Documents/Documents3.pdf b/app/src/Documents/Documents3.pdf new file mode 100644 index 0000000..450aa78 Binary files /dev/null and b/app/src/Documents/Documents3.pdf differ diff --git a/app/src/Documents/Documents4.pdf b/app/src/Documents/Documents4.pdf new file mode 100644 index 0000000..63a1cab Binary files /dev/null and b/app/src/Documents/Documents4.pdf differ diff --git a/app/src/Documents/Documents5.pdf b/app/src/Documents/Documents5.pdf new file mode 100644 index 0000000..805b092 Binary files /dev/null and b/app/src/Documents/Documents5.pdf differ diff --git a/app/src/Documents/Documents6.pdf b/app/src/Documents/Documents6.pdf new file mode 100644 index 0000000..faa8ca3 Binary files /dev/null and b/app/src/Documents/Documents6.pdf differ diff --git a/app/src/Documents/Documents7.pdf b/app/src/Documents/Documents7.pdf new file mode 100644 index 0000000..9705765 Binary files /dev/null and b/app/src/Documents/Documents7.pdf differ diff --git a/app/src/Documents/Documents8.pdf b/app/src/Documents/Documents8.pdf new file mode 100644 index 0000000..e23dd9a Binary files /dev/null and b/app/src/Documents/Documents8.pdf differ diff --git a/app/src/Documents/Documents9.pdf b/app/src/Documents/Documents9.pdf new file mode 100644 index 0000000..42c9273 Binary files /dev/null and b/app/src/Documents/Documents9.pdf differ diff --git a/app/src/Firebase/firebase.js b/app/src/Firebase/firebase.js new file mode 100644 index 0000000..db8c071 --- /dev/null +++ b/app/src/Firebase/firebase.js @@ -0,0 +1,27 @@ +import { initializeApp } from "firebase/app"; +import { getStorage, connectStorageEmulator } from "firebase/storage"; + +// La tua configurazione Firebase +const firebaseConfig = { + apiKey: import.meta.env.VITE_API_KEY, + authDomain: import.meta.env.VITE_AUTH_DOMAIN, + projectId: import.meta.env.VITE_PROJECT_ID, + storageBucket: import.meta.env.VITE_STORAGE_BUCKET, + messagingSenderId: import.meta.env.VITE_MESSAGING_SENDER_ID, + appId: import.meta.env.VITE_APP_ID, + measurementId: import.meta.env.VITE_MEASUREMENT_ID +}; + +// Inizializza Firebase +const app = initializeApp(firebaseConfig); + +// Configura Firebase Storage +const storage = getStorage(app); +if (window.location.hostname === "localhost") { + // Connetti l'emulatore di Firebase Storage alla porta 9199 + connectStorageEmulator(storage, "localhost", 9199); +} + +// Esporta app e storage +export { app, storage }; +export default app; \ No newline at end of file diff --git a/app/src/components/pages/Error403.jsx b/app/src/components/pages/Error403.jsx new file mode 100644 index 0000000..f2b2695 --- /dev/null +++ b/app/src/components/pages/Error403.jsx @@ -0,0 +1,41 @@ +import React from 'react'; + +const Error403 = () => { + return ( +
+

Errore: 403!

+

Accesso Negato

+

+ Non hai l'autorizzazione per accedere a questa risorsa. +

+ + Torna alla Home + +
+ ); +}; + +export default Error403; diff --git a/app/src/components/pages/Error404.jsx b/app/src/components/pages/Error404.jsx new file mode 100644 index 0000000..1d8341c --- /dev/null +++ b/app/src/components/pages/Error404.jsx @@ -0,0 +1,41 @@ +import React from 'react'; + +const Error404 = () => { + return ( +
+

Errore: 404!

+

Pagina non trovata

+

+ La pagina che stai cercando potrebbe essere stata rimossa o non esiste. +

+ + Torna alla Home + +
+ ); +}; + +export default Error404; diff --git a/app/src/components/pages/Error500.jsx b/app/src/components/pages/Error500.jsx new file mode 100644 index 0000000..46fd3a1 --- /dev/null +++ b/app/src/components/pages/Error500.jsx @@ -0,0 +1,41 @@ +import React from 'react'; + +const Error500 = () => { + return ( +
+

Errore: 500!

+

Errore del server

+

+ Ops! Qualcosa è andato storto sul server. Riprova più tardi. +

+ + Torna alla Home + +
+ ); +}; + +export default Error500; diff --git a/app/src/populateFirebase.js b/app/src/populateFirebase.js new file mode 100644 index 0000000..9229628 --- /dev/null +++ b/app/src/populateFirebase.js @@ -0,0 +1,669 @@ +import { getFirestore, setDoc, doc, getDoc, connectFirestoreEmulator } from "firebase/firestore"; +import { app } from "@/Firebase/firebase"; // Importa la configurazione Firebase +import { getStorage, ref, uploadBytes, getDownloadURL, connectStorageEmulator} from "firebase/storage"; + +// Ottieni Firestore +const db = getFirestore(app); +connectFirestoreEmulator(db, "localhost", 8080); + + +// Funzione per caricare un file locale su Firebase Storage Emulator e ottenere l'URL +async function uploadLocalFileToEmulator(storagePath, localFilePath) { + try { + // Ottieni il riferimento al servizio di storage + const storage = getStorage(app); + connectStorageEmulator(storage, "localhost", 9199); + // Configura il collegamento agli emulatori (deve essere fatto prima di utilizzare lo storage) + + const storageRef = ref(storage, storagePath); // Crea un riferimento nel storage + const snapshot = await uploadBytes(storageRef, localFilePath); // Carica il file + const downloadURL = await getDownloadURL(snapshot.ref); // Ottieni l'URL del file + return downloadURL; + } catch (error) { + console.error("Errore durante il caricamento del file sull'emulatore:", error); + return null; + } +} + +// Funzione per popolare il database +async function populateDatabase() { + try { + // Controllo se il database è già popolato + const checkDoc = doc(db, "meta", "populated"); + const checkSnapshot = await getDoc(checkDoc); + + if (checkSnapshot.exists()) { + console.log("Il database è già popolato. Salto il popolamento."); + return; + } + + console.log("Popolamento del database in corso..."); + + // Mentori + const mentors = [ + { + id: "mentor1", + data: { + availability: 10, + cognome: "Rossi", + competenze: "Machine Learning", + createdAt: "2024-12-23T22:07:19.275Z", + cv: null, + dataNascita: "1985-07-10", + email: "rossi.ml@gmail.com", + password: "000000", // Cripta la password con crypto + field: null, + meetingMode: "online", + nome: "Mario", + occupazione: "Machine Learning Engineer", + portfolioProjects: [], + sesso: "maschio", + titoloDiStudio: "laurea", + userType: "mentor", + }, + }, + { + id: "mentor2", + data: { + availability: 8, + cognome: "Bianchi", + competenze: "Data Science", + createdAt: "2024-12-22T11:45:10.000Z", + cv: "cv_bianchi.pdf", + dataNascita: "1990-03-12", + email: "bianchi.ds@gmail.com", + password: "000000", + field: null, + meetingMode: "in-person", + nome: "Luigi", + occupazione: "Data Scientist", + portfolioProjects: ["project1", "project2"], + sesso: "maschio", + titoloDiStudio: "dottorato", + userType: "mentor", + }, + }, + { + id: "mentor3", + data: { + availability: 15, + cognome: "Verdi", + competenze: "Artificial Intelligence", + createdAt: "2024-12-10T09:30:20.000Z", + cv: "cv_verdi.pdf", + dataNascita: "1980-01-25", + email: "verdi.ai@gmail.com", + password: "000000", + field: null, + meetingMode: "hybrid", + nome: "Giovanni", + occupazione: "AI Engineer", + portfolioProjects: ["ai_project1"], + sesso: "maschio", + titoloDiStudio: "laurea magistrale", + userType: "mentor", + }, + }, + { + id: "mentor4", + data: { + availability: 12, + cognome: "Gialli", + competenze: "Cloud Computing", + createdAt: "2024-11-05T14:22:55.000Z", + cv: "cv_gialli.pdf", + dataNascita: "1982-08-19", + email: "gialli.cc@gmail.com", + password: "000000", + field: null, + meetingMode: "online", + nome: "Alessandro", + occupazione: "Cloud Architect", + portfolioProjects: [], + sesso: "maschio", + titoloDiStudio: "laurea", + userType: "mentor", + }, + }, + { + id: "mentor5", + data: { + availability: 7, + cognome: "Neri", + competenze: "Blockchain", + createdAt: "2024-12-01T10:15:30.000Z", + cv: "cv_neri.pdf", + dataNascita: "1995-06-05", + email: "neri.bc@gmail.com", + password: "000000", + field: null, + meetingMode: "online", + nome: "Francesco", + occupazione: "Blockchain Developer", + portfolioProjects: ["blockchain_project1", "blockchain_project2"], + sesso: "maschio", + titoloDiStudio: "laurea", + userType: "mentor", + }, + } + ]; + + // Mentee + const mentees = [ + { + id: "mentee1", + data: { + cognome: "Bruni", + competenze: "JavaScript", + createdAt: "2024-12-23T19:15:04.053Z", + cv: "cv_bruni.pdf", + dataNascita: "1998-08-14", + email: "bruni.js@gmail.com", + password: "000000", + field: "web-development", + nome: "Giorgio", + occupazione: null, + portfolioProjects: [], + sesso: "maschio", + titoloDiStudio: "laurea triennale", + updatedAt: "2024-12-30T11:29:40.433Z", + userType: "mentee", + }, + }, + { + id: "mentee2", + data: { + cognome: "Luca", + competenze: "Python", + createdAt: "2024-11-18T14:45:20.000Z", + cv: "cv_luca.pdf", + dataNascita: "2000-05-20", + email: "luca.py@gmail.com", + password: "000000", + field: "data-science", + nome: "Matteo", + occupazione: "Junior Data Analyst", + portfolioProjects: ["data_analysis_project1"], + sesso: "maschio", + titoloDiStudio: "laurea triennale", + updatedAt: "2024-12-25T09:20:35.000Z", + userType: "mentee", + }, + }, + { + id: "mentee3", + data: { + cognome: "Verdi", + competenze: "Web Development", + createdAt: "2024-10-05T16:00:00.000Z", + cv: "cv_verdi.pdf", + dataNascita: "1999-03-30", + email: "verdi.web@gmail.com", + password: "000000", + field: "front-end", + nome: "Luca", + occupazione: null, + portfolioProjects: ["website_project1"], + sesso: "maschio", + titoloDiStudio: "diploma", + updatedAt: "2024-12-15T17:45:20.000Z", + userType: "mentee", + }, + }, + { + id: "mentee4", + data: { + cognome: "Alti", + competenze: "Java", + createdAt: "2024-09-22T11:30:15.000Z", + cv: "cv_alti.pdf", + dataNascita: "1997-11-12", + email: "alti.java@gmail.com", + password: "000000", + field: "software-engineering", + nome: "Marco", + occupazione: null, + portfolioProjects: [], + sesso: "maschio", + titoloDiStudio: "laurea magistrale", + updatedAt: "2024-12-05T12:40:10.000Z", + userType: "mentee", + }, + }, + { + id: "mentee5", + data: { + cognome: "Rossi", + competenze: "C#", + createdAt: "2024-08-18T14:50:35.000Z", + cv: "cv_rossi.pdf", + dataNascita: "2001-07-09", + email: "rossi.cs@gmail.com", + password: "000000", + field: "backend-development", + nome: "Giovanni", + occupazione: "Junior Developer", + portfolioProjects: ["backend_project1"], + sesso: "maschio", + titoloDiStudio: "diploma", + updatedAt: "2024-12-10T15:30:45.000Z", + userType: "mentee", + }, + } + ]; + + // Video + const videos = [ + { + id: "video1", + data: { + description: "Introduzione al Machine Learning", + thumbnail: "https://img.youtube.com/vi/WTt51-5K3L8/0.jpg", // Miniatura del video + title: "Machine Learning Basics", + videoUrl: "https://www.youtube.com/embed/WTt51-5K3L8?si=VNejAyWw1XD4Jh29", + }, + }, + { + id: "video2", + data: { + description: "Introduzione alla Data Science", + thumbnail: "https://img.youtube.com/vi/aeXnS26fy7E/0.jpg", + title: "Data Science Fundamentals", + videoUrl: "https://www.youtube.com/embed/aeXnS26fy7E?si=gSessn85myHNyGAl", + }, + }, + { + id: "video3", + data: { + description: "Guida al Cloud Computing", + thumbnail: "https://img.youtube.com/vi/da3NOtH3PXM/0.jpg", + title: "Cloud Computing Essentials", + videoUrl: "https://www.youtube.com/embed/da3NOtH3PXM?si=HvV7sB2Ysc6j5tpq", + }, + }, + { + id: "video4", + data: { + description: "Blockchain e il Futuro della Tecnologia", + thumbnail: "https://img.youtube.com/vi/cywucO-jxNw/0.jpg", + title: "Blockchain Overview", + videoUrl: "https://www.youtube.com/embed/cywucO-jxNw?si=KhCp7x3waMo5_80K", + }, + }, + { + id: "video5", + data: { + description: "Introduzione allo sviluppo Applicazioni Web Moderne", + thumbnail: "https://img.youtube.com/vi/aVnKGkaoOQ8/0.jpg", + title: "Web Development Trends", + videoUrl: "https://www.youtube.com/embed/aVnKGkaoOQ8?si=urRqltS14KApJaZK", + }, + }, + { + id: "video6", + data: { + description: "Guida all'intelligenza artificiale per principianti", + thumbnail: "default-thumbnail-url", + title: "AI for Beginners", + videoUrl: "Video6- Intelligenza Artificiale.mp4", + }, + }, + { + id: "video7", + data: { + description: "Introduzione alla programmazione in Python", + thumbnail: "default-thumbnail-url", + title: "Python Programming Basics", + videoUrl: "Video7- Phyton.mp4", + }, + }, + { + id: "video8", + data: { + description: "Corso completo su Data Science con Python", + thumbnail: "default-thumbnail-url", + title: "Data Science with Python", + videoUrl: "Video8- DataScience.mp4", + }, + }, + { + id: "video9", + data: { + description: "Come sviluppare applicazioni con React", + thumbnail: "default-thumbnail-url", + title: "React for Developers", + videoUrl: "Video9- React.mp4", + }, + }, + { + id: "video10", + data: { + description: "Fondamenti di Cloud Computing con AWS", + thumbnail: "default-thumbnail-url", + title: "Cloud Computing Essentials with AWS", + videoUrl: "Video10- Cloud Computing.mp4", + }, + } + ]; + + + + // Autori + const authors = [ + { + id: "author1", + data: { + email: "author1@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents1.pdf", + icon: "📄", + role: "Researcher", + title: "AI and Ethics", + type: "PDF", + }, + }, + { + id: "author2", + data: { + email: "author2@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents2.pdf", + icon: "📄", + role: "Engineer", + title: "Cloud Architecture", + type: "PDF", + }, + }, + { + id: "author3", + data: { + email: "author3@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents3.pdf", + icon: "📄", + role: "Scientist", + title: "Blockchain for Future", + type: "PDF", + }, + }, + { + id: "author4", + data: { + email: "author4@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents4.pdf", + icon: "📄", + role: "Developer", + title: "Web Development Practices", + type: "PDF", + }, + }, + { + id: "author5", + data: { + email: "author5@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents5.pdf", + icon: "📄", + role: "Technologist", + title: "Understanding AI", + type: "PDF", + }, + }, + { + id: "author6", + data: { + email: "author6@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents6.pdf", + icon: "📄", + role: "Software Engineer", + title: "Building Scalable Web Apps", + type: "PDF", + }, + }, + { + id: "author7", + data: { + email: "author7@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents7.pdf", + icon: "📄", + role: "Data Scientist", + title: "Predictive Modeling with Python", + type: "PDF", + }, + }, + { + id: "author8", + data: { + email: "author8@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents8.pdf", + icon: "📄", + role: "Cloud Architect", + title: "Designing Cloud Systems", + type: "PDF", + }, + }, + { + id: "author9", + data: { + email: "author9@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents9.pdf", + icon: "📄", + role: "Blockchain Developer", + title: "Blockchain Development", + type: "PDF", + }, + }, + { + id: "author10", + data: { + email: "author10@gmail.com", + createdAt: new Date(), + filePath: "../Documents/Documents10.pdf", + icon: "📄", + role: "AI Specialist", + title: "Ethics in Artificial Intelligence", + type: "PDF", + }, + } + ]; + + // Meetings + const meetings = [ + { + id: "meeting1", + data: { + date: new Date(), + description: "Sessione introduttiva", + menteeEmail: "mentee1@gmail.com", + menteeId: "mentee1", + menteeName: "Giorgio", + mentorId: "mentor1", + time: "14:00", + topic: "Introduzione al Machine Learning", + }, + }, + { + id: "meeting2", + data: { + date: new Date(), + description: "Analisi dei dati", + menteeEmail: "mentee2@gmail.com", + menteeId: "mentee2", + menteeName: "Matteo", + mentorId: "mentor2", + time: "10:00", + topic: "Data Science Overview", + }, + }, + { + id: "meeting3", + data: { + date: new Date(), + description: "Progetto Web", + menteeEmail: "mentee3@gmail.com", + menteeId: "mentee3", + menteeName: "Luca", + mentorId: "mentor3", + time: "16:00", + topic: "Web Development Trends", + }, + }, + { + id: "meeting4", + data: { + date: new Date(), + description: "Discussione Blockchain", + menteeEmail: "mentee4@gmail.com", + menteeId: "mentee4", + menteeName: "Marco", + mentorId: "mentor4", + time: "09:00", + topic: "Blockchain Basics", + }, + }, + { + id: "meeting5", + data: { + date: new Date(), + description: "Sessione Cloud", + menteeEmail: "mentee5@gmail.com", + menteeId: "mentee5", + menteeName: "Giovanni", + mentorId: "mentor5", + time: "11:00", + topic: "Cloud Computing Fundamentals", + }, + } + ]; + + // Notifiche + const notifiche = [ + { + id: "notifica1", + data: { + corpo: "Hai ricevuto una nuova mentorship!", + destinatario: "mentor1", + mittente: "mentee1", + oggetto: "Nuova Mentorship", + timeStamp: new Date(), + }, + }, + { + id: "notifica2", + data: { + corpo: "Nuovo messaggio da un mentee!", + destinatario: "mentor2", + mittente: "mentee2", + oggetto: "Nuovo messaggio", + timeStamp: new Date(), + }, + }, + { + id: "notifica3", + data: { + corpo: "Hai una nuova sessione di mentoring in programma!", + destinatario: "mentee3", + mittente: "mentor3", + oggetto: "Nuovo incontro programmato", + timeStamp: new Date(), + }, + }, + { + id: "notifica4", + data: { + corpo: "Una sessione di mentoring è stata completata!", + destinatario: "mentee4", + mittente: "mentor4", + oggetto: "Sessione completata", + timeStamp: new Date(), + }, + }, + { + id: "notifica5", + data: { + corpo: "Nuovo progetto disponibile!", + destinatario: "mentee5", + mittente: "mentor5", + oggetto: "Nuovo progetto", + timeStamp: new Date(), + }, + } + ]; + + // Inserimento dati + const collections = [ + { name: "utenti", items: [...mentors, ...mentees] }, + { name: "videos", items: videos }, + { name: "documents", items: authors }, + { name: "meetings", items: meetings }, + { name: "notifiche", items: notifiche }, + ]; + + for (const collection of collections) { + for (const item of collection.items) { + await setDoc(doc(db, collection.name, item.id), item.data); + } + } + uploadVideosToEmulators(videos, "./videos/") + uploadDocumentsToEmulators(authors, "./Documents/") + // Segna il database come popolato + await setDoc(checkDoc, { populated: true, date: new Date() }); + + console.log("Database popolato con successo!"); + } catch (error) { + console.error("Errore durante il popolamento del database:", error); + } +} + + // Funzione per caricare i video su Firebase Storage Emulator e aggiornare Firestore Emulator + async function uploadVideosToEmulators(videos, videosBasePath) { + try { + + for (const video of videos) { + if (!video.data.videoUrl.includes('https')){ + const localVideoPath = videosBasePath + video.data.videoUrl; + const storagePath = `videos/${video.data.videoUrl}`; + const videoUrl = await uploadLocalFileToEmulator(storagePath, localVideoPath); + + if (videoUrl) { + video.data.videoUrl = videoUrl; // Aggiorna l'URL con quello su Firebase Storage Emulator + + // Salva l'aggiornamento su Firestore Emulator + const videoDocRef = doc(db, "videos", video.id); // Crea un riferimento al documento + await setDoc(videoDocRef, video.data); // Aggiorna i dati su Firestore Emulator + } + } + } + } catch (error) { + console.error("Errore durante il caricamento dei video sugli emulatori:", error); + } +} + +// Funzione per caricare i documenti su Firebase Storage Emulator e aggiornare Firestore Emulator +async function uploadDocumentsToEmulators(authors, documentsBasePath) { + try { + + for (const author of authors) { + const localDocPath = documentsBasePath + author.data.filePath; + const storagePath = `documents/${author.data.filePath}`; + const fileUrl = await uploadLocalFileToEmulator(storagePath, localDocPath); + + if (fileUrl) { + author.data.filePath = fileUrl; // Aggiorna l'URL con quello su Firebase Storage Emulator + + // Salva l'aggiornamento su Firestore Emulator + const authorDocRef = doc(db, "authors", author.id); // Crea un riferimento al documento + await setDoc(authorDocRef, author.data); // Aggiorna i dati su Firestore Emulator + } + } + } catch (error) { + console.error("Errore durante il caricamento dei documenti sugli emulatori:", error); + } +} + +export default populateDatabase; diff --git a/app/src/videos/Video10- Cloud Computing.mp4 b/app/src/videos/Video10- Cloud Computing.mp4 new file mode 100644 index 0000000..5cd2d04 Binary files /dev/null and b/app/src/videos/Video10- Cloud Computing.mp4 differ diff --git a/app/src/videos/Video6- Intelligenza Artificiale.mp4 b/app/src/videos/Video6- Intelligenza Artificiale.mp4 new file mode 100644 index 0000000..2997551 Binary files /dev/null and b/app/src/videos/Video6- Intelligenza Artificiale.mp4 differ diff --git a/app/src/videos/Video7- Phyton.mp4 b/app/src/videos/Video7- Phyton.mp4 new file mode 100644 index 0000000..f3cde5a Binary files /dev/null and b/app/src/videos/Video7- Phyton.mp4 differ diff --git a/app/src/videos/Video8- DataScience.mp4 b/app/src/videos/Video8- DataScience.mp4 new file mode 100644 index 0000000..3fe3e97 Binary files /dev/null and b/app/src/videos/Video8- DataScience.mp4 differ diff --git a/app/src/videos/Video9- React.mp4 b/app/src/videos/Video9- React.mp4 new file mode 100644 index 0000000..94987e0 Binary files /dev/null and b/app/src/videos/Video9- React.mp4 differ diff --git a/app/storage.rules b/app/storage.rules new file mode 100644 index 0000000..a7db696 --- /dev/null +++ b/app/storage.rules @@ -0,0 +1,8 @@ +rules_version = '2'; +service firebase.storage { + match /b/{bucket}/o { + match /{allPaths=**} { + allow read, write: if true; + } + } +}