From 389f0b80dd86b0d8e924d300bdc8ded66eb28c3e Mon Sep 17 00:00:00 2001 From: Aishwary Vishwakarma Date: Sat, 3 Feb 2024 22:44:06 +0530 Subject: [PATCH 1/2] fix: cores issue and folder structure change --- backend/index.js | 99 ---- frontend/.env.production | 1 - package-lock.json | 546 +++++++++++++++++- package.json | 6 +- {backend => server}/.eslintrc.js | 0 {backend => server}/.gitignore | 0 {backend => server}/.nvmrc | 0 {backend => server}/.prettierrc | 0 server/index.js | 96 +++ .../middleware/userMiddleware.js | 0 {backend => server}/package.json | 4 +- {backend => server}/routes/user.js | 0 {backend => server}/routes/userProfile.js | 0 .../schema/userProfilesSchema.js | 0 {backend => server}/schema/userSchema.js | 0 {frontend => web}/.env.development | 0 web/.env.production | 2 + {frontend => web}/.eslintrc.json | 0 {frontend => web}/.gitignore | 0 {frontend => web}/.nvmrc | 0 {frontend => web}/.prettierrc | 0 {frontend => web}/README.md | 0 {frontend => web}/next.config.js | 0 {frontend => web}/package.json | 9 +- {frontend => web}/public/robots.txt | 0 {frontend => web}/src/API_KEY.ts | 0 {frontend => web}/src/DATA/PLANS.ts | 0 {frontend => web}/src/DATA/PROFILE_ICONS.ts | 0 {frontend => web}/src/END_POINTS.ts | 0 {frontend => web}/src/app/data.ts | 0 {frontend => web}/src/app/favicon.ico | Bin {frontend => web}/src/app/globals.css | 0 {frontend => web}/src/app/help/faq/page.tsx | 0 .../src/app/help/faq/styles.module.scss | 0 {frontend => web}/src/app/home/context.ts | 0 {frontend => web}/src/app/home/page.tsx | 0 .../src/app/home/styles.module.scss | 0 {frontend => web}/src/app/layout.tsx | 0 .../src/app/manage-profiles/page.tsx | 0 .../app/manage-profiles/styles.module.scss | 0 .../src/app/manage-profiles/types.ts | 0 {frontend => web}/src/app/page.tsx | 0 {frontend => web}/src/app/profiles/page.tsx | 0 .../src/app/profiles/styles.module.scss | 0 {frontend => web}/src/app/profiles/types.ts | 0 {frontend => web}/src/app/signup/page.tsx | 0 .../src/app/signup/payment/page.tsx | 0 .../src/app/signup/payment/styles.module.scss | 0 .../src/app/signup/plans/page.tsx | 0 .../src/app/signup/plans/styles.module.scss | 0 .../src/app/signup/plans/types.ts | 0 .../src/app/signup/registration/page.tsx | 0 .../signup/registration/styles.module.scss | 0 .../src/app/signup/registration/types.ts | 0 .../src/app/signup/styles.module.scss | 0 {frontend => web}/src/app/styles.module.scss | 0 .../src/assets/icons/Article.tsx | 0 .../src/assets/icons/CheckMark.tsx | 0 .../src/assets/icons/CheckMarkCircle.tsx | 0 {frontend => web}/src/assets/icons/Edit.tsx | 0 .../src/assets/icons/NetflixLogo.tsx | 0 .../loaders/BubbleLoader/BubbleLoader.tsx | 0 .../loaders/BubbleLoader/styles.module.scss | 0 .../loaders/CircularLoader/CircularLoader.tsx | 0 .../loaders/CircularLoader/styles.module.scss | 0 .../src/components/Footer/Footer.tsx | 0 .../src/components/Footer/styles.module.scss | 0 .../src/components/Layout/Layout.tsx | 0 .../src/components/LazyImage/LazyImage.tsx | 0 .../components/LazyImage/styles.module.scss | 0 .../src/components/Navbar/Navbar.tsx | 0 .../src/components/Navbar/styles.module.scss | 0 .../src/components/Protected/Protected.tsx | 0 .../commons/MovieCard/MovieCard.tsx | 0 .../commons/MovieCard/styles.module.scss | 0 .../MovieDetailModal/MovieDetailModal.tsx | 0 .../MovieDetailModal/styles.module.scss | 0 .../pages/home/MovieSection/MovieSection.tsx | 0 .../home/MovieSection/styles.module.scss | 0 .../pages/manageProfiles/Default/Default.tsx | 0 .../manageProfiles/Default/styles.module.scss | 0 .../EditProfile/EditProfile.tsx | 0 .../EditProfile/styles.module.scss | 0 .../pages/profiles/AddProfile/AddProfile.tsx | 0 .../profiles/AddProfile/styles.module.scss | 0 .../pages/profiles/Default/Default.tsx | 11 +- .../pages/profiles/Default/styles.module.scss | 0 .../src/components/pages/signup/Header.tsx | 0 .../pages/signup/Plans/Intro/Intro.tsx | 0 .../signup/Plans/Intro/styles.module.scss | 0 .../pages/signup/Plans/PlanCard.tsx | 0 .../pages/signup/Plans/Plans/Plans.tsx | 0 .../signup/Plans/Plans/styles.module.scss | 0 .../pages/signup/Plans/styles.module.scss | 0 .../pages/signup/Registration/Form/Form.tsx | 0 .../Registration/Form/styles.module.scss | 0 .../pages/signup/Registration/Intro/Intro.tsx | 0 .../Registration/Intro/styles.module.scss | 0 .../pages/signup/styles.module.scss | 0 .../src/components/sanity/SanityImage.tsx | 0 .../src/components/sanity/SanityRichText.tsx | 0 {frontend => web}/src/hooks/useMediaQuery.tsx | 0 {frontend => web}/src/types.ts | 0 {frontend => web}/src/utils/client.ts | 0 {frontend => web}/src/utils/isImageCached.ts | 0 {frontend => web}/src/utils/storage.ts | 0 {frontend => web}/tsconfig.json | 0 107 files changed, 659 insertions(+), 115 deletions(-) delete mode 100644 backend/index.js delete mode 100644 frontend/.env.production rename {backend => server}/.eslintrc.js (100%) rename {backend => server}/.gitignore (100%) rename {backend => server}/.nvmrc (100%) rename {backend => server}/.prettierrc (100%) create mode 100644 server/index.js rename {backend => server}/middleware/userMiddleware.js (100%) rename {backend => server}/package.json (91%) rename {backend => server}/routes/user.js (100%) rename {backend => server}/routes/userProfile.js (100%) rename {backend => server}/schema/userProfilesSchema.js (100%) rename {backend => server}/schema/userSchema.js (100%) rename {frontend => web}/.env.development (100%) create mode 100644 web/.env.production rename {frontend => web}/.eslintrc.json (100%) rename {frontend => web}/.gitignore (100%) rename {frontend => web}/.nvmrc (100%) rename {frontend => web}/.prettierrc (100%) rename {frontend => web}/README.md (100%) rename {frontend => web}/next.config.js (100%) rename {frontend => web}/package.json (83%) rename {frontend => web}/public/robots.txt (100%) rename {frontend => web}/src/API_KEY.ts (100%) rename {frontend => web}/src/DATA/PLANS.ts (100%) rename {frontend => web}/src/DATA/PROFILE_ICONS.ts (100%) rename {frontend => web}/src/END_POINTS.ts (100%) rename {frontend => web}/src/app/data.ts (100%) rename {frontend => web}/src/app/favicon.ico (100%) rename {frontend => web}/src/app/globals.css (100%) rename {frontend => web}/src/app/help/faq/page.tsx (100%) rename {frontend => web}/src/app/help/faq/styles.module.scss (100%) rename {frontend => web}/src/app/home/context.ts (100%) rename {frontend => web}/src/app/home/page.tsx (100%) rename {frontend => web}/src/app/home/styles.module.scss (100%) rename {frontend => web}/src/app/layout.tsx (100%) rename {frontend => web}/src/app/manage-profiles/page.tsx (100%) rename {frontend => web}/src/app/manage-profiles/styles.module.scss (100%) rename {frontend => web}/src/app/manage-profiles/types.ts (100%) rename {frontend => web}/src/app/page.tsx (100%) rename {frontend => web}/src/app/profiles/page.tsx (100%) rename {frontend => web}/src/app/profiles/styles.module.scss (100%) rename {frontend => web}/src/app/profiles/types.ts (100%) rename {frontend => web}/src/app/signup/page.tsx (100%) rename {frontend => web}/src/app/signup/payment/page.tsx (100%) rename {frontend => web}/src/app/signup/payment/styles.module.scss (100%) rename {frontend => web}/src/app/signup/plans/page.tsx (100%) rename {frontend => web}/src/app/signup/plans/styles.module.scss (100%) rename {frontend => web}/src/app/signup/plans/types.ts (100%) rename {frontend => web}/src/app/signup/registration/page.tsx (100%) rename {frontend => web}/src/app/signup/registration/styles.module.scss (100%) rename {frontend => web}/src/app/signup/registration/types.ts (100%) rename {frontend => web}/src/app/signup/styles.module.scss (100%) rename {frontend => web}/src/app/styles.module.scss (100%) rename {frontend => web}/src/assets/icons/Article.tsx (100%) rename {frontend => web}/src/assets/icons/CheckMark.tsx (100%) rename {frontend => web}/src/assets/icons/CheckMarkCircle.tsx (100%) rename {frontend => web}/src/assets/icons/Edit.tsx (100%) rename {frontend => web}/src/assets/icons/NetflixLogo.tsx (100%) rename {frontend => web}/src/assets/loaders/BubbleLoader/BubbleLoader.tsx (100%) rename {frontend => web}/src/assets/loaders/BubbleLoader/styles.module.scss (100%) rename {frontend => web}/src/assets/loaders/CircularLoader/CircularLoader.tsx (100%) rename {frontend => web}/src/assets/loaders/CircularLoader/styles.module.scss (100%) rename {frontend => web}/src/components/Footer/Footer.tsx (100%) rename {frontend => web}/src/components/Footer/styles.module.scss (100%) rename {frontend => web}/src/components/Layout/Layout.tsx (100%) rename {frontend => web}/src/components/LazyImage/LazyImage.tsx (100%) rename {frontend => web}/src/components/LazyImage/styles.module.scss (100%) rename {frontend => web}/src/components/Navbar/Navbar.tsx (100%) rename {frontend => web}/src/components/Navbar/styles.module.scss (100%) rename {frontend => web}/src/components/Protected/Protected.tsx (100%) rename {frontend => web}/src/components/commons/MovieCard/MovieCard.tsx (100%) rename {frontend => web}/src/components/commons/MovieCard/styles.module.scss (100%) rename {frontend => web}/src/components/commons/MovieDetailModal/MovieDetailModal.tsx (100%) rename {frontend => web}/src/components/commons/MovieDetailModal/styles.module.scss (100%) rename {frontend => web}/src/components/pages/home/MovieSection/MovieSection.tsx (100%) rename {frontend => web}/src/components/pages/home/MovieSection/styles.module.scss (100%) rename {frontend => web}/src/components/pages/manageProfiles/Default/Default.tsx (100%) rename {frontend => web}/src/components/pages/manageProfiles/Default/styles.module.scss (100%) rename {frontend => web}/src/components/pages/manageProfiles/EditProfile/EditProfile.tsx (100%) rename {frontend => web}/src/components/pages/manageProfiles/EditProfile/styles.module.scss (100%) rename {frontend => web}/src/components/pages/profiles/AddProfile/AddProfile.tsx (100%) rename {frontend => web}/src/components/pages/profiles/AddProfile/styles.module.scss (100%) rename {frontend => web}/src/components/pages/profiles/Default/Default.tsx (97%) rename {frontend => web}/src/components/pages/profiles/Default/styles.module.scss (100%) rename {frontend => web}/src/components/pages/signup/Header.tsx (100%) rename {frontend => web}/src/components/pages/signup/Plans/Intro/Intro.tsx (100%) rename {frontend => web}/src/components/pages/signup/Plans/Intro/styles.module.scss (100%) rename {frontend => web}/src/components/pages/signup/Plans/PlanCard.tsx (100%) rename {frontend => web}/src/components/pages/signup/Plans/Plans/Plans.tsx (100%) rename {frontend => web}/src/components/pages/signup/Plans/Plans/styles.module.scss (100%) rename {frontend => web}/src/components/pages/signup/Plans/styles.module.scss (100%) rename {frontend => web}/src/components/pages/signup/Registration/Form/Form.tsx (100%) rename {frontend => web}/src/components/pages/signup/Registration/Form/styles.module.scss (100%) rename {frontend => web}/src/components/pages/signup/Registration/Intro/Intro.tsx (100%) rename {frontend => web}/src/components/pages/signup/Registration/Intro/styles.module.scss (100%) rename {frontend => web}/src/components/pages/signup/styles.module.scss (100%) rename {frontend => web}/src/components/sanity/SanityImage.tsx (100%) rename {frontend => web}/src/components/sanity/SanityRichText.tsx (100%) rename {frontend => web}/src/hooks/useMediaQuery.tsx (100%) rename {frontend => web}/src/types.ts (100%) rename {frontend => web}/src/utils/client.ts (100%) rename {frontend => web}/src/utils/isImageCached.ts (100%) rename {frontend => web}/src/utils/storage.ts (100%) rename {frontend => web}/tsconfig.json (100%) diff --git a/backend/index.js b/backend/index.js deleted file mode 100644 index 05f5812..0000000 --- a/backend/index.js +++ /dev/null @@ -1,99 +0,0 @@ -const express = require('express') -const mongoose = require('mongoose') -const app = express() -const cors = require('cors') -const dotenv = require("dotenv") -const cookieParser = require('cookie-parser') -const bodyParser = require('body-parser') -const RedisStore = require("connect-redis").default -const session = require('express-session') -const redis = require('ioredis') - -const userRoutes = require('./routes/user') -const userProfileRoutes = require('./routes/userProfile') - -dotenv.config() - -app.use(express.json()) -// app.use( -// cors({ -// origin: ["http://localhost:3000", "https://netflix-five-zeta.vercel.app/"], -// methods: ["GET", "POST", "PUT", "DELETE"], -// credentials: true -// }) -// ) - -var allowedOrigins = [ - "http://localhost:3000", - 'https://netflix-five-zeta.vercel.app/', -]; - -app.use( - cors({ - origin: function (origin, callback) { - // allow requests with no origin - // (like mobile apps or curl requests) - // if(!origin) return callback(null, true); - if (allowedOrigins.indexOf(origin) === -1) { - var msg = - 'The CORS policy for this site does not allow access from the specified Origin.'; - return callback(new Error(msg), false); - } - return callback(null, true); - }, - }) -); - -app.use(cookieParser()) -app.use(bodyParser.urlencoded({ extended: true })) - -const redisClient = redis.createClient({ - host: process.env.REDIS_HOST, - port: process.env.REDIS_PORT, - password: process.env.REDIS_PASSWORD -}) - -redisClient.on('error', err => console.log(err)) - -redisClient.on("connect", () => { - console.log("Connected to redis instance!"); -}); - -const redisStore = new RedisStore({ client: redisClient }) - -app.use( - session({ - store: redisStore, - name: process.env.REDIS_SESSION_NAME, - secret: process.env.REDIS_SECRET, - resave: false, - saveUninitialized: false, - cookie:{ - secure: false, - httpOnly: false, - maxAge: 30 * 24 * 60 * 60 * 1000, - path: '/' - } - }) -) - -app.use('/', userRoutes) -app.use('/', userProfileRoutes) - -const uri = `mongodb+srv://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_CLUSTER}/?retryWrites=true&w=majority` -mongoose.connect( - uri, - { useNewUrlParser: true } -) - -const con = mongoose.connection - -con.on('open', () =>{ - console.log("database connected") -}) - -const PORT = process.env.PORT || 8000; - -app.listen(PORT, () => { - console.log(`backend running on ${PORT} :)`) -}) \ No newline at end of file diff --git a/frontend/.env.production b/frontend/.env.production deleted file mode 100644 index 5b84cbf..0000000 --- a/frontend/.env.production +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_HOST=https://lazy-pink-seagull-toga.cyclic.app/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 07101c3..dc59221 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,8 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-icons": "^4.8.0", - "react-loading-skeleton": "^3.3.1" + "react-loading-skeleton": "^3.3.1", + "sharp": "^0.33.2" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -2277,6 +2278,15 @@ "react": ">=16.8.0" } }, + "node_modules/@emnapi/runtime": { + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.45.0.tgz", + "integrity": "sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emotion/is-prop-valid": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", @@ -2764,6 +2774,437 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.2.tgz", + "integrity": "sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.2.tgz", + "integrity": "sha512-/rK/69Rrp9x5kaWBjVN07KixZanRr+W1OiyKdXcbjQD6KbW+obaTeBBtLUAtbBsnlTTmWthw99xqoOS7SsySDg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.1.tgz", + "integrity": "sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=11", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.1.tgz", + "integrity": "sha512-eVU/JYLPVjhhrd8Tk6gosl5pVlvsqiFlt50wotCvdkFGf+mDNBJxMh+bvav+Wt3EBnNZWq8Sp2I7XfSjm8siog==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=10.13", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.1.tgz", + "integrity": "sha512-FtdMvR4R99FTsD53IA3LxYGghQ82t3yt0ZQ93WMZ2xV3dqrb0E8zq4VHaTOuLEAuA83oDawHV3fd+BsAPadHIQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.1.tgz", + "integrity": "sha512-bnGG+MJjdX70mAQcSLxgeJco11G+MxTz+ebxlz8Y3dxyeb3Nkl7LgLI0mXupoO+u1wRNx/iRj5yHtzA4sde1yA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.1.tgz", + "integrity": "sha512-3+rzfAR1YpMOeA2zZNp+aYEzGNWK4zF3+sdMxuCS3ey9HhDbJ66w6hDSHDMoap32DueFwhhs3vwooAB2MaK4XQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.1.tgz", + "integrity": "sha512-3NR1mxFsaSgMMzz1bAnnKbSAI+lHXVTqAHgc1bgzjHuXjo4hlscpUxc0vFSAPKI3yuzdzcZOkq7nDPrP2F8Jgw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.1.tgz", + "integrity": "sha512-5aBRcjHDG/T6jwC3Edl3lP8nl9U2Yo8+oTl5drd1dh9Z1EBfzUKAJFUDTDisDjUwc7N4AjnPGfCA3jl3hY8uDg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.1.tgz", + "integrity": "sha512-dcT7inI9DBFK6ovfeWRe3hG30h51cBAP5JXlZfx6pzc/Mnf9HFCQDLtYf4MCBjxaaTfjCCjkBxcy3XzOAo5txw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.2.tgz", + "integrity": "sha512-Fndk/4Zq3vAc4G/qyfXASbS3HBZbKrlnKZLEJzPLrXoJuipFNNwTes71+Ki1hwYW5lch26niRYoZFAtZVf3EGA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.2.tgz", + "integrity": "sha512-pz0NNo882vVfqJ0yNInuG9YH71smP4gRSdeL09ukC2YLE6ZyZePAlWKEHgAzJGTiOh8Qkaov6mMIMlEhmLdKew==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.2.tgz", + "integrity": "sha512-MBoInDXDppMfhSzbMmOQtGfloVAflS2rP1qPcUIiITMi36Mm5YR7r0ASND99razjQUpHTzjrU1flO76hKvP5RA==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.2.tgz", + "integrity": "sha512-xUT82H5IbXewKkeF5aiooajoO1tQV4PnKfS/OZtb5DDdxS/FCI/uXTVZ35GQ97RZXsycojz/AJ0asoz6p2/H/A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.2.tgz", + "integrity": "sha512-F+0z8JCu/UnMzg8IYW1TMeiViIWBVg7IWP6nE0p5S5EPQxlLd76c8jYemG21X99UzFwgkRo5yz2DS+zbrnxZeA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.2.tgz", + "integrity": "sha512-+ZLE3SQmSL+Fn1gmSaM8uFusW5Y3J9VOf+wMGNnTtJUMUxFhv+P4UPaYEYT8tqnyYVaOVGgMN/zsOxn9pSsO2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.2.tgz", + "integrity": "sha512-fLbTaESVKuQcpm8ffgBD7jLb/CQLcATju/jxtTXR1XCLwbOQt+OL5zPHSDMmp2JZIeq82e18yE0Vv7zh6+6BfQ==", + "cpu": [ + "wasm32" + ], + "optional": true, + "dependencies": { + "@emnapi/runtime": "^0.45.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.2.tgz", + "integrity": "sha512-okBpql96hIGuZ4lN3+nsAjGeggxKm7hIRu9zyec0lnfB8E7Z6p95BuRZzDDXZOl2e8UmR4RhYt631i7mfmKU8g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.2.tgz", + "integrity": "sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@ioredis/commands": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", @@ -5262,6 +5703,18 @@ "@codemirror/view": "^6.0.0" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -5278,6 +5731,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -11294,6 +11756,75 @@ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, + "node_modules/sharp": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.2.tgz", + "integrity": "sha512-WlYOPyyPDiiM07j/UO+E720ju6gtNtHjEGg5vovUk1Lgxyjm2LFO+37Nt/UI3MMh2l6hxTWQWi7qk3cXJTutcQ==", + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "semver": "^7.5.4" + }, + "engines": { + "libvips": ">=8.15.1", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.2", + "@img/sharp-darwin-x64": "0.33.2", + "@img/sharp-libvips-darwin-arm64": "1.0.1", + "@img/sharp-libvips-darwin-x64": "1.0.1", + "@img/sharp-libvips-linux-arm": "1.0.1", + "@img/sharp-libvips-linux-arm64": "1.0.1", + "@img/sharp-libvips-linux-s390x": "1.0.1", + "@img/sharp-libvips-linux-x64": "1.0.1", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.1", + "@img/sharp-libvips-linuxmusl-x64": "1.0.1", + "@img/sharp-linux-arm": "0.33.2", + "@img/sharp-linux-arm64": "0.33.2", + "@img/sharp-linux-s390x": "0.33.2", + "@img/sharp-linux-x64": "0.33.2", + "@img/sharp-linuxmusl-arm64": "0.33.2", + "@img/sharp-linuxmusl-x64": "0.33.2", + "@img/sharp-wasm32": "0.33.2", + "@img/sharp-win32-ia32": "0.33.2", + "@img/sharp-win32-x64": "0.33.2" + } + }, + "node_modules/sharp/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp/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/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -11336,6 +11867,19 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "node_modules/simple-update-notifier": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", diff --git a/package.json b/package.json index 9eaf08e..53bb595 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "private": true, "version": "1.0.0", "workspaces": [ - "frontend", - "backend", - "CMS" + "web", + "server", + "cms" ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/backend/.eslintrc.js b/server/.eslintrc.js similarity index 100% rename from backend/.eslintrc.js rename to server/.eslintrc.js diff --git a/backend/.gitignore b/server/.gitignore similarity index 100% rename from backend/.gitignore rename to server/.gitignore diff --git a/backend/.nvmrc b/server/.nvmrc similarity index 100% rename from backend/.nvmrc rename to server/.nvmrc diff --git a/backend/.prettierrc b/server/.prettierrc similarity index 100% rename from backend/.prettierrc rename to server/.prettierrc diff --git a/server/index.js b/server/index.js new file mode 100644 index 0000000..ffef569 --- /dev/null +++ b/server/index.js @@ -0,0 +1,96 @@ +const express = require('express'); +const mongoose = require('mongoose'); +const app = express(); +const cors = require('cors'); +const dotenv = require('dotenv'); +const cookieParser = require('cookie-parser'); +const bodyParser = require('body-parser'); +const RedisStore = require('connect-redis').default; +const session = require('express-session'); +const redis = require('ioredis'); + +const userRoutes = require('./routes/user'); +const userProfileRoutes = require('./routes/userProfile'); + +dotenv.config(); + +app.use(express.json()); +app.use( + cors({ + origin: ['http://localhost:3000', 'https://netflix-five-zeta.vercel.app'], + methods: ['GET', 'POST', 'PUT', 'DELETE'], + credentials: true, + }) +); + +// var allowedOrigins = [ +// 'http://localhost:3000', +// 'https://netflix-five-zeta.vercel.app/', +// ]; + +// app.use( +// cors({ +// origin: function (origin, callback) { +// // allow requests with no origin +// // (like mobile apps or curl requests) +// // if(!origin) return callback(null, true); +// if (allowedOrigins.indexOf(origin) === -1) { +// var msg = +// 'The CORS policy for this site does not allow access from the specified Origin.'; +// return callback(new Error(msg), false); +// } +// return callback(null, true); +// }, +// }) +// ); + +app.use(cookieParser()); +app.use(bodyParser.urlencoded({extended: true})); + +const redisClient = redis.createClient({ + host: process.env.REDIS_HOST, + port: process.env.REDIS_PORT, + password: process.env.REDIS_PASSWORD, +}); + +redisClient.on('error', (err) => console.log(err)); + +redisClient.on('connect', () => { + console.log('Connected to redis instance!'); +}); + +const redisStore = new RedisStore({client: redisClient}); + +app.use( + session({ + store: redisStore, + name: process.env.REDIS_SESSION_NAME, + secret: process.env.REDIS_SECRET, + resave: false, + saveUninitialized: false, + cookie: { + secure: false, + httpOnly: false, + maxAge: 30 * 24 * 60 * 60 * 1000, + path: '/', + }, + }) +); + +app.use('/', userRoutes); +app.use('/', userProfileRoutes); + +const uri = `mongodb+srv://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_CLUSTER}/?retryWrites=true&w=majority`; +mongoose.connect(uri, {useNewUrlParser: true}); + +const con = mongoose.connection; + +con.on('open', () => { + console.log('database connected'); +}); + +const PORT = process.env.PORT || 8000; + +app.listen(PORT, () => { + console.log(`backend running on ${PORT} :)`); +}); diff --git a/backend/middleware/userMiddleware.js b/server/middleware/userMiddleware.js similarity index 100% rename from backend/middleware/userMiddleware.js rename to server/middleware/userMiddleware.js diff --git a/backend/package.json b/server/package.json similarity index 91% rename from backend/package.json rename to server/package.json index 703a636..f64595c 100644 --- a/backend/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "name": "netflix_backend", + "name": "netflix-backend", "version": "1.0.0", "description": "", "main": "index.js", @@ -7,7 +7,7 @@ "start": "node index.js", "lint": "npx eslint ." }, - "author": "", + "author": "Aishwary Vishwakarma", "license": "ISC", "dependencies": { "bcrypt": "^5.1.0", diff --git a/backend/routes/user.js b/server/routes/user.js similarity index 100% rename from backend/routes/user.js rename to server/routes/user.js diff --git a/backend/routes/userProfile.js b/server/routes/userProfile.js similarity index 100% rename from backend/routes/userProfile.js rename to server/routes/userProfile.js diff --git a/backend/schema/userProfilesSchema.js b/server/schema/userProfilesSchema.js similarity index 100% rename from backend/schema/userProfilesSchema.js rename to server/schema/userProfilesSchema.js diff --git a/backend/schema/userSchema.js b/server/schema/userSchema.js similarity index 100% rename from backend/schema/userSchema.js rename to server/schema/userSchema.js diff --git a/frontend/.env.development b/web/.env.development similarity index 100% rename from frontend/.env.development rename to web/.env.development diff --git a/web/.env.production b/web/.env.production new file mode 100644 index 0000000..5ee99e5 --- /dev/null +++ b/web/.env.production @@ -0,0 +1,2 @@ +# NEXT_PUBLIC_HOST=https://lazy-pink-seagull-toga.cyclic.app/ +NEXT_PUBLIC_HOST=http://localhost:8000/ \ No newline at end of file diff --git a/frontend/.eslintrc.json b/web/.eslintrc.json similarity index 100% rename from frontend/.eslintrc.json rename to web/.eslintrc.json diff --git a/frontend/.gitignore b/web/.gitignore similarity index 100% rename from frontend/.gitignore rename to web/.gitignore diff --git a/frontend/.nvmrc b/web/.nvmrc similarity index 100% rename from frontend/.nvmrc rename to web/.nvmrc diff --git a/frontend/.prettierrc b/web/.prettierrc similarity index 100% rename from frontend/.prettierrc rename to web/.prettierrc diff --git a/frontend/README.md b/web/README.md similarity index 100% rename from frontend/README.md rename to web/README.md diff --git a/frontend/next.config.js b/web/next.config.js similarity index 100% rename from frontend/next.config.js rename to web/next.config.js diff --git a/frontend/package.json b/web/package.json similarity index 83% rename from frontend/package.json rename to web/package.json index 88c41b2..a9ee65d 100644 --- a/frontend/package.json +++ b/web/package.json @@ -1,9 +1,9 @@ { - "name": "netflix", - "version": "0.1.0", + "name": "netflix-frontend", + "version": "1.0.0", "private": true, "scripts": { - "dev": "set PORT=3000 && next dev", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" @@ -18,7 +18,8 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-icons": "^4.8.0", - "react-loading-skeleton": "^3.3.1" + "react-loading-skeleton": "^3.3.1", + "sharp": "^0.33.2" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/frontend/public/robots.txt b/web/public/robots.txt similarity index 100% rename from frontend/public/robots.txt rename to web/public/robots.txt diff --git a/frontend/src/API_KEY.ts b/web/src/API_KEY.ts similarity index 100% rename from frontend/src/API_KEY.ts rename to web/src/API_KEY.ts diff --git a/frontend/src/DATA/PLANS.ts b/web/src/DATA/PLANS.ts similarity index 100% rename from frontend/src/DATA/PLANS.ts rename to web/src/DATA/PLANS.ts diff --git a/frontend/src/DATA/PROFILE_ICONS.ts b/web/src/DATA/PROFILE_ICONS.ts similarity index 100% rename from frontend/src/DATA/PROFILE_ICONS.ts rename to web/src/DATA/PROFILE_ICONS.ts diff --git a/frontend/src/END_POINTS.ts b/web/src/END_POINTS.ts similarity index 100% rename from frontend/src/END_POINTS.ts rename to web/src/END_POINTS.ts diff --git a/frontend/src/app/data.ts b/web/src/app/data.ts similarity index 100% rename from frontend/src/app/data.ts rename to web/src/app/data.ts diff --git a/frontend/src/app/favicon.ico b/web/src/app/favicon.ico similarity index 100% rename from frontend/src/app/favicon.ico rename to web/src/app/favicon.ico diff --git a/frontend/src/app/globals.css b/web/src/app/globals.css similarity index 100% rename from frontend/src/app/globals.css rename to web/src/app/globals.css diff --git a/frontend/src/app/help/faq/page.tsx b/web/src/app/help/faq/page.tsx similarity index 100% rename from frontend/src/app/help/faq/page.tsx rename to web/src/app/help/faq/page.tsx diff --git a/frontend/src/app/help/faq/styles.module.scss b/web/src/app/help/faq/styles.module.scss similarity index 100% rename from frontend/src/app/help/faq/styles.module.scss rename to web/src/app/help/faq/styles.module.scss diff --git a/frontend/src/app/home/context.ts b/web/src/app/home/context.ts similarity index 100% rename from frontend/src/app/home/context.ts rename to web/src/app/home/context.ts diff --git a/frontend/src/app/home/page.tsx b/web/src/app/home/page.tsx similarity index 100% rename from frontend/src/app/home/page.tsx rename to web/src/app/home/page.tsx diff --git a/frontend/src/app/home/styles.module.scss b/web/src/app/home/styles.module.scss similarity index 100% rename from frontend/src/app/home/styles.module.scss rename to web/src/app/home/styles.module.scss diff --git a/frontend/src/app/layout.tsx b/web/src/app/layout.tsx similarity index 100% rename from frontend/src/app/layout.tsx rename to web/src/app/layout.tsx diff --git a/frontend/src/app/manage-profiles/page.tsx b/web/src/app/manage-profiles/page.tsx similarity index 100% rename from frontend/src/app/manage-profiles/page.tsx rename to web/src/app/manage-profiles/page.tsx diff --git a/frontend/src/app/manage-profiles/styles.module.scss b/web/src/app/manage-profiles/styles.module.scss similarity index 100% rename from frontend/src/app/manage-profiles/styles.module.scss rename to web/src/app/manage-profiles/styles.module.scss diff --git a/frontend/src/app/manage-profiles/types.ts b/web/src/app/manage-profiles/types.ts similarity index 100% rename from frontend/src/app/manage-profiles/types.ts rename to web/src/app/manage-profiles/types.ts diff --git a/frontend/src/app/page.tsx b/web/src/app/page.tsx similarity index 100% rename from frontend/src/app/page.tsx rename to web/src/app/page.tsx diff --git a/frontend/src/app/profiles/page.tsx b/web/src/app/profiles/page.tsx similarity index 100% rename from frontend/src/app/profiles/page.tsx rename to web/src/app/profiles/page.tsx diff --git a/frontend/src/app/profiles/styles.module.scss b/web/src/app/profiles/styles.module.scss similarity index 100% rename from frontend/src/app/profiles/styles.module.scss rename to web/src/app/profiles/styles.module.scss diff --git a/frontend/src/app/profiles/types.ts b/web/src/app/profiles/types.ts similarity index 100% rename from frontend/src/app/profiles/types.ts rename to web/src/app/profiles/types.ts diff --git a/frontend/src/app/signup/page.tsx b/web/src/app/signup/page.tsx similarity index 100% rename from frontend/src/app/signup/page.tsx rename to web/src/app/signup/page.tsx diff --git a/frontend/src/app/signup/payment/page.tsx b/web/src/app/signup/payment/page.tsx similarity index 100% rename from frontend/src/app/signup/payment/page.tsx rename to web/src/app/signup/payment/page.tsx diff --git a/frontend/src/app/signup/payment/styles.module.scss b/web/src/app/signup/payment/styles.module.scss similarity index 100% rename from frontend/src/app/signup/payment/styles.module.scss rename to web/src/app/signup/payment/styles.module.scss diff --git a/frontend/src/app/signup/plans/page.tsx b/web/src/app/signup/plans/page.tsx similarity index 100% rename from frontend/src/app/signup/plans/page.tsx rename to web/src/app/signup/plans/page.tsx diff --git a/frontend/src/app/signup/plans/styles.module.scss b/web/src/app/signup/plans/styles.module.scss similarity index 100% rename from frontend/src/app/signup/plans/styles.module.scss rename to web/src/app/signup/plans/styles.module.scss diff --git a/frontend/src/app/signup/plans/types.ts b/web/src/app/signup/plans/types.ts similarity index 100% rename from frontend/src/app/signup/plans/types.ts rename to web/src/app/signup/plans/types.ts diff --git a/frontend/src/app/signup/registration/page.tsx b/web/src/app/signup/registration/page.tsx similarity index 100% rename from frontend/src/app/signup/registration/page.tsx rename to web/src/app/signup/registration/page.tsx diff --git a/frontend/src/app/signup/registration/styles.module.scss b/web/src/app/signup/registration/styles.module.scss similarity index 100% rename from frontend/src/app/signup/registration/styles.module.scss rename to web/src/app/signup/registration/styles.module.scss diff --git a/frontend/src/app/signup/registration/types.ts b/web/src/app/signup/registration/types.ts similarity index 100% rename from frontend/src/app/signup/registration/types.ts rename to web/src/app/signup/registration/types.ts diff --git a/frontend/src/app/signup/styles.module.scss b/web/src/app/signup/styles.module.scss similarity index 100% rename from frontend/src/app/signup/styles.module.scss rename to web/src/app/signup/styles.module.scss diff --git a/frontend/src/app/styles.module.scss b/web/src/app/styles.module.scss similarity index 100% rename from frontend/src/app/styles.module.scss rename to web/src/app/styles.module.scss diff --git a/frontend/src/assets/icons/Article.tsx b/web/src/assets/icons/Article.tsx similarity index 100% rename from frontend/src/assets/icons/Article.tsx rename to web/src/assets/icons/Article.tsx diff --git a/frontend/src/assets/icons/CheckMark.tsx b/web/src/assets/icons/CheckMark.tsx similarity index 100% rename from frontend/src/assets/icons/CheckMark.tsx rename to web/src/assets/icons/CheckMark.tsx diff --git a/frontend/src/assets/icons/CheckMarkCircle.tsx b/web/src/assets/icons/CheckMarkCircle.tsx similarity index 100% rename from frontend/src/assets/icons/CheckMarkCircle.tsx rename to web/src/assets/icons/CheckMarkCircle.tsx diff --git a/frontend/src/assets/icons/Edit.tsx b/web/src/assets/icons/Edit.tsx similarity index 100% rename from frontend/src/assets/icons/Edit.tsx rename to web/src/assets/icons/Edit.tsx diff --git a/frontend/src/assets/icons/NetflixLogo.tsx b/web/src/assets/icons/NetflixLogo.tsx similarity index 100% rename from frontend/src/assets/icons/NetflixLogo.tsx rename to web/src/assets/icons/NetflixLogo.tsx diff --git a/frontend/src/assets/loaders/BubbleLoader/BubbleLoader.tsx b/web/src/assets/loaders/BubbleLoader/BubbleLoader.tsx similarity index 100% rename from frontend/src/assets/loaders/BubbleLoader/BubbleLoader.tsx rename to web/src/assets/loaders/BubbleLoader/BubbleLoader.tsx diff --git a/frontend/src/assets/loaders/BubbleLoader/styles.module.scss b/web/src/assets/loaders/BubbleLoader/styles.module.scss similarity index 100% rename from frontend/src/assets/loaders/BubbleLoader/styles.module.scss rename to web/src/assets/loaders/BubbleLoader/styles.module.scss diff --git a/frontend/src/assets/loaders/CircularLoader/CircularLoader.tsx b/web/src/assets/loaders/CircularLoader/CircularLoader.tsx similarity index 100% rename from frontend/src/assets/loaders/CircularLoader/CircularLoader.tsx rename to web/src/assets/loaders/CircularLoader/CircularLoader.tsx diff --git a/frontend/src/assets/loaders/CircularLoader/styles.module.scss b/web/src/assets/loaders/CircularLoader/styles.module.scss similarity index 100% rename from frontend/src/assets/loaders/CircularLoader/styles.module.scss rename to web/src/assets/loaders/CircularLoader/styles.module.scss diff --git a/frontend/src/components/Footer/Footer.tsx b/web/src/components/Footer/Footer.tsx similarity index 100% rename from frontend/src/components/Footer/Footer.tsx rename to web/src/components/Footer/Footer.tsx diff --git a/frontend/src/components/Footer/styles.module.scss b/web/src/components/Footer/styles.module.scss similarity index 100% rename from frontend/src/components/Footer/styles.module.scss rename to web/src/components/Footer/styles.module.scss diff --git a/frontend/src/components/Layout/Layout.tsx b/web/src/components/Layout/Layout.tsx similarity index 100% rename from frontend/src/components/Layout/Layout.tsx rename to web/src/components/Layout/Layout.tsx diff --git a/frontend/src/components/LazyImage/LazyImage.tsx b/web/src/components/LazyImage/LazyImage.tsx similarity index 100% rename from frontend/src/components/LazyImage/LazyImage.tsx rename to web/src/components/LazyImage/LazyImage.tsx diff --git a/frontend/src/components/LazyImage/styles.module.scss b/web/src/components/LazyImage/styles.module.scss similarity index 100% rename from frontend/src/components/LazyImage/styles.module.scss rename to web/src/components/LazyImage/styles.module.scss diff --git a/frontend/src/components/Navbar/Navbar.tsx b/web/src/components/Navbar/Navbar.tsx similarity index 100% rename from frontend/src/components/Navbar/Navbar.tsx rename to web/src/components/Navbar/Navbar.tsx diff --git a/frontend/src/components/Navbar/styles.module.scss b/web/src/components/Navbar/styles.module.scss similarity index 100% rename from frontend/src/components/Navbar/styles.module.scss rename to web/src/components/Navbar/styles.module.scss diff --git a/frontend/src/components/Protected/Protected.tsx b/web/src/components/Protected/Protected.tsx similarity index 100% rename from frontend/src/components/Protected/Protected.tsx rename to web/src/components/Protected/Protected.tsx diff --git a/frontend/src/components/commons/MovieCard/MovieCard.tsx b/web/src/components/commons/MovieCard/MovieCard.tsx similarity index 100% rename from frontend/src/components/commons/MovieCard/MovieCard.tsx rename to web/src/components/commons/MovieCard/MovieCard.tsx diff --git a/frontend/src/components/commons/MovieCard/styles.module.scss b/web/src/components/commons/MovieCard/styles.module.scss similarity index 100% rename from frontend/src/components/commons/MovieCard/styles.module.scss rename to web/src/components/commons/MovieCard/styles.module.scss diff --git a/frontend/src/components/commons/MovieDetailModal/MovieDetailModal.tsx b/web/src/components/commons/MovieDetailModal/MovieDetailModal.tsx similarity index 100% rename from frontend/src/components/commons/MovieDetailModal/MovieDetailModal.tsx rename to web/src/components/commons/MovieDetailModal/MovieDetailModal.tsx diff --git a/frontend/src/components/commons/MovieDetailModal/styles.module.scss b/web/src/components/commons/MovieDetailModal/styles.module.scss similarity index 100% rename from frontend/src/components/commons/MovieDetailModal/styles.module.scss rename to web/src/components/commons/MovieDetailModal/styles.module.scss diff --git a/frontend/src/components/pages/home/MovieSection/MovieSection.tsx b/web/src/components/pages/home/MovieSection/MovieSection.tsx similarity index 100% rename from frontend/src/components/pages/home/MovieSection/MovieSection.tsx rename to web/src/components/pages/home/MovieSection/MovieSection.tsx diff --git a/frontend/src/components/pages/home/MovieSection/styles.module.scss b/web/src/components/pages/home/MovieSection/styles.module.scss similarity index 100% rename from frontend/src/components/pages/home/MovieSection/styles.module.scss rename to web/src/components/pages/home/MovieSection/styles.module.scss diff --git a/frontend/src/components/pages/manageProfiles/Default/Default.tsx b/web/src/components/pages/manageProfiles/Default/Default.tsx similarity index 100% rename from frontend/src/components/pages/manageProfiles/Default/Default.tsx rename to web/src/components/pages/manageProfiles/Default/Default.tsx diff --git a/frontend/src/components/pages/manageProfiles/Default/styles.module.scss b/web/src/components/pages/manageProfiles/Default/styles.module.scss similarity index 100% rename from frontend/src/components/pages/manageProfiles/Default/styles.module.scss rename to web/src/components/pages/manageProfiles/Default/styles.module.scss diff --git a/frontend/src/components/pages/manageProfiles/EditProfile/EditProfile.tsx b/web/src/components/pages/manageProfiles/EditProfile/EditProfile.tsx similarity index 100% rename from frontend/src/components/pages/manageProfiles/EditProfile/EditProfile.tsx rename to web/src/components/pages/manageProfiles/EditProfile/EditProfile.tsx diff --git a/frontend/src/components/pages/manageProfiles/EditProfile/styles.module.scss b/web/src/components/pages/manageProfiles/EditProfile/styles.module.scss similarity index 100% rename from frontend/src/components/pages/manageProfiles/EditProfile/styles.module.scss rename to web/src/components/pages/manageProfiles/EditProfile/styles.module.scss diff --git a/frontend/src/components/pages/profiles/AddProfile/AddProfile.tsx b/web/src/components/pages/profiles/AddProfile/AddProfile.tsx similarity index 100% rename from frontend/src/components/pages/profiles/AddProfile/AddProfile.tsx rename to web/src/components/pages/profiles/AddProfile/AddProfile.tsx diff --git a/frontend/src/components/pages/profiles/AddProfile/styles.module.scss b/web/src/components/pages/profiles/AddProfile/styles.module.scss similarity index 100% rename from frontend/src/components/pages/profiles/AddProfile/styles.module.scss rename to web/src/components/pages/profiles/AddProfile/styles.module.scss diff --git a/frontend/src/components/pages/profiles/Default/Default.tsx b/web/src/components/pages/profiles/Default/Default.tsx similarity index 97% rename from frontend/src/components/pages/profiles/Default/Default.tsx rename to web/src/components/pages/profiles/Default/Default.tsx index feea558..4f6581c 100644 --- a/frontend/src/components/pages/profiles/Default/Default.tsx +++ b/web/src/components/pages/profiles/Default/Default.tsx @@ -1,9 +1,10 @@ -import React from 'react'; -import styles from './styles.module.scss'; -import {type UserProfileModel} from '@/types'; import {SCREEN_STATE} from '@/app/profiles/types'; -import Link from 'next/link'; import BubbleLoader from '@/assets/loaders/BubbleLoader/BubbleLoader'; +import {type UserProfileModel} from '@/types'; +import Link from 'next/link'; +import React from 'react'; + +import styles from './styles.module.scss'; /* * Default Screen @@ -46,7 +47,7 @@ const Default: React.FC<{ ) : ( setIsNextPageLoading(true)} > Manage Profiles diff --git a/frontend/src/components/pages/profiles/Default/styles.module.scss b/web/src/components/pages/profiles/Default/styles.module.scss similarity index 100% rename from frontend/src/components/pages/profiles/Default/styles.module.scss rename to web/src/components/pages/profiles/Default/styles.module.scss diff --git a/frontend/src/components/pages/signup/Header.tsx b/web/src/components/pages/signup/Header.tsx similarity index 100% rename from frontend/src/components/pages/signup/Header.tsx rename to web/src/components/pages/signup/Header.tsx diff --git a/frontend/src/components/pages/signup/Plans/Intro/Intro.tsx b/web/src/components/pages/signup/Plans/Intro/Intro.tsx similarity index 100% rename from frontend/src/components/pages/signup/Plans/Intro/Intro.tsx rename to web/src/components/pages/signup/Plans/Intro/Intro.tsx diff --git a/frontend/src/components/pages/signup/Plans/Intro/styles.module.scss b/web/src/components/pages/signup/Plans/Intro/styles.module.scss similarity index 100% rename from frontend/src/components/pages/signup/Plans/Intro/styles.module.scss rename to web/src/components/pages/signup/Plans/Intro/styles.module.scss diff --git a/frontend/src/components/pages/signup/Plans/PlanCard.tsx b/web/src/components/pages/signup/Plans/PlanCard.tsx similarity index 100% rename from frontend/src/components/pages/signup/Plans/PlanCard.tsx rename to web/src/components/pages/signup/Plans/PlanCard.tsx diff --git a/frontend/src/components/pages/signup/Plans/Plans/Plans.tsx b/web/src/components/pages/signup/Plans/Plans/Plans.tsx similarity index 100% rename from frontend/src/components/pages/signup/Plans/Plans/Plans.tsx rename to web/src/components/pages/signup/Plans/Plans/Plans.tsx diff --git a/frontend/src/components/pages/signup/Plans/Plans/styles.module.scss b/web/src/components/pages/signup/Plans/Plans/styles.module.scss similarity index 100% rename from frontend/src/components/pages/signup/Plans/Plans/styles.module.scss rename to web/src/components/pages/signup/Plans/Plans/styles.module.scss diff --git a/frontend/src/components/pages/signup/Plans/styles.module.scss b/web/src/components/pages/signup/Plans/styles.module.scss similarity index 100% rename from frontend/src/components/pages/signup/Plans/styles.module.scss rename to web/src/components/pages/signup/Plans/styles.module.scss diff --git a/frontend/src/components/pages/signup/Registration/Form/Form.tsx b/web/src/components/pages/signup/Registration/Form/Form.tsx similarity index 100% rename from frontend/src/components/pages/signup/Registration/Form/Form.tsx rename to web/src/components/pages/signup/Registration/Form/Form.tsx diff --git a/frontend/src/components/pages/signup/Registration/Form/styles.module.scss b/web/src/components/pages/signup/Registration/Form/styles.module.scss similarity index 100% rename from frontend/src/components/pages/signup/Registration/Form/styles.module.scss rename to web/src/components/pages/signup/Registration/Form/styles.module.scss diff --git a/frontend/src/components/pages/signup/Registration/Intro/Intro.tsx b/web/src/components/pages/signup/Registration/Intro/Intro.tsx similarity index 100% rename from frontend/src/components/pages/signup/Registration/Intro/Intro.tsx rename to web/src/components/pages/signup/Registration/Intro/Intro.tsx diff --git a/frontend/src/components/pages/signup/Registration/Intro/styles.module.scss b/web/src/components/pages/signup/Registration/Intro/styles.module.scss similarity index 100% rename from frontend/src/components/pages/signup/Registration/Intro/styles.module.scss rename to web/src/components/pages/signup/Registration/Intro/styles.module.scss diff --git a/frontend/src/components/pages/signup/styles.module.scss b/web/src/components/pages/signup/styles.module.scss similarity index 100% rename from frontend/src/components/pages/signup/styles.module.scss rename to web/src/components/pages/signup/styles.module.scss diff --git a/frontend/src/components/sanity/SanityImage.tsx b/web/src/components/sanity/SanityImage.tsx similarity index 100% rename from frontend/src/components/sanity/SanityImage.tsx rename to web/src/components/sanity/SanityImage.tsx diff --git a/frontend/src/components/sanity/SanityRichText.tsx b/web/src/components/sanity/SanityRichText.tsx similarity index 100% rename from frontend/src/components/sanity/SanityRichText.tsx rename to web/src/components/sanity/SanityRichText.tsx diff --git a/frontend/src/hooks/useMediaQuery.tsx b/web/src/hooks/useMediaQuery.tsx similarity index 100% rename from frontend/src/hooks/useMediaQuery.tsx rename to web/src/hooks/useMediaQuery.tsx diff --git a/frontend/src/types.ts b/web/src/types.ts similarity index 100% rename from frontend/src/types.ts rename to web/src/types.ts diff --git a/frontend/src/utils/client.ts b/web/src/utils/client.ts similarity index 100% rename from frontend/src/utils/client.ts rename to web/src/utils/client.ts diff --git a/frontend/src/utils/isImageCached.ts b/web/src/utils/isImageCached.ts similarity index 100% rename from frontend/src/utils/isImageCached.ts rename to web/src/utils/isImageCached.ts diff --git a/frontend/src/utils/storage.ts b/web/src/utils/storage.ts similarity index 100% rename from frontend/src/utils/storage.ts rename to web/src/utils/storage.ts diff --git a/frontend/tsconfig.json b/web/tsconfig.json similarity index 100% rename from frontend/tsconfig.json rename to web/tsconfig.json From 1ea5f74b9b5ad06a7869abffbe4b5a76e93f8e68 Mon Sep 17 00:00:00 2001 From: Aishwary Vishwakarma Date: Sat, 3 Feb 2024 22:45:11 +0530 Subject: [PATCH 2/2] fix: backend host for production --- web/.env.production | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/.env.production b/web/.env.production index 5ee99e5..5b84cbf 100644 --- a/web/.env.production +++ b/web/.env.production @@ -1,2 +1 @@ -# NEXT_PUBLIC_HOST=https://lazy-pink-seagull-toga.cyclic.app/ -NEXT_PUBLIC_HOST=http://localhost:8000/ \ No newline at end of file +NEXT_PUBLIC_HOST=https://lazy-pink-seagull-toga.cyclic.app/ \ No newline at end of file