├── Images ├── Image ├── GSSoC-Ext.png ├── hacktober.png ├── hacktoberfest.png ├── 212284100-561aa473-3905-4a80-b561-0d28506553ee.gif └── 329829127-e79eb6de-81b1-4ffb-b6ed-f018bb977e88.png ├── client ├── src │ ├── pages │ │ ├── Home │ │ │ ├── Home.css │ │ │ └── HomePage.tsx │ │ ├── Friends │ │ │ └── FriendsPage.tsx │ │ ├── Profile │ │ │ ├── profile.css │ │ │ └── AvatarSelectionModal.tsx │ │ ├── auth │ │ │ └── firebase.ts │ │ ├── Onboard │ │ │ └── (components) │ │ │ │ └── UsernameAndPictures.tsx │ │ └── List │ │ │ └── MovieSearch.tsx │ ├── components │ │ ├── custom │ │ │ ├── MovieCard │ │ │ │ ├── MovieCard.css │ │ │ │ └── MovieCardData.ts │ │ │ ├── ProfileIcon │ │ │ │ └── ProfileIcon.tsx │ │ │ ├── MovieCarousel │ │ │ │ ├── CarouselCard.css │ │ │ │ └── CarouselCard.tsx │ │ │ ├── AddToList │ │ │ │ └── AddToListBtn.tsx │ │ │ ├── Groups │ │ │ │ ├── Groups.tsx │ │ │ │ └── Group.tsx │ │ │ ├── LazyLoadImage │ │ │ │ └── LazyImage.tsx │ │ │ ├── Navbar │ │ │ │ ├── ThemeController.tsx │ │ │ │ ├── TopNavbar.tsx │ │ │ │ ├── Navbar.tsx │ │ │ │ ├── BottomBar.tsx │ │ │ │ └── TestNavbar.tsx │ │ │ ├── Share │ │ │ │ └── Share.tsx │ │ │ └── ProfileBento │ │ │ │ └── ProfileBento.tsx │ │ ├── ui │ │ │ ├── Loader.tsx │ │ │ ├── loading.tsx │ │ │ ├── label.tsx │ │ │ ├── textarea.tsx │ │ │ ├── input.tsx │ │ │ ├── stars.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── switch.tsx │ │ │ ├── tooltip.tsx │ │ │ ├── popover.tsx │ │ │ ├── bento-grid.tsx │ │ │ ├── avatar.tsx │ │ │ ├── scroll-area.tsx │ │ │ ├── tabs.tsx │ │ │ ├── accordion.tsx │ │ │ ├── card.tsx │ │ │ ├── button.tsx │ │ │ ├── calendar.tsx │ │ │ ├── pagination.tsx │ │ │ ├── drawer.tsx │ │ │ ├── dialog.tsx │ │ │ └── form.tsx │ │ ├── charts │ │ │ └── BarChart.tsx │ │ ├── friend-requests.tsx │ │ ├── magicui │ │ │ └── dock.tsx │ │ └── friends-request.tsx │ ├── vite-env.d.ts │ ├── Types │ │ ├── Director.ts │ │ ├── Group.ts │ │ ├── User.ts │ │ ├── validationSchema.ts │ │ └── Movie.ts │ ├── assets │ │ ├── logo_dark.png │ │ ├── logo_light.png │ │ ├── temp_logo.png │ │ ├── avatars.ts │ │ └── react.svg │ ├── lib │ │ ├── utils.ts │ │ ├── firebaseConfig.ts │ │ ├── firebase.ts │ │ └── notify.ts │ ├── layouts │ │ ├── depraceted │ │ │ ├── unauth-layout.tsx │ │ │ ├── layout-wrapper.tsx │ │ │ └── protected-route.tsx │ │ ├── layout.css │ │ ├── authenticated-layout.tsx │ │ └── root-layout.tsx │ ├── hooks │ │ ├── useAuth.ts │ │ └── useTheme.ts │ ├── services │ │ ├── tmdbServices.ts │ │ ├── directorService.ts │ │ └── journalService.ts │ ├── main.tsx │ ├── data │ │ ├── Groups.ts │ │ └── Movies.ts │ ├── router.tsx │ ├── index.css │ └── context │ │ └── AuthContext.tsx ├── bun.lockb ├── vercel.json ├── public │ ├── favicon.ico │ ├── logo_dark.png │ ├── logo_light.png │ ├── favicon-32x32.png │ ├── noise.svg │ ├── vite.svg │ └── google.svg ├── postcss.config.js ├── .env.example ├── tsconfig.node.json ├── vite.config.ts ├── .gitignore ├── index.html ├── components.json ├── tsconfig.json ├── package.json └── tailwind.config.js ├── index.ts ├── server ├── .env.example ├── bun.lockb ├── routes │ ├── statRoutes.ts │ ├── groupRoutes.ts │ ├── journalRoutes.ts │ ├── listRoutes.ts │ ├── friendRoutes.ts │ └── userRoutes.ts ├── types │ └── express │ │ └── index.d.ts ├── config │ └── index.ts ├── Dockerfile ├── connections │ └── connectToDB.ts ├── models │ ├── movie.ts │ ├── Stat.ts │ ├── Director.ts │ ├── Group.ts │ ├── Person.ts │ ├── List.ts │ └── User.ts ├── controllers │ ├── groupControllers │ │ └── getAllGroups.ts │ └── movieController.ts ├── tsconfig.json ├── middleware │ └── verifyToken.ts ├── package.json ├── utils │ └── keepAlive.ts └── .gitignore ├── bun.lockb ├── prettier.config.mjs ├── tsconfig.json ├── .github ├── workflows │ ├── greetings.yml │ ├── auto-label.yml │ ├── post-pr-thankyou.yml │ ├── auto_labeler_on_pr.yml │ ├── check-merge-conflicts.yml │ ├── restrict_issues.yml │ └── ci-cd.yaml └── ISSUE_TEMPLATE │ └── documentation.yml ├── Dockerfile ├── LICENSE ├── package.json ├── .gitignore └── eslint.config.mjs /Images/Image: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /client/src/pages/Home/Home.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.ts: -------------------------------------------------------------------------------- 1 | console.log("Hello via Bun!"); -------------------------------------------------------------------------------- /client/src/components/custom/MovieCard/MovieCard.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/.env.example: -------------------------------------------------------------------------------- 1 | MONGO_URL= 2 | NODE_ENV=development -------------------------------------------------------------------------------- /client/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/bun.lockb -------------------------------------------------------------------------------- /client/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/bun.lockb -------------------------------------------------------------------------------- /server/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/server/bun.lockb -------------------------------------------------------------------------------- /Images/GSSoC-Ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/Images/GSSoC-Ext.png -------------------------------------------------------------------------------- /Images/hacktober.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/Images/hacktober.png -------------------------------------------------------------------------------- /client/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] 3 | } -------------------------------------------------------------------------------- /Images/hacktoberfest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/Images/hacktoberfest.png -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/public/favicon.ico -------------------------------------------------------------------------------- /client/src/Types/Director.ts: -------------------------------------------------------------------------------- 1 | export interface Director { 2 | id: string; 3 | name: string; 4 | } -------------------------------------------------------------------------------- /client/public/logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/public/logo_dark.png -------------------------------------------------------------------------------- /client/public/logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/public/logo_light.png -------------------------------------------------------------------------------- /client/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/public/favicon-32x32.png -------------------------------------------------------------------------------- /client/src/assets/logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/src/assets/logo_dark.png -------------------------------------------------------------------------------- /client/src/assets/logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/src/assets/logo_light.png -------------------------------------------------------------------------------- /client/src/assets/temp_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/client/src/assets/temp_logo.png -------------------------------------------------------------------------------- /client/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /server/routes/statRoutes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | 3 | const router = Router(); 4 | export {router as statRoutes}; -------------------------------------------------------------------------------- /Images/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/Images/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif -------------------------------------------------------------------------------- /Images/329829127-e79eb6de-81b1-4ffb-b6ed-f018bb977e88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daccotta-org/daccotta/HEAD/Images/329829127-e79eb6de-81b1-4ffb-b6ed-f018bb977e88.png -------------------------------------------------------------------------------- /client/.env.example: -------------------------------------------------------------------------------- 1 | VITE_ACCESS_KEY= "your tmdb key" 2 | VITE_API_KEY= 3 | VITE_AUTH_DOMAIN= 4 | VITE_PROJECT_ID= 5 | VITE_STORAGE_BUCKET= 6 | VITE_MESSAGING_SENDER_ID= 7 | VITE_APP_ID= 8 | VITE_API_BASE_URL= -------------------------------------------------------------------------------- /client/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /client/src/pages/Friends/FriendsPage.tsx: -------------------------------------------------------------------------------- 1 | import { FriendsRequest } from "@/components/friends-request" 2 | 3 | const FriendsPage = () => { 4 | return 5 | } 6 | 7 | export default FriendsPage 8 | -------------------------------------------------------------------------------- /server/types/express/index.d.ts: -------------------------------------------------------------------------------- 1 | import { DecodedIdToken } from 'firebase-admin/auth'; 2 | 3 | declare global { 4 | namespace Express { 5 | interface Request { 6 | user?: DecodedIdToken; 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /server/config/index.ts: -------------------------------------------------------------------------------- 1 | import { config } from "dotenv" 2 | config() 3 | 4 | const PORT = process.env.PORT || 8080 5 | const password = process.env.MONGO_PASSWORD 6 | const MONGO_URL = process.env.MONGO_URL 7 | export { PORT, MONGO_URL } 8 | -------------------------------------------------------------------------------- /server/routes/groupRoutes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | import { getAllGroups } from "../controllers/groupControllers/getAllGroups"; 3 | 4 | const router = Router(); 5 | 6 | router.get("/",getAllGroups); 7 | 8 | export {router as groupRoutes}; 9 | -------------------------------------------------------------------------------- /client/src/Types/Group.ts: -------------------------------------------------------------------------------- 1 | 2 | import { IconType } from "react-icons"; 3 | import { IUser } from "./User"; 4 | 5 | 6 | export type IGroup= 7 | { 8 | id:string, 9 | description?:string, 10 | icon:IconType, 11 | name?:string, 12 | members?:IUser[], 13 | } -------------------------------------------------------------------------------- /client/src/pages/Profile/profile.css: -------------------------------------------------------------------------------- 1 | 2 | .bg-main{ 3 | background: linear-gradient(to bottom, rgb(30,32,30) 1%, rgba(0,0,0,0.55) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898; 4 | background-blend-mode: multiply,multiply; 5 | } -------------------------------------------------------------------------------- /client/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /client/src/components/custom/ProfileIcon/ProfileIcon.tsx: -------------------------------------------------------------------------------- 1 | import SimpleDialogDemo from "@/components/ui/dialog_mui" 2 | 3 | const ProfileIcon = () => { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | 11 | export default ProfileIcon 12 | -------------------------------------------------------------------------------- /client/src/components/custom/MovieCarousel/CarouselCard.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap'); 2 | 3 | .roboto-regular { 4 | font-family: "Roboto", system-ui; 5 | font-weight: 400; 6 | font-style: normal; 7 | } -------------------------------------------------------------------------------- /client/src/components/ui/Loader.tsx: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | const Loader: React.FC<{ size?: number }> = ({ size = 24 }) => ( 4 |
8 | ) 9 | 10 | export default Loader 11 | -------------------------------------------------------------------------------- /client/public/noise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import path from "path" 3 | import react from '@vitejs/plugin-react' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [react()], 8 | 9 | resolve: { 10 | alias: { 11 | "@": path.resolve(__dirname, "./src"), 12 | }, 13 | }, 14 | }) 15 | 16 | -------------------------------------------------------------------------------- /client/src/lib/firebaseConfig.ts: -------------------------------------------------------------------------------- 1 | export const firebaseConfig = { 2 | apiKey: import.meta.env.VITE_API_KEY, 3 | authDomain: import.meta.env.VITE_AUTH_DOMAIN, 4 | projectId: import.meta.env.VITE_PROJECT_ID, 5 | storageBucket: import.meta.env.VITE_STORAGE_BUCKET, 6 | messagingSenderId: import.meta.env.VITE_MESSAGING_SENDER_ID, 7 | appId: import.meta.env.VITE_APP_ID, 8 | } 9 | -------------------------------------------------------------------------------- /client/src/layouts/depraceted/unauth-layout.tsx: -------------------------------------------------------------------------------- 1 | // UnauthenticatedLayout.tsx 2 | import React from 'react'; 3 | import { Outlet } from 'react-router-dom'; 4 | 5 | const UnauthenticatedLayout: React.FC = () => { 6 | return ( 7 |
8 | 9 | 10 |
11 | ); 12 | }; 13 | 14 | export default UnauthenticatedLayout; 15 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | .env 11 | .env.local 12 | 13 | node_modules 14 | 15 | dist-ssr 16 | *.local 17 | 18 | # Editor directories and files 19 | .vscode/* 20 | !.vscode/extensions.json 21 | .idea 22 | .DS_Store 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | 29 | dist 30 | 31 | -------------------------------------------------------------------------------- /client/src/components/custom/AddToList/AddToListBtn.tsx: -------------------------------------------------------------------------------- 1 | type Props = { 2 | movie_id: string // movie id 3 | release_date: string 4 | title: string 5 | overview: string 6 | poster_path: string 7 | backdrop_path: string 8 | } 9 | //api/user/uid/list/list_id/movie_id 10 | // 11 | const AddToListBtn = (props: Props) => { 12 | return
{props.movie_id}
13 | } 14 | export default AddToListBtn 15 | -------------------------------------------------------------------------------- /prettier.config.mjs: -------------------------------------------------------------------------------- 1 | // prettier.config.js, .prettierrc.js, prettier.config.mjs, or .prettierrc.mjs 2 | 3 | /** 4 | * @see https://prettier.io/docs/en/configuration.html 5 | * @type {import("prettier").Config} 6 | */ 7 | const config = { 8 | trailingComma: "es5", 9 | tabWidth: 4, 10 | semi: false, 11 | doubleQuote : true, 12 | singleQuote: false, 13 | }; 14 | 15 | export default config; 16 | 17 | -------------------------------------------------------------------------------- /client/src/hooks/useAuth.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { AuthContext } from '../context/AuthContext'; // Adjust this path as needed 3 | 4 | export function useAuth() { 5 | const context = useContext(AuthContext); 6 | if (context === undefined) { 7 | throw new Error('useAuth must be used within an AuthProvider'); 8 | } 9 | return { 10 | ...context, 11 | isSignedIn: !!context.user 12 | }; 13 | } -------------------------------------------------------------------------------- /client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | daccotta 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /client/src/Types/User.ts: -------------------------------------------------------------------------------- 1 | import { Director } from "../pages/Onboard/(components)/TopDirectors"; 2 | import { IGroup } from "./Group"; 3 | 4 | export type IUser= 5 | { 6 | id:string, 7 | username:string, 8 | profile_image: string, 9 | email:string, 10 | age:number, 11 | onboarded?:boolean, 12 | badges?: string[]; 13 | groups?: IGroup[]; 14 | lists?:string[], 15 | directors?:Director[], 16 | actors?:string[], 17 | 18 | 19 | } -------------------------------------------------------------------------------- /server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM oven/bun:1 2 | 3 | # Set the working directory in the container 4 | WORKDIR /app 5 | 6 | # Copy package.json and package-lock.json (if available) 7 | COPY package*.json ./ 8 | COPY bun.lockb ./ 9 | 10 | # Install dependencies 11 | RUN bun install --production 12 | 13 | # Copy the rest of your app's source code 14 | COPY . . 15 | 16 | # Expose the port your app runs on 17 | EXPOSE 8080 18 | 19 | # Start the application 20 | CMD ["bun", "main.ts"] -------------------------------------------------------------------------------- /client/src/components/ui/loading.tsx: -------------------------------------------------------------------------------- 1 | // import * as React from 'react'; 2 | // import CircularProgress from '@mui/material/CircularProgress'; 3 | // import Box from '@mui/material/Box'; 4 | 5 | export default function CircularIndeterminate() { 6 | return ( 7 | // 8 | // 9 | // 10 |
11 | ); 12 | } -------------------------------------------------------------------------------- /server/connections/connectToDB.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import { MONGO_URL } from "../config"; 3 | 4 | export default async function connectDatabase() { 5 | try { 6 | if (!MONGO_URL) { 7 | throw new Error("mongo url not defined"); 8 | } 9 | await mongoose.connect(MONGO_URL); 10 | console.log("MongoDB connected successfully"); 11 | } catch (error) { 12 | console.log("Error occured while connecting to MongoDB" + error); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /client/src/lib/firebase.ts: -------------------------------------------------------------------------------- 1 | import { initializeApp } from "firebase/app" 2 | import { getAuth } from "firebase/auth" 3 | import { firebaseConfig } from "./firebaseConfig" 4 | // TODO: Add SDKs for Firebase products that you want to use 5 | // https://firebase.google.com/docs/web/setup#available-libraries 6 | 7 | // Your web app's Firebase configuration 8 | 9 | // Initialize Firebase` 10 | const app = initializeApp(firebaseConfig) 11 | export const auth = getAuth() 12 | 13 | export default app 14 | -------------------------------------------------------------------------------- /client/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "magicui": "@/components/magicui" 18 | } 19 | } -------------------------------------------------------------------------------- /client/src/lib/notify.ts: -------------------------------------------------------------------------------- 1 | // import { toast } from "sonner"; 2 | 3 | // const Notify = (type: string, message: string) => { 4 | // switch (type) { 5 | // case "success": 6 | // return toast.success(message); 7 | // case "warning": 8 | // return toast.warning(message); 9 | // case "error": 10 | // return toast.error(message); 11 | // case "info": 12 | // return toast.info(message); 13 | // default: 14 | // return toast(message); 15 | // } 16 | // }; 17 | 18 | // export default Notify; 19 | -------------------------------------------------------------------------------- /server/models/movie.ts: -------------------------------------------------------------------------------- 1 | import { Schema } from "mongoose" 2 | 3 | export interface MovieInList { 4 | movie_id: string 5 | title: string 6 | poster_path: string 7 | release_date?: string 8 | genre_ids?: number[] 9 | } 10 | 11 | export const movieInListSchema = new Schema({ 12 | movie_id: { type: String, required: true }, 13 | title: { type: String, required: true }, 14 | poster_path: { type: String, required: true }, 15 | release_date: { type: String }, 16 | genre_ids: [{ type: Number }], 17 | }) 18 | -------------------------------------------------------------------------------- /client/src/pages/auth/firebase.ts: -------------------------------------------------------------------------------- 1 | import { initializeApp } from "firebase/app" 2 | import { getAuth } from "firebase/auth" 3 | import { getFirestore } from "firebase/firestore" 4 | import { firebaseConfig } from "../../lib/firebaseConfig" 5 | // TODO: Add SDKs for Firebase products that you want to use 6 | // https://firebase.google.com/docs/web/setup#available-libraries 7 | 8 | // Your web app's Firebase configuration 9 | 10 | // Initialize Firebase` 11 | const app = initializeApp(firebaseConfig) 12 | export const auth = getAuth() 13 | export const db = getFirestore(app) 14 | export default app 15 | -------------------------------------------------------------------------------- /server/models/Stat.ts: -------------------------------------------------------------------------------- 1 | import { Schema, model, Document } from 'mongoose'; 2 | 3 | 4 | interface Stats extends Document { 5 | 6 | role: string; 7 | user?: Schema.Types.ObjectId, 8 | group?: Schema.Types.ObjectId, 9 | 10 | 11 | } 12 | 13 | const statSchema = new Schema({ 14 | 15 | role: { 16 | type: String, 17 | enum:["user","group"] 18 | 19 | }, 20 | 21 | user: { type: Schema.Types.ObjectId, ref: 'User' }, 22 | group: { type: Schema.Types.ObjectId, ref: 'Group' }, 23 | 24 | }); 25 | 26 | const Stat = model('Stat', statSchema); 27 | 28 | export default Stat; -------------------------------------------------------------------------------- /client/src/components/custom/Groups/Groups.tsx: -------------------------------------------------------------------------------- 1 | import { IGroup } from "../../../Types/Group" 2 | import Group from "./Group" 3 | type GroupListProps = { 4 | groups: IGroup[] 5 | } 6 | 7 | const Groups = ({ groups }: GroupListProps) => { 8 | return ( 9 |
10 | {groups.map(({ id, name, icon }) => ( 11 | 12 | ))} 13 |
14 | ) 15 | } 16 | 17 | export default Groups 18 | -------------------------------------------------------------------------------- /client/src/components/custom/LazyLoadImage/LazyImage.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react" 2 | import { LazyLoadImage } from "react-lazy-load-image-component" 3 | import "react-lazy-load-image-component/src/effects/blur.css" 4 | 5 | interface ImageProps { 6 | src: string 7 | className: string 8 | alt: string 9 | } 10 | const LazyImage: FC = ({ src, className, alt = "image" }) => { 11 | return ( 12 | 18 | ) 19 | } 20 | 21 | export default LazyImage 22 | -------------------------------------------------------------------------------- /client/src/layouts/layout.css: -------------------------------------------------------------------------------- 1 | /* .bg-main{ 2 | 3 | background: linear-gradient(to bottom, rgb(0, 0, 0) 75%, rgba(0, 0, 0, 0.55) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898; 4 | background-blend-mode: multiply,multiply; 5 | } 6 | .bg-bar{ 7 | 8 | background: linear-gradient(to bottom, rgb(30,32,30) 1%, rgba(0,0,0,0.55) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898; 9 | background-blend-mode: multiply,multiply; 10 | opacity: 0.8; 11 | } */ 12 | 13 | .bg-background-light{ 14 | 15 | background-color: rgb(14, 14, 14); 16 | } -------------------------------------------------------------------------------- /server/models/Director.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose" 2 | import { Schema, model, Document } from "mongoose" 3 | import Person, { personSchema } from "./Person" 4 | 5 | export interface Directors extends Document { 6 | directors_id: string 7 | names: Person[] 8 | } 9 | 10 | export const directorSchema = new Schema({ 11 | directors_id: { 12 | type: String, 13 | required: true, 14 | unique: true, 15 | default: () => new mongoose.Types.ObjectId().toString(), 16 | }, 17 | names: [personSchema], 18 | }) 19 | 20 | const Director = model("Director", directorSchema) 21 | 22 | export default Director 23 | -------------------------------------------------------------------------------- /client/src/components/custom/Groups/Group.tsx: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { IGroup } from "../../../Types/Group" 3 | import { motion } from "framer-motion" 4 | import { Link } from "react-router-dom" 5 | const Group: React.FC = ({ id, icon, name }) => { 6 | const Icon = icon 7 | { 8 | return ( 9 | 13 | 14 | 15 | 16 | 17 | ) 18 | } 19 | } 20 | 21 | export default Group 22 | -------------------------------------------------------------------------------- /server/models/Group.ts: -------------------------------------------------------------------------------- 1 | import mongoose, { Schema, model, Document } from 'mongoose'; 2 | 3 | interface Groups { 4 | name: string; 5 | members: Schema.Types.ObjectId[]; 6 | lists: Schema.Types.ObjectId[]; 7 | group_icon: string; 8 | stats: Schema.Types.ObjectId[]; 9 | } 10 | 11 | const groupSchema = new Schema({ 12 | 13 | name: { type: String, required: true }, 14 | members: [{ type: Schema.Types.ObjectId, ref: 'User' }], 15 | lists: [{ type: Schema.Types.ObjectId, ref: 'List' }], 16 | group_icon: { type: String }, 17 | stats: [{ type: Schema.Types.ObjectId, ref: 'Stat' }] 18 | }); 19 | 20 | const Group = model('Group', groupSchema); 21 | 22 | export default Group; -------------------------------------------------------------------------------- /server/controllers/groupControllers/getAllGroups.ts: -------------------------------------------------------------------------------- 1 | // controllers/groups/getAllGroups.ts 2 | import { type Request, type Response } from 'express'; 3 | import User from '../../models/User'; 4 | 5 | export const getAllGroups = async (req: Request, res: Response) => { 6 | try { 7 | const userId = req.body._id; // Assuming you have user authentication middleware 8 | const user = await User.findById(userId).populate('groups'); 9 | 10 | if (!user) { 11 | return res.status(404).json({ message: 'User not found' }); 12 | } 13 | 14 | res.status(200).json(user.groups); 15 | } catch (error) { 16 | res.status(500).json({ message: 'Error fetching groups', error }); 17 | } 18 | }; -------------------------------------------------------------------------------- /client/src/services/tmdbServices.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | 4 | const BASE_URL = "https://api.themoviedb.org/3"; 5 | const TMDB_TOKEN = import.meta.env.VITE_ACCESS_KEY; 6 | 7 | const headers = { 8 | Authorization: "Bearer " + TMDB_TOKEN, 9 | }; 10 | 11 | // Define a type for the params 12 | type TMDBParams = { 13 | [key: string]: string | number | boolean | undefined; 14 | }; 15 | 16 | export const fetchDataFromApi = async (url: string, params?: TMDBParams) => { 17 | try { 18 | console.log(TMDB_TOKEN); 19 | 20 | const { data } = await axios.get(BASE_URL + url, { 21 | headers, 22 | params, 23 | }); 24 | return data; 25 | } catch (err) { 26 | console.error(err); 27 | throw err; 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // Enable latest features 4 | "lib": ["ESNext", "DOM"], 5 | "target": "ESNext", 6 | "module": "ESNext", 7 | "moduleDetection": "force", 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | 11 | // Bundler mode 12 | "moduleResolution": "bundler", 13 | "allowImportingTsExtensions": true, 14 | "verbatimModuleSyntax": true, 15 | "noEmit": true, 16 | 17 | // Best practices 18 | "strict": true, 19 | "skipLibCheck": true, 20 | "noFallthroughCasesInSwitch": true, 21 | 22 | // Some stricter flags (disabled by default) 23 | "noUnusedLocals": false, 24 | "noUnusedParameters": false, 25 | "noPropertyAccessFromIndexSignature": false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // Enable latest features 4 | "lib": ["ESNext", "DOM"], 5 | "target": "ESNext", 6 | "module": "ESNext", 7 | "moduleDetection": "force", 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | 11 | // Bundler mode 12 | "moduleResolution": "bundler", 13 | "allowImportingTsExtensions": true, 14 | "verbatimModuleSyntax": true, 15 | "noEmit": true, 16 | 17 | // Best practices 18 | "strict": true, 19 | "skipLibCheck": true, 20 | "noFallthroughCasesInSwitch": true, 21 | 22 | // Some stricter flags (disabled by default) 23 | "noUnusedLocals": false, 24 | "noUnusedParameters": false, 25 | "noPropertyAccessFromIndexSignature": false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request_target, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: "👋 Thank you @${{ github.actor }} for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!" 16 | pr-message: " 🎉 Thank you @${{ github.actor }} for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better" 17 | -------------------------------------------------------------------------------- /server/models/Person.ts: -------------------------------------------------------------------------------- 1 | import mongoose, { Schema, model, Document } from "mongoose" 2 | 3 | interface Person { 4 | id: number 5 | name: string 6 | profile_path: string | null 7 | known_for_department: "Acting" | "Directing" 8 | } 9 | export const personSchema = new Schema( 10 | { 11 | id: { type: Number, required: true }, 12 | name: { type: String, required: true }, 13 | profile_path: { type: String, default: null }, 14 | known_for_department: { 15 | type: String, 16 | enum: ["Acting", "Directing"], 17 | required: true, 18 | }, 19 | }, 20 | { timestamps: true } 21 | ) 22 | 23 | const Person = model("Person", personSchema) 24 | 25 | export default Person 26 | -------------------------------------------------------------------------------- /server/routes/journalRoutes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express" 2 | import { verifyToken } from "../middleware/verifyToken" 3 | import { 4 | addJournalEntry, 5 | getJournalEntries, 6 | updateJournalEntry, 7 | deleteJournalEntry, 8 | getFriendJournalEntries, 9 | } from "../controllers/journalController" 10 | 11 | const router = Router() 12 | 13 | console.log("I am here in journalRoutes") 14 | 15 | router.post("/add", verifyToken, addJournalEntry) 16 | router.get("/entries", verifyToken, getJournalEntries) 17 | router.get("/entries/:userName", verifyToken, getFriendJournalEntries) 18 | router.put("/update/:entryId", verifyToken, updateJournalEntry) 19 | router.delete("/delete/:entryId", verifyToken, deleteJournalEntry) 20 | 21 | export { router as journalRoutes } 22 | -------------------------------------------------------------------------------- /client/src/hooks/useTheme.ts: -------------------------------------------------------------------------------- 1 | // hooks/useTheme.ts 2 | import { useState, useEffect } from 'react'; 3 | 4 | const themes = ['retro', 'cyberpunk', 'valentine','Ashu']; 5 | 6 | export const useTheme = () => { 7 | const [theme, setTheme] = useState('Ashu'); 8 | 9 | useEffect(() => { 10 | const savedTheme = localStorage.getItem('theme') || 'Ashu'; 11 | setTheme(savedTheme); 12 | document.documentElement.setAttribute('data-theme', savedTheme); 13 | }, []); 14 | 15 | const changeTheme = (newTheme: string) => { 16 | if (themes.includes(newTheme)) { 17 | setTheme(newTheme); 18 | localStorage.setItem('theme', newTheme); 19 | document.documentElement.setAttribute('data-theme', newTheme); 20 | } 21 | }; 22 | 23 | return { theme, changeTheme, themes }; 24 | }; -------------------------------------------------------------------------------- /server/middleware/verifyToken.ts: -------------------------------------------------------------------------------- 1 | import type{ Request, Response, NextFunction } from 'express'; 2 | import admin from 'firebase-admin'; 3 | 4 | export const verifyToken = async (req: Request, res: Response, next: NextFunction) => { 5 | try { 6 | const authHeader = req.headers.authorization; 7 | const idToken = authHeader && authHeader.split('Bearer ')[1]; 8 | 9 | if (!idToken) { 10 | return res.status(401).json({ error: 'No token provided' }); 11 | } 12 | const decodedToken = await admin.auth().verifyIdToken(idToken); 13 | // Attach the decoded token to the request object 14 | req.user = decodedToken; 15 | 16 | next(); 17 | } catch (error) { 18 | console.error('Error verifying token:', error); 19 | res.status(403).json({ error: 'Unauthorized' }); 20 | } 21 | }; -------------------------------------------------------------------------------- /client/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as LabelPrimitive from "@radix-ui/react-label" 3 | import { cva, type VariantProps } from "class-variance-authority" 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | const labelVariants = cva( 8 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 9 | ) 10 | 11 | const Label = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef & 14 | VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 21 | )) 22 | Label.displayName = LabelPrimitive.Root.displayName 23 | 24 | export { Label } 25 | -------------------------------------------------------------------------------- /server/routes/listRoutes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express" 2 | import { verifyToken } from "../middleware/verifyToken" 3 | import { createList, getMoveList, removeList } from "../controllers/listController" 4 | import { addMovie, addMovieInList, removeMovie } from "../controllers/movieController" 5 | 6 | const router = Router() 7 | 8 | router.get("/:uid", verifyToken, getMoveList) 9 | router.post("/create", verifyToken, createList) 10 | //delete list by id 11 | router.delete("/:listId/remove-list", verifyToken, removeList); 12 | router.post("/:listId/add-movie", verifyToken, addMovie) 13 | // Add remove-movie endpoint 14 | router.delete("/:listId/remove-movie", verifyToken, removeMovie) 15 | // Add movie to list endpoint 16 | router.post("/:listId/add-movie-in-list", verifyToken, addMovieInList); 17 | 18 | export { router as listRoutes } 19 | -------------------------------------------------------------------------------- /server/routes/friendRoutes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express" 2 | import { verifyToken } from "../middleware/verifyToken" 3 | import { 4 | acceptRejectRequest, 5 | getAllFriendRequests, 6 | getFriendInfo, 7 | getFriends, 8 | getFriendTopMovies, 9 | removeFriend, 10 | sendRequest 11 | } from "../controllers/friendController" 12 | 13 | const router = Router() 14 | 15 | router.get("/", verifyToken, getFriends); 16 | router.post("/request", verifyToken, sendRequest); 17 | router.post("/respond", verifyToken, acceptRejectRequest); 18 | router.post("/remove", verifyToken, removeFriend); 19 | router.get("/requests",verifyToken, getAllFriendRequests); 20 | router.get("/data/:username", verifyToken, getFriendInfo); 21 | router.get("/top-movies", verifyToken, getFriendTopMovies) 22 | 23 | export { router as friendRoutes } 24 | -------------------------------------------------------------------------------- /client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | "baseUrl": ".", 9 | "paths": { 10 | "@/*": [ 11 | "./src/*" 12 | ] 13 | }, 14 | 15 | /* Bundler mode */ 16 | "moduleResolution": "bundler", 17 | "allowImportingTsExtensions": true, 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx", 22 | 23 | /* Linting */ 24 | "strict": true, 25 | "noUnusedLocals": true, 26 | "noUnusedParameters": true, 27 | "noFallthroughCasesInSwitch": true 28 | }, 29 | "include": ["src", "src/components/custom/Navbar/TopNavbar.tsx"], 30 | "references": [{ "path": "./tsconfig.node.json" }] 31 | } 32 | -------------------------------------------------------------------------------- /client/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |