[
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n\n<img src=\"https://png.pngtree.com/png-vector/20220706/ourmid/pngtree-project-management-png-image_5687733.png\" alt=\"logo\" width=\"250\" />\n\n# 🗂️ Project Management App (Full Stack + AWS)\n\nThis is a **Project Management Dashboard** built using modern web technologies. It includes a powerful frontend, a backend server, and secure cloud integration with AWS. Perfect for managing tasks, tracking projects, and working with teams.\n\n</div>\n\n---\n\n### 🚀 Live Demo\n\n👉 [View the App Live](https://pm-app-tan.vercel.app/)\n\n---\n\n### 📚 Table of Contents\n\n* [About](#about)\n* [Features](#features)\n* [Tech Stack](#tech-stack)\n* [Screenshots](#screenshots)\n* [Getting Started](#getting-started)\n\n  * [Requirements](#requirements)\n  * [Installation](#installation)\n  * [Running Locally](#running-locally)\n  * [Environment Variables](#environment-variables)\n* [Deployment](#deployment)\n* [Contact](#contact)\n\n---\n\n## 📌 About\n\nThis app is a **full-stack project management tool**. It helps teams stay organized with features like task tracking, user authentication, cloud hosting, and more.\n\n---\n\n## ✨ Features\n\n✅ Create and manage projects\n✅ Add tasks and assign team members\n✅ User authentication (with AWS Cognito)\n✅ Cloud functions using AWS Lambda\n✅ Beautiful UI with charts and data tables\n\n---\n\n## 🛠 Tech Stack\n\n### Frontend\n\n* Next.js\n* TypeScript\n* React.js\n* Tailwind CSS\n* Material UI Data Grid\n\n### Backend\n\n* Node.js\n* Express.js\n* PostgreSQL\n* Prisma ORM\n\n### Cloud & DevOps\n\n* AWS Lambda\n* AWS Cognito\n* Vercel (Deployment)\n\n---\n\n## 📷 Screenshots\n\n> Here’s a preview of the dashboard (Click to view):\n\n<div align=\"center\">\n<a href=\"https://pm-app-tan.vercel.app/\"><img src=\"https://github.com/user-attachments/assets/6e7f768d-d7a0-4b63-bc08-a1419efad1b0\" alt=\"screenshot\" width=\"600\"/></a>\n</div>\n\n---\n\n## 🧰 Getting Started\n\n### ✅ Requirements\n\nBefore you start, make sure you have:\n\n* [Node.js](https://nodejs.org/en/) installed\n* An [AWS account](https://aws.amazon.com/free/)\n* A [Clerk account](https://clerk.com/) for user auth (optional but recommended)\n\n---\n\n### 📦 Installation\n\nClone the project:\n\n```bash\ngit clone https://github.com/SashenJayathilaka/Project-Management-App.git\ncd Project-Management-App\n```\n\nInstall the dependencies:\n\n```bash\nnpm install\n```\n\n---\n\n### 🧪 Running Locally\n\nTo start the app locally:\n\n```bash\nnpm run dev\n```\n\nThen open your browser and go to:\n👉 [http://localhost:3000](http://localhost:3000)\n\n---\n\n### 🔐 Environment Variables\n\nCreate a `.env` file in the root directory and add the required keys.\n\nExample:\n\n```env\nDATABASE_URL=your_postgres_db_url\nAWS_REGION=your_aws_region\nCOGNITO_USER_POOL_ID=your_cognito_pool_id\nCOGNITO_CLIENT_ID=your_cognito_client_id\n```\n\n---\n\n## 🚀 Deployment\n\n### Deploy with Vercel\n\nThe easiest way to deploy is using **Vercel**:\n\n1. Go to [https://vercel.com/new](https://vercel.com/new)\n2. Import your GitHub repository\n3. Add environment variables in the Vercel dashboard\n4. Deploy and enjoy!\n\nYou can also deploy manually using other platforms like AWS, Netlify, or Docker.\n\n---\n\n## 📬 Contact\n\n**Developer**: Sashen Jayathilaka\n📧 Email: [sashenjayathilaka95@gmail.com](mailto:sashenjayathilaka95@gmail.com)\n🐦 Twitter: [@SashenHasinduJ](https://twitter.com/SashenHasinduJ)\n\n🔗 Project Repository: [GitHub Link](https://github.com/SashenJayathilaka/Project-Management-App.git)\n\n---\n\n<div align=\"center\">\n⭐️ If you found this project helpful, feel free to star it!\n</div>\n"
  },
  {
    "path": "aws-bucket-policy.json",
    "content": "{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"PublicReadGetObject\",\n            \"Effect\": \"Allow\",\n            \"Principal\": \"*\",\n            \"Action\": \"s3:GetObject\",\n            \"Resource\": \"*\"\n        }\n    ]\n}"
  },
  {
    "path": "client/.eslintrc.json",
    "content": "{\n  \"extends\": \"next/core-web-vitals\"\n}\n"
  },
  {
    "path": "client/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n.yarn/install-state.gz\n\n# testing\n/coverage\n\n# next.js\n/.next/\n/out/\n\n# production\n/build\n\n# misc\n.DS_Store\n*.pem\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# local env files\n.env*.local\n\n# vercel\n.vercel\n\n# typescript\n*.tsbuildinfo\nnext-env.d.ts\n"
  },
  {
    "path": "client/.prettierrc",
    "content": "{\n  \"plugins\": [\"prettier-plugin-tailwindcss\"]\n}\n"
  },
  {
    "path": "client/README.md",
    "content": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n"
  },
  {
    "path": "client/app/globals.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n*,\n*::before,\n*::after {\n  box-sizing: border-box;\n}\n\nhtml,\nbody,\n#root,\n.app {\n  height: 100%;\n  width: 100%;\n  @apply text-sm;\n  @apply bg-gray-500;\n  @apply text-gray-900;\n}\n\n.timeline ._3_ygE {\n  @apply rounded-tl-md border border-r-0 border-[#e6e4e4] dark:border-stroke-dark;\n}\n.timeline ._2eZzQ {\n  @apply border-[#e6e4e4] dark:border-stroke-dark;\n}\n.timeline ._2dZTy {\n  @apply fill-white dark:fill-dark-secondary;\n}\n.timeline ._2dZTy:nth-child(even) {\n  @apply fill-[#f5f5f5] dark:fill-dark-tertiary;\n}\n.timeline ._35nLX {\n  @apply fill-white stroke-[#e6e4e4] dark:fill-dark-secondary dark:stroke-stroke-dark;\n}\n.timeline ._9w8d5 {\n  @apply fill-[#333] dark:fill-white;\n}\n.timeline ._34SS0 {\n  @apply bg-white dark:bg-dark-secondary;\n}\n.timeline ._34SS0:nth-of-type(even) {\n  @apply bg-[#f5f5f5] dark:bg-dark-tertiary;\n}\n.timeline ._RuwuK,\n.timeline ._3rUKi,\n.timeline ._1rLuZ {\n  @apply stroke-[#e6e4e4] dark:stroke-stroke-dark;\n}\n.timeline ._3ZbQT {\n  @apply border-l-0 border-[#e6e4e4] dark:border-stroke-dark;\n}\n.timeline ._3T42e {\n  @apply bg-white dark:bg-dark-bg;\n}\n.timeline ._29NTg {\n  @apply dark:text-neutral-500;\n}\n\n::-webkit-scrollbar {\n  width: 0px;\n  height: 0px;\n}\n"
  },
  {
    "path": "client/app/layout.tsx",
    "content": "import DashboardWrapper from \"@/components/wrapper/dashboardWrapper\";\nimport type { Metadata } from \"next\";\nimport { Plus_Jakarta_Sans } from \"next/font/google\";\nimport \"./globals.css\";\n\nconst jakarta = Plus_Jakarta_Sans({ subsets: [\"latin\"] });\n\nexport const metadata: Metadata = {\n  title: \"Create Next App\",\n  description: \"Generated by create next app\",\n};\n\nexport default function RootLayout({\n  children,\n}: Readonly<{\n  children: React.ReactNode;\n}>) {\n  return (\n    <html lang=\"en\">\n      <body className={jakarta.className}>\n        <DashboardWrapper>{children}</DashboardWrapper>\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "client/app/loading.tsx",
    "content": "import { Spinner } from \"@/components/global/loader/spinner\";\n\ntype Props = {};\n\nfunction Loading({}: Props) {\n  return (\n    <div className=\"flex h-screen items-center justify-center\">\n      <Spinner />\n    </div>\n  );\n}\n\nexport default Loading;\n"
  },
  {
    "path": "client/app/page.tsx",
    "content": "import HomePage from \"@/components/home-page\";\n\nexport default function Home() {\n  return <HomePage />;\n}\n"
  },
  {
    "path": "client/app/priority/backlog/page.tsx",
    "content": "import PriorityPage from \"@/components/priorityPage\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <PriorityPage priority={Priority.Backlog} />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/priority/high/page.tsx",
    "content": "import PriorityPage from \"@/components/priorityPage\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <PriorityPage priority={Priority.High} />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/priority/low/page.tsx",
    "content": "import PriorityPage from \"@/components/priorityPage\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <PriorityPage priority={Priority.Low} />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/priority/medium/page.tsx",
    "content": "import PriorityPage from \"@/components/priorityPage\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <PriorityPage priority={Priority.Medium} />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/priority/urgent/page.tsx",
    "content": "import PriorityPage from \"@/components/priorityPage\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <PriorityPage priority={Priority.Urgent} />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/projects/[id]/page.tsx",
    "content": "import ProjectPage from \"@/components/project-page\";\n\ntype Props = {\n  params: {\n    id: string;\n  };\n};\n\nfunction Page({ params }: Props) {\n  const { id } = params;\n\n  return <ProjectPage id={id} />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/search/page.tsx",
    "content": "import SearchPage from \"@/components/search-page\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <SearchPage />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/settings/page.tsx",
    "content": "import SettingsPage from \"@/components/settings-page\";\nimport React from \"react\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <SettingsPage />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/teams/page.tsx",
    "content": "import TeamPage from \"@/components/team-page\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <TeamPage />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/timeline/page.tsx",
    "content": "import TimeLinePage from \"@/components/timeline\";\nimport React from \"react\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <TimeLinePage />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/app/users/page.tsx",
    "content": "import UserPage from \"@/components/user-page\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <UserPage />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "client/components/Header/index.tsx",
    "content": "import React from \"react\";\n\ntype Props = {\n  name: string;\n  buttonComponent?: any;\n  isSmallText?: boolean;\n};\n\nfunction Header({ name, buttonComponent, isSmallText }: Props) {\n  return (\n    <div className=\"mb-5 flex w-full items-center justify-between\">\n      <h1\n        className={`${isSmallText ? \"text-lg\" : \"text-2xl\"} font-semibold dark:text-white`}\n      >\n        {name}\n      </h1>\n      {buttonComponent}\n    </div>\n  );\n}\n\nexport default Header;\n"
  },
  {
    "path": "client/components/data/columns.tsx",
    "content": "import {\n  GridColDef,\n  GridToolbarContainer,\n  GridToolbarExport,\n  GridToolbarFilterButton,\n} from \"@mui/x-data-grid\";\n\nexport const columns: GridColDef[] = [\n  {\n    field: \"title\",\n    headerName: \"Title\",\n    width: 100,\n  },\n  {\n    field: \"description\",\n    headerName: \"Description\",\n    width: 200,\n  },\n  {\n    field: \"status\",\n    headerName: \"Status\",\n    width: 130,\n    renderCell: (params) => (\n      <span className=\"inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800\">\n        {params.value}\n      </span>\n    ),\n  },\n  {\n    field: \"priority\",\n    headerName: \"Priority\",\n    width: 75,\n  },\n  {\n    field: \"tags\",\n    headerName: \"Tags\",\n    width: 130,\n  },\n  {\n    field: \"startDate\",\n    headerName: \"Start Date\",\n    width: 130,\n  },\n  {\n    field: \"dueDate\",\n    headerName: \"Due Date\",\n    width: 130,\n  },\n  {\n    field: \"author\",\n    headerName: \"Author\",\n    width: 150,\n    renderCell: (params) => params.value?.author || \"Unknown\",\n  },\n  {\n    field: \"assignee\",\n    headerName: \"Assignee\",\n    width: 150,\n    renderCell: (params) => params.value?.assignee || \"Unassigned\",\n  },\n];\n\nexport const userSettings = {\n  username: \"johndoe\",\n  email: \"john.doe@example.com\",\n  teamName: \"Development Team\",\n  roleName: \"Developer\",\n};\n\nexport const CustomToolbar = () => (\n  <GridToolbarContainer className=\"toolbar flex gap-2\">\n    <GridToolbarFilterButton />\n    <GridToolbarExport />\n  </GridToolbarContainer>\n);\n\nexport const taskColumns: GridColDef[] = [\n  { field: \"title\", headerName: \"Title\", width: 200 },\n  { field: \"status\", headerName: \"Status\", width: 150 },\n  { field: \"priority\", headerName: \"Priority\", width: 150 },\n  { field: \"dueDate\", headerName: \"Due Date\", width: 150 },\n];\n\nexport const COLORS = [\"#0088FE\", \"#00C49F\", \"#FFBB28\", \"#FF8042\"];\n\nexport const priorityColumns: GridColDef[] = [\n  {\n    field: \"title\",\n    headerName: \"Title\",\n    width: 100,\n  },\n  {\n    field: \"description\",\n    headerName: \"Description\",\n    width: 200,\n  },\n  {\n    field: \"status\",\n    headerName: \"Status\",\n    width: 130,\n    renderCell: (params) => (\n      <span className=\"inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800\">\n        {params.value}\n      </span>\n    ),\n  },\n  {\n    field: \"priority\",\n    headerName: \"Priority\",\n    width: 75,\n  },\n  {\n    field: \"tags\",\n    headerName: \"Tags\",\n    width: 130,\n  },\n  {\n    field: \"startDate\",\n    headerName: \"Start Date\",\n    width: 130,\n  },\n  {\n    field: \"dueDate\",\n    headerName: \"Due Date\",\n    width: 130,\n  },\n  {\n    field: \"author\",\n    headerName: \"Author\",\n    width: 150,\n    renderCell: (params) => params.value?.username || \"Unknown\",\n  },\n  {\n    field: \"assignee\",\n    headerName: \"Assignee\",\n    width: 150,\n    renderCell: (params) => params.value?.username || \"Unassigned\",\n  },\n];\n\nexport const formFields = {\n  signUp: {\n    username: {\n      order: 1,\n      placeholder: \"Choose a username\",\n      label: \"Username\",\n      inputProps: { required: true },\n    },\n    email: {\n      order: 1,\n      placeholder: \"Enter your email address\",\n      label: \"Email\",\n      inputProps: { type: \"email\", required: true },\n    },\n    password: {\n      order: 3,\n      placeholder: \"Enter your password\",\n      label: \"Password\",\n      inputProps: { type: \"password\", required: true },\n    },\n    confirm_password: {\n      order: 4,\n      placeholder: \"Confirm your password\",\n      label: \"Confirm Password\",\n      inputProps: { type: \"password\", required: true },\n    },\n  },\n};\n"
  },
  {
    "path": "client/components/global/auth-provider/index.tsx",
    "content": "import { formFields } from \"@/components/data/columns\";\nimport { Authenticator } from \"@aws-amplify/ui-react\";\nimport \"@aws-amplify/ui-react/styles.css\";\nimport { Amplify } from \"aws-amplify\";\nimport React from \"react\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nAmplify.configure({\n  Auth: {\n    Cognito: {\n      userPoolId: process.env.NEXT_PUBLIC_COGNITO_USER_POOL_ID!,\n      userPoolClientId: process.env.NEXT_PUBLIC_COGNITO_USER_CLIENT_ID!,\n    },\n  },\n});\n\nfunction AuthProvider({ children }: Props) {\n  return (\n    <div>\n      <Authenticator formFields={formFields}>\n        {({ user }: any) =>\n          user ? (\n            <div>{children}</div>\n          ) : (\n            <div>\n              <h1>Please Sign In Below</h1>\n            </div>\n          )\n        }\n      </Authenticator>\n    </div>\n  );\n}\n\nexport default AuthProvider;\n"
  },
  {
    "path": "client/components/global/border-view/index.tsx",
    "content": "import { useGetTasksQuery, useUpdateTasksMutation } from \"@/state/api\";\nimport React from \"react\";\nimport { DndProvider } from \"react-dnd\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\nimport { Spinner } from \"../loader/spinner\";\nimport TaskColumn from \"../task-column\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nconst taskStatus = [\"To Do\", \"Work In Progress\", \"Under Review\", \"Completed\"];\n\nfunction BorderView({ id, setIsModelNewTasOpen }: Props) {\n  const {\n    data: tasks,\n    isLoading,\n    error,\n  } = useGetTasksQuery({ projectId: Number(id) });\n\n  const [updateTaskStatus] = useUpdateTasksMutation();\n\n  const moveTask = (taskId: number, toStatus: string) => {\n    updateTaskStatus({ taskId, status: toStatus });\n  };\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <DndProvider backend={HTML5Backend}>\n      <div className=\"grid grid-cols-1 gap-4 p-4 md:grid-cols-2 xl:grid-cols-4\">\n        {taskStatus.map((status) => (\n          <TaskColumn\n            key={status}\n            status={status}\n            tasks={tasks || []}\n            moveTask={moveTask}\n            setIsModelNewTasOpen={setIsModelNewTasOpen}\n          />\n        ))}\n      </div>\n    </DndProvider>\n  );\n}\n\nexport default BorderView;\n"
  },
  {
    "path": "client/components/global/loader/spinner.tsx",
    "content": "type SpinnerProps = {\n  color?: string;\n};\n\nexport const Spinner = ({ color }: SpinnerProps) => {\n  return (\n    <div\n      role=\"status\"\n      className=\"flex h-full w-full items-center justify-center\"\n    >\n      <svg\n        aria-hidden=\"true\"\n        className=\"inline h-8 w-8 animate-spin fill-yellow-400 text-gray-200 dark:text-gray-600\"\n        viewBox=\"0 0 100 101\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path\n          d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n          fill={color || \"#fff\"}\n        />\n        <path\n          d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n          fill={color || \"#fff\"}\n        />\n      </svg>\n    </div>\n  );\n};\n"
  },
  {
    "path": "client/components/global/project-header/index.tsx",
    "content": "import TabButton from \"@/components/global/tab-button\";\nimport Header from \"@/components/Header\";\nimport ModalNewProject from \"@/components/modal/modal-new-project\";\nimport {\n  Clock,\n  Filter,\n  Grid3x3,\n  Grid3X3,\n  List,\n  PlusSquare,\n  Share2,\n  Table,\n} from \"lucide-react\";\nimport { useState } from \"react\";\n\ntype Props = {\n  activeTab: string;\n  setActiveTab: (tabName: string) => void;\n};\n\nfunction ProjectHeader({ activeTab, setActiveTab }: Props) {\n  const [isModalNameProjectOpen, setIsModalNameProjectOpen] = useState(false);\n\n  return (\n    <div className=\"px-4 xl:px-6\">\n      <ModalNewProject\n        isOpen={isModalNameProjectOpen}\n        onClose={() => setIsModalNameProjectOpen(false)}\n      />\n      <div className=\"pb-6 pt-6 lg:pb-4 lg:pt-8\">\n        <Header\n          name=\"Product Design Development\"\n          buttonComponent={\n            <button\n              className=\"flex items-center rounded-md bg-blue-primary px-3 py-2 text-white hover:bg-blue-600\"\n              onClick={() => setIsModalNameProjectOpen(true)}\n            >\n              <PlusSquare className=\"mr-2 h-5 w-5\" /> New Board\n            </button>\n          }\n        />\n      </div>\n      <div className=\"flex flex-wrap-reverse gap-2 border-y border-gray-200 pb-[8px] pt-2 dark:border-stroke-dark md:items-center\">\n        <div className=\"flex flex-1 items-center gap-2 md:gap-4\">\n          <TabButton\n            name=\"Board\"\n            icon={<Grid3X3 className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n          <TabButton\n            name=\"List\"\n            icon={<List className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n          <TabButton\n            name=\"Timeline\"\n            icon={<Clock className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n          <TabButton\n            name=\"Table\"\n            icon={<Table className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n        </div>\n        <div className=\"flex items-center gap-2\">\n          <button className=\"text-gray-500 hover:text-gray-600 dark:text-neutral-500 dark:hover:text-gray-300\">\n            <Filter className=\"h-5 w-5\" />\n          </button>\n          <button className=\"text-gray-500 hover:text-gray-600 dark:text-neutral-500 dark:hover:text-gray-300\">\n            <Share2 className=\"h-5 w-5\" />\n          </button>\n          <div className=\"relative\">\n            <input\n              type=\"text\"\n              placeholder=\"Search Task\"\n              className=\"rounded-md border py-1 pl-10 pr-4 focus:outline-none dark:border-dark-secondary dark:bg-dark-secondary dark:text-white\"\n            />\n            <Grid3x3 className=\"absolute left-3 top-2 h-4 w-4 text-gray-400 dark:text-neutral-500\" />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default ProjectHeader;\n"
  },
  {
    "path": "client/components/global/tab-button/index.tsx",
    "content": "import React from \"react\";\n\ntype Props = {\n  name: string;\n  icon: React.ReactNode;\n  setActiveTab: (tabName: string) => void;\n  activeTab: string;\n};\n\nfunction TabButton({ activeTab, icon, name, setActiveTab }: Props) {\n  const isActive = activeTab === name;\n\n  return (\n    <button\n      className={`relative flex items-center gap-2 px-1 py-2 text-gray-500 after:absolute after:-bottom-[9px] after:left-0 after:h-[1px] after:w-full hover:text-blue-600 dark:text-neutral-500 dark:hover:text-white sm:px-2 lg:px-4 ${\n        isActive ? \"text-blue-600 after:bg-blue-600 dark:text-white\" : \"\"\n      }`}\n      onClick={() => setActiveTab(name)}\n    >\n      {icon}\n      {name}\n    </button>\n  );\n}\n\nexport default TabButton;\n"
  },
  {
    "path": "client/components/global/task/index.tsx",
    "content": "import { TasksTypes } from \"@/types/type\";\nimport { format } from \"date-fns\";\nimport { EllipsisVertical, MessageSquareMore } from \"lucide-react\";\nimport Image from \"next/image\";\nimport { useDrag } from \"react-dnd\";\n\ntype Props = {\n  task: TasksTypes;\n};\n\nfunction Task({ task }: Props) {\n  const [{ isDragging }, drop] = useDrag(() => ({\n    type: \"task\",\n    item: { id: task.id },\n    collect: (monitor: any) => ({\n      isDragging: !!monitor.isDragging(),\n    }),\n  }));\n\n  const taskTagsSplit = task.tags ? task.tags.split(\",\") : [];\n\n  const formattedStartDate = task.startDate\n    ? format(new Date(task.startDate), \"P\")\n    : \"\";\n\n  const formattedDueDate = task.dueDate\n    ? format(new Date(task.dueDate), \"P\")\n    : \"\";\n\n  const numberOfComments = (task.comments && task.comments.length) || 0;\n\n  const PriorityTags = ({ priority }: { priority: TasksTypes[\"priority\"] }) => (\n    <div\n      className={`rounded-full px-2 py-1 text-xs font-semibold ${\n        priority === \"Urgent\"\n          ? \"bg-red-200 text-red-700\"\n          : priority === \"High\"\n            ? \"bg-yellow-200 text-yellow-700\"\n            : priority === \"Medium\"\n              ? \"bg-green-200 text-green-700\"\n              : priority === \"Low\"\n                ? \"bg-blue-200 text-blue-700\"\n                : \"bg-gray-200 text-gray-700\"\n      }`}\n    >\n      {priority}\n    </div>\n  );\n\n  return (\n    <div\n      ref={(instance) => {\n        drop(instance);\n      }}\n      className={`mb-4 rounded-md bg-white shadow dark:bg-dark-secondary ${\n        isDragging ? \"opacity-50\" : \"opacity-100\"\n      }`}\n    >\n      {task.attachments && task.attachments.length > 0 && (\n        <Image\n          src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/${task.attachments[0].fileURL}`}\n          alt={task.attachments[0].fileName}\n          width={400}\n          height={200}\n          className=\"h-auto w-full rounded-md\"\n        />\n      )}\n      <div className=\"p-4 md:p-6\">\n        <div className=\"flex items-start justify-between\">\n          <div className=\"flex flex-1 flex-wrap items-center gap-2\">\n            {task.priority && <PriorityTags priority={task.priority} />}\n\n            <div className=\"flex gap-2\">\n              {taskTagsSplit.map((tag) => (\n                <div\n                  key={tag}\n                  className=\"rounded-full bg-blue-100 px-2 py-1 text-xs\"\n                >\n                  {\" \"}\n                  {tag}\n                </div>\n              ))}\n            </div>\n          </div>\n          <button className=\"flex h-6 w-4 flex-shrink-0 items-center justify-center dark:text-neutral-500\">\n            <EllipsisVertical size={26} />\n          </button>\n        </div>\n        <div className=\"my-3 flex justify-between\">\n          <h4 className=\"text-md font-bold dark:text-white\">{task.title}</h4>\n          {typeof task.points === \"number\" && (\n            <div className=\"text-xs font-semibold dark:text-white\">\n              {task.points} pts\n            </div>\n          )}\n        </div>\n        <div className=\"text-xs text-gray-500 dark:text-neutral-500\">\n          {formattedStartDate && <span>{formattedStartDate} - </span>}\n          {formattedDueDate && <span>{formattedDueDate}</span>}\n        </div>\n        <p className=\"text-sm font-semibold text-gray-600 dark:text-neutral-500\">\n          {task.description}\n        </p>\n        <div className=\"mt-4 border-t border-gray-200 dark:border-stroke-dark\" />\n\n        <div className=\"mt-3 flex items-center justify-between\">\n          <div className=\"flex -space-x-[6px] overflow-hidden\">\n            {task.assignee && (\n              <Image\n                src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/${task.assignee.profilePictureUrl}`}\n                alt={task.assignee.username}\n                width={30}\n                height={30}\n                className=\"h-8 w-8 rounded-full border-2 border-white object-cover dark:border-dark-secondary\"\n              />\n            )}\n            {task.author && (\n              <Image\n                src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/${task.author.profilePictureUrl}`}\n                alt={task.author.username}\n                width={30}\n                height={30}\n                className=\"h-8 w-8 rounded-full border-2 border-white object-cover dark:border-dark-secondary\"\n              />\n            )}\n          </div>\n          <div className=\"flex items-center text-gray-500 dark:text-neutral-500\">\n            <MessageSquareMore size={20} />\n            <span className=\"ml-1 text-sm dark:text-neutral-400\">\n              {numberOfComments}\n            </span>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default Task;\n"
  },
  {
    "path": "client/components/global/task-card/index.tsx",
    "content": "import { TasksTypes } from \"@/types/type\";\nimport { format } from \"date-fns\";\nimport Image from \"next/image\";\nimport React from \"react\";\n\ntype Props = {\n  task: TasksTypes;\n};\n\nfunction TaskCard({ task }: Props) {\n  return (\n    <div className=\"mb-3 rounded bg-white p-4 shadow dark:bg-dark-secondary dark:text-white\">\n      {task.attachments && task.attachments.length > 0 && (\n        <div>\n          <strong>Attachments:</strong>\n          <div className=\"flex flex-wrap\">\n            {task.attachments && task.attachments.length > 0 && (\n              <Image\n                src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/${task.attachments[0].fileURL}`}\n                alt={task.attachments[0].fileName}\n                width={400}\n                height={200}\n                className=\"rounded-md\"\n              />\n            )}\n          </div>\n        </div>\n      )}\n      <p>\n        <strong>ID:</strong> {task.id}\n      </p>\n      <p>\n        <strong>Title:</strong> {task.title}\n      </p>\n      <p>\n        <strong>Description:</strong>{\" \"}\n        {task.description || \"No description provided\"}\n      </p>\n      <p>\n        <strong>Status:</strong> {task.status}\n      </p>\n      <p>\n        <strong>Priority:</strong> {task.priority}\n      </p>\n      <p>\n        <strong>Tags:</strong> {task.tags || \"No tags\"}\n      </p>\n      <p>\n        <strong>Start Date:</strong>{\" \"}\n        {task.startDate ? format(new Date(task.startDate), \"P\") : \"Not set\"}\n      </p>\n      <p>\n        <strong>Due Date:</strong>{\" \"}\n        {task.dueDate ? format(new Date(task.dueDate), \"P\") : \"Not set\"}\n      </p>\n      <p>\n        <strong>Author:</strong>{\" \"}\n        {task.author ? task.author.username : \"Unknown\"}\n      </p>\n      <p>\n        <strong>Assignee:</strong>{\" \"}\n        {task.assignee ? task.assignee.username : \"Unassigned\"}\n      </p>\n    </div>\n  );\n}\n\nexport default TaskCard;\n"
  },
  {
    "path": "client/components/global/task-column/index.tsx",
    "content": "import { EllipsisVertical, Plus } from \"lucide-react\";\nimport React from \"react\";\nimport { useDrop } from \"react-dnd\";\nimport Task from \"../task\";\nimport { TasksTypes } from \"@/types/type\";\n\ntype Props = {\n  status: string;\n  tasks: TasksTypes[];\n  moveTask: (taskId: number, toStatus: string) => void;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nfunction TaskColumn({ moveTask, setIsModelNewTasOpen, status, tasks }: Props) {\n  const [{ isOver }, drop] = useDrop(() => ({\n    accept: \"task\",\n    drop: (item: { id: number }) => moveTask(item.id, status),\n    collect: (monitor: any) => ({\n      isOver: !!monitor.isOver(),\n    }),\n  }));\n\n  const tasksCount = tasks.filter((task) => task.status === status).length;\n\n  const statusColor: any = {\n    \"To Do\": \"#2563EB\",\n    \"Work In Progress\": \"#059669\",\n    \"Under Review\": \"#D97706\",\n    Completed: \"#000000\",\n  };\n\n  return (\n    <div\n      ref={(instance) => {\n        drop(instance);\n      }}\n      className={`sl:py-4 rounded-lg py-2 xl:px-2 ${isOver ? \"bg-blue-100 dark:bg-neutral-950\" : \"\"}`}\n    >\n      <div className=\"mb-3 flex w-full\">\n        <div\n          className={`w-2 !bg-[${statusColor[status]}] rounded-s-lg`}\n          style={{ backgroundColor: statusColor[status] }}\n        />\n        <div className=\"flex w-full items-center justify-between rounded-e-lg bg-white px-5 py-4 dark:bg-dark-secondary\">\n          <h3 className=\"flex items-center text-lg font-semibold dark:text-white\">\n            {status}{\" \"}\n            <span\n              className=\"ml-2 inline-block rounded-full bg-gray-200 p-1 text-center text-sm leading-none dark:bg-dark-tertiary\"\n              style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n            >\n              {tasksCount}\n            </span>\n          </h3>\n          <div className=\"flex items-center gap-1\">\n            <button className=\"flex h-6 w-5 items-center justify-center dark:text-neutral-500\">\n              <EllipsisVertical size={26} />\n            </button>\n            <button\n              className=\"flex h-6 w-6 items-center justify-center rounded bg-gray-200 dark:bg-dark-tertiary dark:text-white\"\n              onClick={() => setIsModelNewTasOpen(true)}\n            >\n              <Plus size={16} />\n            </button>\n          </div>\n        </div>\n      </div>\n\n      {tasks\n        .filter((task) => task.status === status)\n        .map((task) => (\n          <Task key={task.id} task={task} />\n        ))}\n    </div>\n  );\n}\nexport default TaskColumn;\n"
  },
  {
    "path": "client/components/home-page/index.tsx",
    "content": "\"use client\";\n\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetProjectsQuery, useGetTasksQuery } from \"@/state/api\";\nimport { Priority, ProjectTypes, TasksTypes } from \"@/types/type\";\nimport { DataGrid } from \"@mui/x-data-grid\";\nimport {\n  Bar,\n  BarChart,\n  CartesianGrid,\n  Cell,\n  Legend,\n  Pie,\n  PieChart,\n  ResponsiveContainer,\n  Tooltip,\n  XAxis,\n  YAxis,\n} from \"recharts\";\nimport { COLORS, taskColumns } from \"../data/columns\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport Header from \"../Header\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nfunction HomePage({}: Props) {\n  const {\n    data: tasks,\n    isLoading: tasksLoading,\n    isError: tasksError,\n  } = useGetTasksQuery({\n    projectId: parseInt(\"1\"),\n  });\n  const { data: projects, isLoading: isProjectsLoading } =\n    useGetProjectsQuery();\n\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  if (tasksLoading || isProjectsLoading) return <Spinner />;\n  if (tasksError || !tasks || !projects)\n    return <div>An error has occurred</div>;\n\n  const priorityCount = tasks.reduce(\n    (acc: Record<string, number>, task: TasksTypes) => {\n      const { priority } = task;\n      acc[priority as Priority] = (acc[priority as Priority] || 0) + 1;\n      return acc;\n    },\n    {},\n  );\n\n  const taskDistribution = Object.keys(priorityCount).map((key) => ({\n    name: key,\n    count: priorityCount[key],\n  }));\n\n  const statusCount = projects.reduce(\n    (acc: Record<string, number>, project: ProjectTypes) => {\n      const status = project.endDate ? \"Completed\" : \"Active\";\n      acc[status] = (acc[status] || 0) + 1;\n      return acc;\n    },\n    {},\n  );\n\n  const projectStatus = Object.keys(statusCount).map((key) => ({\n    name: key,\n    count: statusCount[key],\n  }));\n\n  const chartColors = isDarkMode\n    ? {\n        bar: \"#8884d8\",\n        barGrid: \"#303030\",\n        pieFill: \"#4A90E2\",\n        text: \"#FFFFFF\",\n      }\n    : {\n        bar: \"#8884d8\",\n        barGrid: \"#E0E0E0\",\n        pieFill: \"#82ca9d\",\n        text: \"#000000\",\n      };\n\n  return (\n    <div className=\"container h-full w-[100%] bg-gray-100 bg-transparent p-8\">\n      <Header name=\"Project Management Dashboard\" />\n      <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n        <div className=\"rounded-lg bg-white p-4 shadow dark:bg-dark-secondary\">\n          <h3 className=\"mb-4 text-lg font-semibold dark:text-white\">\n            Task Priority Distribution\n          </h3>\n          <ResponsiveContainer width=\"100%\" height={300}>\n            <BarChart data={taskDistribution}>\n              <CartesianGrid\n                strokeDasharray=\"3 3\"\n                stroke={chartColors.barGrid}\n              />\n              <XAxis dataKey=\"name\" stroke={chartColors.text} />\n              <YAxis stroke={chartColors.text} />\n              <Tooltip\n                contentStyle={{\n                  width: \"min-content\",\n                  height: \"min-content\",\n                }}\n              />\n              <Legend />\n              <Bar dataKey=\"count\" fill={chartColors.bar} />\n            </BarChart>\n          </ResponsiveContainer>\n        </div>\n        <div className=\"rounded-lg bg-white p-4 shadow dark:bg-dark-secondary\">\n          <h3 className=\"mb-4 text-lg font-semibold dark:text-white\">\n            Project Status\n          </h3>\n          <ResponsiveContainer width=\"100%\" height={300}>\n            <PieChart>\n              <Pie dataKey=\"count\" data={projectStatus} fill=\"#82ca9d\" label>\n                {projectStatus.map((entry, index) => (\n                  <Cell\n                    key={`cell-${index}`}\n                    fill={COLORS[index % COLORS.length]}\n                  />\n                ))}\n              </Pie>\n              <Tooltip />\n              <Legend />\n            </PieChart>\n          </ResponsiveContainer>\n        </div>\n        <div className=\"rounded-lg bg-white p-4 shadow dark:bg-dark-secondary md:col-span-2\">\n          <h3 className=\"mb-4 text-lg font-semibold dark:text-white\">\n            Your Tasks\n          </h3>\n          <div style={{ height: 400, width: \"100%\" }}>\n            <DataGrid\n              rows={tasks}\n              columns={taskColumns}\n              checkboxSelection\n              loading={tasksLoading}\n              getRowClassName={() => \"data-grid-row\"}\n              getCellClassName={() => \"data-grid-cell\"}\n              className={dataGridClassNames}\n              sx={dataGridSxStyles(isDarkMode)}\n            />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\nexport default HomePage;\n"
  },
  {
    "path": "client/components/list-view/index.tsx",
    "content": "import { useGetTasksQuery } from \"@/state/api\";\nimport { TasksTypes } from \"@/types/type\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport TaskCard from \"../global/task-card\";\nimport Header from \"../Header\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nfunction ListView({ id, setIsModelNewTasOpen }: Props) {\n  const {\n    data: tasks,\n    error,\n    isLoading,\n  } = useGetTasksQuery({ projectId: Number(id) });\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"px-4 pb-8 xl:px-6\">\n      <div className=\"pt-5\">\n        <Header\n          name=\"List\"\n          buttonComponent={\n            <button\n              className=\"hove:bg-blue-600 flex items-center rounded-md bg-blue-primary px-3 py-3 text-white\"\n              onClick={() => setIsModelNewTasOpen(true)}\n            >\n              Add Task\n            </button>\n          }\n          isSmallText\n        />\n      </div>\n      <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 lg:gap-6\">\n        {tasks?.map((task: TasksTypes) => (\n          <TaskCard key={task.id} task={task} />\n        ))}\n      </div>\n    </div>\n  );\n}\n\nexport default ListView;\n"
  },
  {
    "path": "client/components/modal/index.tsx",
    "content": "import Header from \"@/components/Header\";\nimport { X } from \"lucide-react\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\n\ntype Props = {\n  children: React.ReactNode;\n  isOpen: boolean;\n  onClose: () => void;\n  name: string;\n};\n\nfunction Modal({ children, isOpen, onClose, name }: Props) {\n  if (!isOpen) return null;\n\n  return ReactDOM.createPortal(\n    <div className=\"fixed inset-0 z-50 flex h-full w-full items-center justify-center overflow-y-auto bg-gray-600 bg-opacity-50 p-4\">\n      <div className=\"w-full max-w-2xl rounded-lg bg-white p-4 shadow-lg dark:bg-dark-secondary\">\n        <Header\n          name={name}\n          buttonComponent={\n            <button\n              className=\"flex h-7 w-7 items-center justify-center rounded-full bg-blue-primary text-white hover:bg-blue-600\"\n              onClick={onClose}\n            >\n              <X size={18} />\n            </button>\n          }\n          isSmallText\n        />\n        {children}\n      </div>\n    </div>,\n    document.body,\n  );\n}\n\nexport default Modal;\n"
  },
  {
    "path": "client/components/modal/modal-new-project/index.tsx",
    "content": "import { Spinner } from \"@/components/global/loader/spinner\";\nimport { useCreateProjectMutation } from \"@/state/api\";\nimport { formatISO } from \"date-fns\";\nimport { useState } from \"react\";\nimport Modal from \"..\";\n\ntype Props = {\n  isOpen: boolean;\n  onClose: () => void;\n};\n\nfunction ModalNewProject({ isOpen, onClose }: Props) {\n  const [createProject, { isLoading }] = useCreateProjectMutation();\n  const [projectName, setProjectName] = useState(\"\");\n  const [description, setDescription] = useState(\"\");\n  const [startDate, setStartDate] = useState(\"\");\n  const [endDate, setEndDate] = useState(\"\");\n\n  const handleSubmit = async () => {\n    if (!projectName || !startDate || !endDate) return;\n\n    const formateStartDate = formatISO(new Date(startDate), {\n      representation: \"complete\",\n    });\n    const formateEndDate = formatISO(new Date(endDate), {\n      representation: \"complete\",\n    });\n\n    await createProject({\n      name: projectName,\n      description,\n      startDate: formateStartDate,\n      endDate: formateEndDate,\n    });\n\n    onClose();\n  };\n\n  const isFormValid = () => {\n    return projectName && description && startDate && endDate;\n  };\n\n  const inputStyle =\n    \"w-full rounded-md border border-gray-300 p-2 shadow-sm dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  return (\n    <Modal isOpen={isOpen} onClose={onClose} name=\"Create New Project\">\n      <form\n        className=\"mt-4 space-y-6\"\n        onSubmit={(e) => {\n          e.preventDefault();\n          handleSubmit();\n        }}\n      >\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Project Name\"\n          value={projectName}\n          onChange={(e) => setProjectName(e.target.value)}\n        />\n        <textarea\n          className={inputStyle}\n          placeholder=\"Description\"\n          value={description}\n          onChange={(e) => setDescription(e.target.value)}\n        />\n        <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-2\">\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={startDate}\n            onChange={(e) => setStartDate(e.target.value)}\n          />\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={endDate}\n            onChange={(e) => setEndDate(e.target.value)}\n          />\n        </div>\n        <button\n          type=\"submit\"\n          className={`focus-offset-2 mt-4 flex w-full justify-center rounded-md border border-transparent bg-blue-primary px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-600 ${\n            !isFormValid() || isLoading ? \"cursor-not-allowed opacity-50\" : \"\"\n          }`}\n          disabled={!isFormValid() || isLoading}\n        >\n          {isLoading ? <Spinner /> : \"Create Project\"}\n        </button>\n      </form>\n    </Modal>\n  );\n}\n\nexport default ModalNewProject;\n"
  },
  {
    "path": "client/components/modal/model-new-task/index.tsx",
    "content": "import { Spinner } from \"@/components/global/loader/spinner\";\nimport { useCreateTasksMutation } from \"@/state/api\";\nimport { Priority, Status } from \"@/types/type\";\nimport { formatISO } from \"date-fns\";\nimport { useState } from \"react\";\nimport Modal from \"..\";\n\ntype Props = {\n  id?: string | null;\n  isOpen: boolean;\n  onClose: () => void;\n};\n\nfunction ModelNewTask({ id, isOpen, onClose }: Props) {\n  const [createTask, { isLoading }] = useCreateTasksMutation();\n  const [title, setTitle] = useState(\"\");\n  const [description, setDescription] = useState(\"\");\n  const [status, setStatus] = useState<Status>(Status.ToDo);\n  const [priority, setPriority] = useState<Priority>(Priority.Backlog);\n  const [tags, setTags] = useState(\"\");\n  const [startDate, setStartDate] = useState(\"\");\n  const [dueDate, setDueDate] = useState(\"\");\n  const [authorUserId, setAuthorUserId] = useState(\"\");\n  const [assignedUserId, setAssignedUserId] = useState(\"\");\n  const [projectId, setProjectId] = useState(\"\");\n\n  console.log(id);\n\n  const handleSubmit = async () => {\n    if (!title || !authorUserId || !(id !== null || projectId)) return;\n\n    const formateStartDate = formatISO(new Date(startDate), {\n      representation: \"complete\",\n    });\n    const formateEndDate = formatISO(new Date(dueDate), {\n      representation: \"complete\",\n    });\n\n    await createTask({\n      title,\n      description,\n      status,\n      priority,\n      tags,\n      startDate: formateStartDate,\n      dueDate: formateEndDate,\n      authorUserId: parseInt(authorUserId),\n      assignedUserId: parseInt(assignedUserId),\n      projectId: id !== null ? Number(id) : Number(projectId),\n    });\n\n    onClose();\n  };\n\n  const isFormValid = () => {\n    return title && authorUserId && (id !== null || projectId);\n  };\n\n  const selectStyles =\n    \"mb-4 block w-full rounded border border-gray-300 px-3 py-2 dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  const inputStyle =\n    \"w-full rounded-md border border-gray-300 p-2 shadow-sm dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  return (\n    <Modal isOpen={isOpen} onClose={onClose} name=\"Create New Project\">\n      <form\n        className=\"mt-4 space-y-6\"\n        onSubmit={(e) => {\n          e.preventDefault();\n          handleSubmit();\n        }}\n      >\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Title\"\n          value={title}\n          onChange={(e) => setTitle(e.target.value)}\n        />\n        <textarea\n          className={inputStyle}\n          placeholder=\"Description\"\n          value={description}\n          onChange={(e) => setDescription(e.target.value)}\n        />\n        <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-2\">\n          <select\n            className={selectStyles}\n            value={status}\n            onChange={(e) =>\n              setStatus(Status[e.target.value as keyof typeof Status])\n            }\n          >\n            <option value=\"\">Select Status</option>\n            <option value={Status.ToDo}>To Do</option>\n            <option value={Status.WorkInProgress}>Work In Progress</option>\n            <option value={Status.UnderReview}>Under Review</option>\n            <option value={Status.Completed}>Completed</option>\n          </select>\n          <select\n            className={selectStyles}\n            value={priority}\n            onChange={(e) =>\n              setPriority(Priority[e.target.value as keyof typeof Priority])\n            }\n          >\n            <option value=\"\">Select Priority</option>\n            <option value={Priority.Urgent}>Urgent</option>\n            <option value={Priority.High}>High</option>\n            <option value={Priority.Medium}>Medium</option>\n            <option value={Priority.Low}>Low</option>\n            <option value={Priority.Backlog}>Backlog</option>\n          </select>\n        </div>\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Tags (comma separated)\"\n          value={tags}\n          onChange={(e) => setTags(e.target.value)}\n        />\n        <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-2\">\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={startDate}\n            onChange={(e) => setStartDate(e.target.value)}\n          />\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={dueDate}\n            onChange={(e) => setDueDate(e.target.value)}\n          />\n        </div>\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Author User ID\"\n          value={authorUserId}\n          onChange={(e) => setAuthorUserId(e.target.value)}\n        />\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Assigned User ID\"\n          value={assignedUserId}\n          onChange={(e) => setAssignedUserId(e.target.value)}\n        />\n        {id === undefined && (\n          <input\n            type=\"text\"\n            className={inputStyle}\n            placeholder=\"Project Id\"\n            value={projectId}\n            onChange={(e) => setProjectId(e.target.value)}\n          />\n        )}\n        <button\n          type=\"submit\"\n          className={`focus-offset-2 mt-4 flex w-full justify-center rounded-md border border-transparent bg-blue-primary px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-600 ${\n            !isFormValid() || isLoading ? \"cursor-not-allowed opacity-50\" : \"\"\n          }`}\n          disabled={!isFormValid() || isLoading}\n        >\n          {isLoading ? <Spinner /> : \"Create Project\"}\n        </button>\n      </form>\n    </Modal>\n  );\n}\n\nexport default ModelNewTask;\n"
  },
  {
    "path": "client/components/navbar/index.tsx",
    "content": "import { setIsDarkMode, setIsSidebarCollapsed } from \"@/state\";\nimport { useGetAuthUserQuery } from \"@/state/api\";\nimport { signOut } from \"aws-amplify/auth\";\nimport { Menu, Moon, Search, Settings, Sun, User } from \"lucide-react\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport React from \"react\";\nimport { useAppDispatch, useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nfunction Navbar({}: Props) {\n  const dispatch = useAppDispatch();\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed,\n  );\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  const { data: currentUser } = useGetAuthUserQuery({});\n\n  const handleSignOut = async () => {\n    try {\n      await signOut();\n    } catch (error: any) {\n      console.log(\"🚀 ~ handleSignUp ~ error:\", error);\n    }\n  };\n\n  if (!currentUser) return null;\n  const currentUserDetails = currentUser.user;\n\n  return (\n    <div className=\"flex items-center justify-between bg-white px-4 py-3 dark:bg-black\">\n      <div className=\"flex items-center gap-8\">\n        {!isSidebarCollapsed ? null : (\n          <button\n            onClick={() => dispatch(setIsSidebarCollapsed(!isSidebarCollapsed))}\n          >\n            <Menu className=\"h-8 w-8 dark:text-white\" />\n          </button>\n        )}\n        <div className=\"relative flex h-min w-[200px]\">\n          <Search className=\"absolute left-[4px] top-1/2 mr-2 h-5 w-5 -translate-y-1/2 transform cursor-pointer dark:text-white\" />\n          <input\n            className=\"w-full rounded border-none bg-gray-100 p-2 pl-8 placeholder-gray-500 focus:border-transparent focus:outline-none dark:bg-gray-700 dark:text-white dark:placeholder-white\"\n            type=\"search\"\n            placeholder=\"Search...\"\n          />\n        </div>\n      </div>\n      <div className=\"flex items-center\">\n        <button\n          onClick={() => dispatch(setIsDarkMode(!isDarkMode))}\n          className={\n            isDarkMode\n              ? `rounded p-2 dark:hover:bg-gray-700`\n              : `rounded p-2 hover:bg-gray-100`\n          }\n        >\n          {isDarkMode ? (\n            <Sun className=\"h-6 w-6 cursor-pointer dark:text-white\" />\n          ) : (\n            <Moon className=\"h-6 w-6 cursor-pointer dark:text-white\" />\n          )}\n        </button>\n        <Link\n          href=\"/settings\"\n          className={\n            isDarkMode\n              ? `h-min w-min rounded p-2 dark:hover:bg-gray-700`\n              : `h-min w-min rounded p-2 hover:bg-gray-100`\n          }\n        >\n          <Settings className=\"h-6 w-6 cursor-pointer dark:text-white\" />\n        </Link>\n        <div className=\"ml-2 mr-5 hidden min-h-[2em] w-[0.1rem] bg-gray-200 md:inline-block\"></div>\n        <div className=\"hidden items-center justify-between md:flex\">\n          <div className=\"align-center flex h-9 w-9 justify-center\">\n            <User className=\"h-6 w-6 cursor-pointer self-center rounded-full dark:text-white\" />\n          </div>\n          <span className=\"mx-3 text-gray-800 dark:text-white\">\n            {currentUserDetails?.username}\n          </span>\n          <button\n            className=\"hidden rounded bg-blue-400 px-4 py-2 text-xs font-bold text-white hover:bg-blue-500 md:block\"\n            onClick={handleSignOut}\n          >\n            Sign out\n          </button>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default Navbar;\n"
  },
  {
    "path": "client/components/priorityPage/index.tsx",
    "content": "\"use client\";\n\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetAuthUserQuery, useGetTasksByUserQuery } from \"@/state/api\";\nimport { Priority, TasksTypes } from \"@/types/type\";\nimport { DataGrid } from \"@mui/x-data-grid\";\nimport { useState } from \"react\";\nimport { priorityColumns } from \"../data/columns\";\nimport TaskCard from \"../global/task-card\";\nimport Header from \"../Header\";\nimport ModelNewTask from \"../modal/model-new-task\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {\n  priority: Priority;\n};\n\nfunction PriorityPage({ priority }: Props) {\n  const [view, setView] = useState(\"list\");\n  const [isMobileNewTaskOpen, setIsMobileNewTaskOpen] = useState(false);\n  const { data: currentUser } = useGetAuthUserQuery({});\n\n  const userId = Number(currentUser?.user?.userId) ?? null;\n\n  const {\n    data: task,\n    isLoading,\n    isError: isTasksError,\n  } = useGetTasksByUserQuery(userId || 0, { skip: userId == null });\n\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n  const filteredTasks = task?.filter(\n    (t: TasksTypes) => t.priority === priority,\n  );\n\n  if (isTasksError || !task) return <div>An error occurred</div>;\n\n  return (\n    <div className=\"m-5 p-4\">\n      <ModelNewTask\n        isOpen={isMobileNewTaskOpen}\n        onClose={() => setIsMobileNewTaskOpen(false)}\n      />\n      <Header\n        name=\"Priority Page\"\n        buttonComponent={\n          <button\n            className=\"mr-3 rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700\"\n            onClick={() => setIsMobileNewTaskOpen(true)}\n          >\n            Add Task\n          </button>\n        }\n      />\n      <div className=\"mb-4 flex justify-start\">\n        <button\n          className={`rounded-bl-md rounded-tl-md px-4 py-2 ${\n            view === \"list\" ? \"bg-gray-300\" : \"bg-white\"\n          } `}\n          onClick={() => setView(\"list\")}\n        >\n          List\n        </button>\n        <button\n          className={`rounded-br-md rounded-tr-md px-4 py-2 ${\n            view === \"table\" ? \"bg-gray-300\" : \"bg-white\"\n          } `}\n          onClick={() => setView(\"table\")}\n        >\n          Table\n        </button>\n      </div>\n      {isLoading ? (\n        <div>Loading tasks...</div>\n      ) : view === \"list\" ? (\n        <div className=\"grid grid-cols-1 gap-4\">\n          {filteredTasks?.map((task: TasksTypes) => (\n            <TaskCard key={task.id} task={task} />\n          ))}\n        </div>\n      ) : (\n        view === \"table\" &&\n        filteredTasks && (\n          <div className=\"z-0 w-full\">\n            <DataGrid\n              rows={filteredTasks}\n              columns={priorityColumns}\n              checkboxSelection\n              getRowId={(row) => row.id}\n              className={dataGridClassNames}\n              sx={dataGridSxStyles(isDarkMode)}\n            />\n          </div>\n        )\n      )}\n    </div>\n  );\n}\n\nexport default PriorityPage;\n"
  },
  {
    "path": "client/components/project-card/index.tsx",
    "content": "import { ProjectTypes } from \"@/types/type\";\nimport React from \"react\";\n\ntype Props = {\n  project: ProjectTypes;\n};\n\nfunction ProjectCard({ project }: Props) {\n  return (\n    <div className=\"rounded border p-4 shadow dark:text-white\">\n      <h3>{project.name}</h3>\n      <p>{project.description}</p>\n      <p>Start Date: {project.startDate}</p>\n      <p>End Date: {project.endDate}</p>\n    </div>\n  );\n}\n\nexport default ProjectCard;\n"
  },
  {
    "path": "client/components/project-page/index.tsx",
    "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport BorderView from \"../global/border-view\";\nimport ProjectHeader from \"../global/project-header\";\nimport ListView from \"../list-view\";\nimport ModelNewTask from \"../modal/model-new-task\";\nimport TableView from \"../table-view\";\nimport Timeline from \"../timeline-view\";\n\ntype Props = {\n  id: string;\n};\n\nfunction ProjectPage({ id }: Props) {\n  const [activeTAB, setActiveTAB] = useState(\"Board\");\n  const [isModelNewTasOpen, setIsModelNewTasOpen] = useState(false);\n\n  return (\n    <div>\n      <ModelNewTask\n        id={id}\n        isOpen={isModelNewTasOpen}\n        onClose={() => setIsModelNewTasOpen(false)}\n      />\n      <ProjectHeader activeTab={activeTAB} setActiveTab={setActiveTAB} />\n      {activeTAB === \"Board\" && (\n        <BorderView id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n      )}\n      {activeTAB === \"List\" && (\n        <ListView id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n      )}\n      {activeTAB === \"Timeline\" && (\n        <Timeline id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n      )}\n      {activeTAB === \"Table\" && (\n        <TableView id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n      )}\n    </div>\n  );\n}\n\nexport default ProjectPage;\n"
  },
  {
    "path": "client/components/search-page/index.tsx",
    "content": "\"use client\";\n\nimport { useSearchQuery } from \"@/state/api\";\nimport { debounce } from \"lodash\";\nimport { useEffect, useState } from \"react\";\nimport Header from \"../Header\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport TaskCard from \"../global/task-card\";\nimport ProjectCard from \"../project-card\";\nimport UserCard from \"../user-card\";\n\ntype Props = {};\n\nfunction SearchPage({}: Props) {\n  const [searchTerm, setSearchTerm] = useState(\"\");\n  const {\n    data: searchResults,\n    isLoading,\n    isError,\n  } = useSearchQuery(searchTerm, {\n    skip: searchTerm.length < 3,\n  });\n\n  const handleSearch = debounce((e: React.ChangeEvent<HTMLInputElement>) => {\n    setSearchTerm(e.target.value);\n  }, 500);\n\n  useEffect(() => {\n    return handleSearch.cancel;\n  }, [handleSearch.cancel]);\n\n  return (\n    <div className=\"p-8\">\n      <Header name=\"Search\" />\n      <div>\n        <input\n          type=\"text\"\n          placeholder=\"Search...\"\n          className=\"w-1/2 rounded border p-3 shadow\"\n          onChange={handleSearch}\n        />\n      </div>\n      <div className=\"p-5\">\n        {isLoading && <Spinner />}\n        {isError && <p>Error occurred while fetching search results.</p>}\n        {!isLoading && !isError && searchResults && (\n          <div>\n            {searchResults.tasks && searchResults.tasks?.length > 0 && (\n              <h2>Tasks</h2>\n            )}\n            {searchResults.tasks?.map((task) => (\n              <TaskCard key={task.id} task={task} />\n            ))}\n\n            {searchResults.projects && searchResults.projects?.length > 0 && (\n              <h2>Projects</h2>\n            )}\n            {searchResults.projects?.map((project) => (\n              <ProjectCard key={project.id} project={project} />\n            ))}\n\n            {searchResults.users && searchResults.users?.length > 0 && (\n              <h2>Users</h2>\n            )}\n            {searchResults.users?.map((user) => (\n              <UserCard key={user.userId} user={user} />\n            ))}\n          </div>\n        )}\n      </div>\n    </div>\n  );\n}\n\nexport default SearchPage;\n"
  },
  {
    "path": "client/components/settings-page/index.tsx",
    "content": "import Header from \"../Header\";\nimport { userSettings } from \"../data/columns\";\n\ntype Props = {};\n\nconst labelStyles = \"block text-sm font-medium dark:text-white\";\nconst textStyles =\n  \"mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2 dark:text-white\";\n\nfunction SettingsPage({}: Props) {\n  return (\n    <div className=\"p-8\">\n      <Header name=\"Settings\" />\n      <div className=\"space-y-4\">\n        <div>\n          <label className={labelStyles}>Username</label>\n          <div className={textStyles}>{userSettings.username}</div>\n        </div>\n        <div>\n          <label className={labelStyles}>Email</label>\n          <div className={textStyles}>{userSettings.email}</div>\n        </div>\n        <div>\n          <label className={labelStyles}>Team</label>\n          <div className={textStyles}>{userSettings.teamName}</div>\n        </div>\n        <div>\n          <label className={labelStyles}>Role</label>\n          <div className={textStyles}>{userSettings.roleName}</div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default SettingsPage;\n"
  },
  {
    "path": "client/components/sidebar/index.tsx",
    "content": "\"use client\";\n\nimport { setIsSidebarCollapsed } from \"@/state\";\nimport { useGetAuthUserQuery, useGetProjectsQuery } from \"@/state/api\";\nimport { signOut } from \"aws-amplify/auth\";\nimport {\n  AlertCircle,\n  AlertOctagon,\n  AlertTriangle,\n  Briefcase,\n  ChevronDown,\n  ChevronUp,\n  Home,\n  Layers3,\n  LockIcon,\n  LucideIcon,\n  Search,\n  Settings,\n  ShieldAlert,\n  User,\n  Users,\n  X,\n} from \"lucide-react\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { usePathname } from \"next/navigation\";\nimport { useState } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nfunction SideBar({}: Props) {\n  const dispatch = useDispatch();\n  const [showProject, setShowProject] = useState(true);\n  const [showPriority, setShowPriority] = useState(true);\n\n  const { data: projects } = useGetProjectsQuery();\n\n  const { data: currentUser } = useGetAuthUserQuery({});\n\n  const handleSignOut = async () => {\n    try {\n      await signOut();\n    } catch (error: any) {\n      console.log(\"🚀 ~ handleSignUp ~ error:\", error);\n    }\n  };\n\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed,\n  );\n\n  if (!currentUser) return null;\n  const currentUserDetails = currentUser.user;\n\n  const sideBarClassNames = `fixed flex flex-col h-[100%] justify-between shadow-xl\n    transition-all duration-300 h-full z-40 dark:bg-black overflow-y-auto bg-white ${isSidebarCollapsed ? \"w-0 hidden\" : \"w-64\"}`;\n\n  return (\n    <div className={sideBarClassNames}>\n      <div className=\"flex h-[100%] w-full flex-col justify-start\">\n        {/*    */}\n        <div className=\"z-50 flex min-h-[56px] w-64 items-center justify-between bg-white px-6 pt-3 dark:bg-black\">\n          <div className=\"text-xl font-bold text-gray-800 dark:text-white\">\n            LIST\n          </div>\n          {isSidebarCollapsed ? null : (\n            <button\n              className=\"py-3\"\n              onClick={() =>\n                dispatch(setIsSidebarCollapsed(!isSidebarCollapsed))\n              }\n            >\n              <X className=\"h-6 w-6 text-gray-800 hover:text-gray-500 dark:text-white\" />\n            </button>\n          )}\n        </div>\n        <div className=\"flex items-center gap-5 border-y-[1.5px] border-gray-500 px-8 py-4 dark:border-gray-700\">\n          <Image src=\"/logo.png\" alt=\"logo\" width={40} height={40} />\n          <div>\n            <h3 className=\"text-lg font-bold tracking-wide dark:text-gray-200\">\n              TRELLO\n            </h3>\n\n            <div className=\"mt-1 flex items-start gap-2\">\n              <LockIcon className=\"mt-[0.1rem] h-3 w-3 text-gray-500 dark:text-gray-400\" />\n              <p className=\"text-xs text-gray-500\">Private</p>\n            </div>\n          </div>\n        </div>\n        <nav className=\"z-10 w-full\">\n          <SidebarLink icon={Home} label=\"Home\" href=\"/\" />\n          <SidebarLink icon={Briefcase} label=\"Timeline\" href=\"/timeline\" />\n          <SidebarLink icon={Search} label=\"Search\" href=\"/search\" />\n          <SidebarLink icon={Settings} label=\"Settings\" href=\"/settings\" />\n          <SidebarLink icon={User} label=\"Users\" href=\"/users\" />\n          <SidebarLink icon={Users} label=\"Teams\" href=\"/teams\" />\n        </nav>\n        <button\n          onClick={() => setShowProject((prev) => !prev)}\n          className=\"flex w-full items-center justify-between px-8 py-3 text-gray-500\"\n        >\n          <span>Projects</span>\n          {showProject ? (\n            <ChevronUp className=\"h-5 w-5\" />\n          ) : (\n            <ChevronDown className=\"h-5 w-5\" />\n          )}\n        </button>\n        {showProject &&\n          projects?.map((project) => (\n            <SidebarLink\n              key={project.id}\n              icon={Briefcase}\n              label={project.name}\n              href={`/projects/${project.id}`}\n            />\n          ))}\n        <button\n          onClick={() => setShowPriority((prev) => !prev)}\n          className=\"flex w-full items-center justify-between px-8 py-3 text-gray-500\"\n        >\n          <span>Priory</span>\n          {showPriority ? (\n            <ChevronUp className=\"h-5 w-5\" />\n          ) : (\n            <ChevronDown className=\"h-5 w-5\" />\n          )}\n        </button>\n        {showPriority && (\n          <>\n            <SidebarLink\n              icon={AlertCircle}\n              label=\"Urgent\"\n              href=\"/priority/urgent\"\n            />\n            <SidebarLink\n              icon={ShieldAlert}\n              label=\"High\"\n              href=\"/priority/high\"\n            />\n            <SidebarLink\n              icon={AlertTriangle}\n              label=\"Medium\"\n              href=\"/priority/medium\"\n            />\n            <SidebarLink icon={AlertOctagon} label=\"Low\" href=\"/priority/low\" />\n            <SidebarLink\n              icon={Layers3}\n              label=\"Backlog\"\n              href=\"/priority/backlog\"\n            />\n          </>\n        )}\n      </div>\n      <div className=\"z-10 mt-32 flex w-full flex-col items-center gap-4 bg-white px-8 py-8 dark:bg-black md:hidden\">\n        <div className=\"flex w-full items-center\">\n          <div className=\"align-center flex h-9 w-9 justify-center\">\n            <User className=\"h-6 w-6 cursor-pointer self-center rounded-full dark:text-white\" />\n          </div>\n          <span className=\"mx-3 text-gray-800 dark:text-white\">\n            {currentUserDetails?.username}\n          </span>\n          <button\n            className=\"self-start rounded bg-blue-400 px-4 py-2 text-xs font-bold text-white hover:bg-blue-500 md:block\"\n            onClick={handleSignOut}\n          >\n            Sign out\n          </button>\n        </div>\n      </div>\n    </div>\n  );\n}\n\ninterface SideBarLinksType {\n  href: string;\n  icon: LucideIcon;\n  label: string;\n}\n\nconst SidebarLink = ({ href, icon: Icon, label }: SideBarLinksType) => {\n  const pathName = usePathname();\n  const isActive =\n    pathName === href || (pathName === \"/\" && href === \"/dashboard\");\n  const screenWidth = window.innerWidth;\n\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed,\n  );\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  return (\n    <Link href={href} className=\"w-full\">\n      <div\n        className={`relative flex cursor-pointer items-center gap-3 rounded-sm transition-colors hover:bg-gray-100 dark:bg-black dark:hover:bg-gray-700 ${isActive ? \"bg-gray-100 text-white dark:bg-gray-600\" : \"\"} justify-start px-8 py-3`}\n      >\n        {isActive && (\n          <div className=\"absolute left-0 top-0 h-[100%] w-[5px] bg-blue-200\" />\n        )}\n\n        <Icon className=\"h-6 w-6 text-gray-800 dark:text-gray-500\" />\n        <span className={`font-medium text-gray-800 dark:text-gray-100`}>\n          {label}\n        </span>\n      </div>\n    </Link>\n  );\n};\n\nexport default SideBar;\n\n// 1.40\n"
  },
  {
    "path": "client/components/table-view/index.tsx",
    "content": "import { columns } from \"@/components/data/columns\";\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetTasksQuery } from \"@/state/api\";\nimport { DataGrid } from \"@mui/x-data-grid\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport Header from \"../Header\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nfunction TableView({ id, setIsModelNewTasOpen }: Props) {\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n  const {\n    data: tasks,\n    error,\n    isLoading,\n  } = useGetTasksQuery({ projectId: Number(id) });\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"h-[540px] w-full px-4 pb-8 xl:px-6\">\n      <div className=\"pt-5\">\n        <Header\n          name=\"Table\"\n          buttonComponent={\n            <button\n              className=\"flex items-center rounded-md bg-blue-primary px-3 py-2 text-white hover:bg-blue-600\"\n              onClick={() => setIsModelNewTasOpen(true)}\n            >\n              Add Task\n            </button>\n          }\n          isSmallText\n        />\n      </div>\n      <DataGrid\n        rows={tasks || []}\n        columns={columns}\n        className={dataGridClassNames}\n        sx={dataGridSxStyles(isDarkMode)}\n      />\n    </div>\n  );\n}\n\nexport default TableView;\n"
  },
  {
    "path": "client/components/team-page/index.tsx",
    "content": "\"use client\";\n\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetTeamsQuery } from \"@/state/api\";\nimport { DataGrid, GridColDef } from \"@mui/x-data-grid\";\nimport { CustomToolbar } from \"../data/columns\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport Header from \"../Header\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nconst columns: GridColDef[] = [\n  { field: \"id\", headerName: \"Team ID\", width: 100 },\n  { field: \"teamName\", headerName: \"Team Name\", width: 150 },\n  { field: \"productOwnerUsername\", headerName: \"Product Owner\", width: 200 },\n  {\n    field: \"projectManagerUsername\",\n    headerName: \"Project Manager\",\n    width: 200,\n  },\n];\n\nfunction TeamPage({}: Props) {\n  const { data: teams, isLoading, isError } = useGetTeamsQuery();\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  if (isLoading) return <Spinner />;\n  if (isError) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"flex w-full flex-col p-8\">\n      <Header name=\"Users\" />\n      <DataGrid\n        rows={teams || []}\n        columns={columns}\n        pagination\n        slots={{\n          toolbar: CustomToolbar,\n        }}\n        className={dataGridClassNames}\n        sx={dataGridSxStyles(isDarkMode)}\n      />\n    </div>\n  );\n}\n\nexport default TeamPage;\n"
  },
  {
    "path": "client/components/timeline/index.tsx",
    "content": "\"use client\";\n\nimport { useGetProjectsQuery } from \"@/state/api\";\nimport { TaskTypeItems } from \"@/types/type\";\nimport { DisplayOption, Gantt, ViewMode } from \"gantt-task-react\";\nimport \"gantt-task-react/dist/index.css\";\nimport React, { useMemo, useState } from \"react\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport { useAppSelector } from \"../wrapper/redux\";\nimport Header from \"../Header\";\n\ntype Props = {};\n\nfunction TimeLinePage({}: Props) {\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n  const { data: projects, isError, isLoading } = useGetProjectsQuery();\n\n  const [displayOptions, setDisplayOptions] = useState<DisplayOption>({\n    viewMode: ViewMode.Month,\n    locale: \"en-US\",\n  });\n\n  const ganttTasks = useMemo(() => {\n    return (\n      projects?.map((project) => ({\n        start: new Date(project.startDate as string),\n        end: new Date(project.endDate as string),\n        name: project.name,\n        id: `Project-${project.id}`,\n        type: \"project\" as TaskTypeItems,\n        progress: 50,\n        isDisabled: false,\n      })) || []\n    );\n  }, [projects]);\n\n  const handleViewModeChange = (\n    event: React.ChangeEvent<HTMLSelectElement>,\n  ) => {\n    setDisplayOptions((prevOptions) => ({\n      ...prevOptions,\n      viewMode: event.target.value as ViewMode,\n    }));\n  };\n\n  if (isLoading) return <Spinner />;\n  if (isError || !projects)\n    return <div>An error occurred while fetching projects</div>;\n\n  return (\n    <div className=\"max-w-full p-8\">\n      <header className=\"mb-4 flex items-center justify-between\">\n        <Header name=\"Projects Timeline\" />\n        <div className=\"relative inline-block w-64\">\n          <select\n            className=\"focus:shadow-outline block w-full appearance-none rounded border border-gray-400 bg-white px-4 py-2 pr-8 leading-tight shadow hover:border-gray-500 focus:outline-none dark:border-dark-secondary dark:bg-dark-secondary dark:text-white\"\n            value={displayOptions.viewMode}\n            onChange={handleViewModeChange}\n          >\n            <option value={ViewMode.Day}>Day</option>\n            <option value={ViewMode.Week}>Week</option>\n            <option value={ViewMode.Month}>Month</option>\n          </select>\n        </div>\n      </header>\n\n      <div className=\"overflow-hidden rounded-md bg-white shadow dark:bg-dark-secondary dark:text-white\">\n        <div className=\"timeline\">\n          <Gantt\n            tasks={ganttTasks}\n            {...displayOptions}\n            columnWidth={displayOptions.viewMode === ViewMode.Month ? 150 : 100}\n            listCellWidth=\"100px\"\n            projectBackgroundColor={isDarkMode ? \"#101214\" : \"#1f2937\"}\n            projectProgressColor={isDarkMode ? \"#1f2937\" : \"#aeb8c2\"}\n            projectProgressSelectedColor={isDarkMode ? \"#000\" : \"#9ba1a6\"}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default TimeLinePage;\n"
  },
  {
    "path": "client/components/timeline-view/index.tsx",
    "content": "import { useGetTasksQuery } from \"@/state/api\";\nimport { DisplayOption, Gantt, ViewMode } from \"gantt-task-react\";\nimport \"gantt-task-react/dist/index.css\";\nimport React, { useMemo, useState } from \"react\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\ntype TaskTypeItems = \"task\" | \"milestone\" | \"project\";\n\nfunction Timeline({ id, setIsModelNewTasOpen }: Props) {\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  const {\n    data: tasks,\n    error,\n    isLoading,\n  } = useGetTasksQuery({ projectId: Number(id) });\n\n  const [displayOptions, setDisplayOptions] = useState<DisplayOption>({\n    viewMode: ViewMode.Month,\n    locale: \"en-US\",\n  });\n\n  const ganttTasks = useMemo(() => {\n    return (\n      tasks?.map((task) => ({\n        start: new Date(task.startDate as string),\n        end: new Date(task.dueDate as string),\n        name: task.title,\n        id: `Task-${task.id}`,\n        type: \"task\" as TaskTypeItems,\n        progress: task.points ? (task.points / 100) * 100 : 0,\n        isDisabled: false,\n      })) || []\n    );\n  }, [tasks]);\n\n  const handleViewModeChange = (\n    event: React.ChangeEvent<HTMLSelectElement>,\n  ) => {\n    setDisplayOptions((prevOptions) => ({\n      ...prevOptions,\n      viewMode: event.target.value as ViewMode,\n    }));\n  };\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"px-4 xl:px-6\">\n      <div className=\"flex flex-wrap items-center justify-between gap-2 py-5\">\n        <h1 className=\"me-2 text-lg font-bold dark:text-white\">\n          Project Tasks Timeline\n        </h1>\n        <div className=\"relative inline-block w-64\">\n          <select\n            className=\"focus:shadow-outline block w-full appearance-none rounded border border-gray-400 bg-white px-4 py-2 pr-8 leading-tight shadow hover:border-gray-500 focus:outline-none dark:border-dark-secondary dark:bg-dark-secondary dark:text-white\"\n            value={displayOptions.viewMode}\n            onChange={handleViewModeChange}\n          >\n            <option value={ViewMode.Day}>Day</option>\n            <option value={ViewMode.Week}>Week</option>\n            <option value={ViewMode.Month}>Month</option>\n          </select>\n        </div>\n      </div>\n\n      <div className=\"overflow-hidden rounded-md bg-white shadow dark:bg-dark-secondary dark:text-white\">\n        <div className=\"timeline\">\n          <Gantt\n            tasks={ganttTasks}\n            {...displayOptions}\n            columnWidth={displayOptions.viewMode === ViewMode.Month ? 150 : 100}\n            listCellWidth=\"100px\"\n            barBackgroundColor={isDarkMode ? \"#101214\" : \"#aeb8c2\"}\n            barBackgroundSelectedColor={isDarkMode ? \"#000\" : \"#9ba1a6\"}\n          />\n        </div>\n        <div className=\"px-4 pb-5 pt-1\">\n          <button\n            className=\"flex items-center rounded bg-blue-primary px-3 py-2 text-white hover:bg-blue-600\"\n            onClick={() => setIsModelNewTasOpen(true)}\n          >\n            Add New Task\n          </button>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default Timeline;\n"
  },
  {
    "path": "client/components/user-card/index.tsx",
    "content": "import { User } from \"@/types/type\";\nimport Image from \"next/image\";\nimport React from \"react\";\n\ntype Props = {\n  user: User;\n};\n\nfunction UserCard({ user }: Props) {\n  return (\n    <div className=\"flex items-center rounded border p-4 shadow\">\n      {user.profilePictureUrl && (\n        <Image\n          src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/p1.jpeg`}\n          alt=\"profile picture\"\n          width={32}\n          height={32}\n          className=\"rounded-full\"\n        />\n      )}\n      <div>\n        <h3>{user.username}</h3>\n        <p>{user.email}</p>\n      </div>\n    </div>\n  );\n}\n\nexport default UserCard;\n"
  },
  {
    "path": "client/components/user-page/index.tsx",
    "content": "\"use client\";\n\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetUsersQuery } from \"@/state/api\";\nimport { DataGrid, GridColDef } from \"@mui/x-data-grid\";\nimport Image from \"next/image\";\nimport { CustomToolbar } from \"../data/columns\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport Header from \"../Header\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nconst columns: GridColDef[] = [\n  { field: \"userId\", headerName: \"ID\", width: 100 },\n  { field: \"username\", headerName: \"Username\", width: 150 },\n  {\n    field: \"profilePictureUrl\",\n    headerName: \"Profile Picture\",\n    width: 100,\n    renderCell: (params) => (\n      <div className=\"flex h-full w-full items-center justify-center\">\n        <div className=\"h-9 w-9\">\n          <Image\n            src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/${params.value}`}\n            alt={params.row.username}\n            width={100}\n            height={50}\n            className=\"h-full rounded-full object-cover\"\n          />\n        </div>\n      </div>\n    ),\n  },\n];\n\nfunction UserPage({}: Props) {\n  const { data: users, isLoading, isError } = useGetUsersQuery();\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  if (isLoading) return <Spinner />;\n  if (isError) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"flex w-full flex-col p-8\">\n      <Header name=\"Users\" />\n      <DataGrid\n        rows={users || []}\n        columns={columns}\n        getRowId={(row) => row.userId}\n        pagination\n        slots={{\n          toolbar: CustomToolbar,\n        }}\n        className={dataGridClassNames}\n        sx={dataGridSxStyles(isDarkMode)}\n      />\n    </div>\n  );\n}\n\nexport default UserPage;\n"
  },
  {
    "path": "client/components/wrapper/dashboardWrapper.tsx",
    "content": "\"use client\";\n\nimport Navbar from \"@/components/navbar\";\nimport SideBar from \"@/components/sidebar\";\nimport React, { useEffect } from \"react\";\nimport AuthProvider from \"../global/auth-provider\";\nimport StoreProvider, { useAppSelector } from \"./redux\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nfunction DashboardLayout({ children }: Props) {\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed,\n  );\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  useEffect(() => {\n    if (isDarkMode) {\n      document.documentElement.classList.add(\"dark\");\n    } else {\n      document.documentElement.classList.remove(\"dark\");\n    }\n  });\n\n  return (\n    <div className=\"flex min-h-screen w-full bg-gray-50 text-gray-900\">\n      <SideBar />\n      <main\n        className={`flex w-full flex-col bg-gray-50 dark:bg-dark-bg ${isSidebarCollapsed ? \"\" : \"md:pl-64\"}`}\n      >\n        <Navbar />\n        {children}\n      </main>\n    </div>\n  );\n}\n\nconst DashboardWrapper = ({ children }: { children: React.ReactNode }) => {\n  return (\n    <StoreProvider>\n      <AuthProvider>\n        <DashboardLayout>{children}</DashboardLayout>\n      </AuthProvider>\n    </StoreProvider>\n  );\n};\n\nexport default DashboardWrapper;\n"
  },
  {
    "path": "client/components/wrapper/redux.tsx",
    "content": "import globalReducer from \"@/state\";\nimport { api } from \"@/state/api\";\nimport { combineReducers, configureStore } from \"@reduxjs/toolkit\";\nimport { setupListeners } from \"@reduxjs/toolkit/query\";\nimport { useRef } from \"react\";\nimport {\n  Provider,\n  TypedUseSelectorHook,\n  useDispatch,\n  useSelector,\n} from \"react-redux\";\nimport {\n  FLUSH,\n  PAUSE,\n  PERSIST,\n  persistReducer,\n  persistStore,\n  PURGE,\n  REGISTER,\n  REHYDRATE,\n} from \"redux-persist\";\nimport { PersistGate } from \"redux-persist/integration/react\";\nimport createWebStorage from \"redux-persist/lib/storage/createWebStorage\";\n\n/* REDUX PERSISTENCE */\nconst createNoopStorage = () => {\n  return {\n    getItem(_key: any) {\n      return Promise.resolve(null);\n    },\n    setItem(_key: any, value: any) {\n      return Promise.resolve(value);\n    },\n    removeItem(_key: any) {\n      return Promise.resolve();\n    },\n  };\n};\n\nconst storage =\n  typeof window === \"undefined\"\n    ? createNoopStorage()\n    : createWebStorage(\"local\");\n\nconst persistConfig = {\n  key: \"root\",\n  storage,\n  whitelist: [\"global\"],\n};\nconst rootReducer = combineReducers({\n  global: globalReducer,\n  [api.reducerPath]: api.reducer,\n});\nconst persistedReducer = persistReducer(persistConfig, rootReducer);\n\n/* REDUX STORE */\nexport const makeStore = () => {\n  return configureStore({\n    reducer: persistedReducer,\n    // @ts-ignore\n    middleware: (getDefault) =>\n      getDefault({\n        serializableCheck: {\n          ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],\n        },\n      }).concat(api.middleware),\n  });\n};\n\n/* REDUX TYPES */\nexport type AppStore = ReturnType<typeof makeStore>;\nexport type RootState = ReturnType<AppStore[\"getState\"]>;\nexport type AppDispatch = AppStore[\"dispatch\"];\nexport const useAppDispatch = () => useDispatch<AppDispatch>();\nexport const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;\n\n/* PROVIDER */\nexport default function StoreProvider({\n  children,\n}: {\n  children: React.ReactNode;\n}) {\n  const storeRef = useRef<AppStore>();\n  if (!storeRef.current) {\n    storeRef.current = makeStore();\n    setupListeners(storeRef.current.dispatch);\n  }\n  const persistor = persistStore(storeRef.current);\n\n  return (\n    <Provider store={storeRef.current}>\n      <PersistGate loading={null} persistor={persistor}>\n        {children}\n      </PersistGate>\n    </Provider>\n  );\n}\n"
  },
  {
    "path": "client/lib/utils.ts",
    "content": "export const dataGridClassNames =\n  \"border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200\";\n\nexport const dataGridSxStyles = (isDarkMode: boolean) => {\n  return {\n    \"& .MuiDataGrid-columnHeaders\": {\n      color: `${isDarkMode ? \"#e5e7eb\" : \"\"}`,\n      '& [role=\"row\"] > *': {\n        backgroundColor: `${isDarkMode ? \"#1d1f21\" : \"white\"}`,\n        borderColor: `${isDarkMode ? \"#2d3135\" : \"\"}`,\n      },\n    },\n    \"& .MuiIconbutton-root\": {\n      color: `${isDarkMode ? \"#a3a3a3\" : \"\"}`,\n    },\n    \"& .MuiTablePagination-root\": {\n      color: `${isDarkMode ? \"#a3a3a3\" : \"\"}`,\n    },\n    \"& .MuiTablePagination-selectIcon\": {\n      color: `${isDarkMode ? \"#a3a3a3\" : \"\"}`,\n    },\n    \"& .MuiDataGrid-cell\": {\n      border: \"none\",\n    },\n    \"& .MuiDataGrid-row\": {\n      borderBottom: `1px solid ${isDarkMode ? \"#2d3135\" : \"e5e7eb\"}`,\n    },\n    \"& .MuiDataGrid-withBorderColor\": {\n      borderColor: `${isDarkMode ? \"#2d3135\" : \"e5e7eb\"}`,\n    },\n  };\n};\n"
  },
  {
    "path": "client/next.config.mjs",
    "content": "/** @type {import('next').NextConfig} */\nconst nextConfig = {\n  images: {\n    remotePatterns: [\n      {\n        protocol: \"https\",\n        hostname: \"sh-s3-images.s3.us-east-1.amazonaws.com\",\n        port: \"\",\n        pathname: \"/**\",\n      },\n    ],\n  },\n};\n\nexport default nextConfig;\n"
  },
  {
    "path": "client/package.json",
    "content": "{\n  \"name\": \"client\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"build\": \"next build\",\n    \"start\": \"next start\",\n    \"lint\": \"next lint\"\n  },\n  \"dependencies\": {\n    \"@aws-amplify/ui-react\": \"^6.9.0\",\n    \"@emotion/react\": \"^11.14.0\",\n    \"@emotion/styled\": \"^11.14.0\",\n    \"@mui/material\": \"^6.3.0\",\n    \"@mui/x-data-grid\": \"^7.23.5\",\n    \"@reduxjs/toolkit\": \"^2.5.0\",\n    \"aws-amplify\": \"^6.12.1\",\n    \"axios\": \"^1.7.9\",\n    \"date-fns\": \"^4.1.0\",\n    \"dotenv\": \"^16.4.7\",\n    \"gantt-task-react\": \"^0.3.9\",\n    \"lodash\": \"^4.17.21\",\n    \"lucide-react\": \"^0.469.0\",\n    \"next\": \"14.2.7\",\n    \"numeral\": \"^2.0.6\",\n    \"react\": \"^18\",\n    \"react-dnd\": \"^16.0.1\",\n    \"react-dnd-html5-backend\": \"^16.0.1\",\n    \"react-dom\": \"^18\",\n    \"react-redux\": \"^9.2.0\",\n    \"recharts\": \"^2.15.0\",\n    \"redux-persist\": \"^6.0.0\"\n  },\n  \"devDependencies\": {\n    \"@types/lodash\": \"^4.17.13\",\n    \"@types/node\": \"^20\",\n    \"@types/numeral\": \"^2.0.5\",\n    \"@types/react\": \"^18\",\n    \"@types/react-dom\": \"^18\",\n    \"@types/uuid\": \"^10.0.0\",\n    \"eslint\": \"^8\",\n    \"eslint-config-next\": \"14.2.7\",\n    \"postcss\": \"^8\",\n    \"prettier\": \"^3.4.2\",\n    \"prettier-plugin-tailwindcss\": \"^0.6.9\",\n    \"tailwind-merge\": \"^2.6.0\",\n    \"tailwindcss\": \"^3.4.1\",\n    \"typescript\": \"^5\"\n  }\n}\n"
  },
  {
    "path": "client/postcss.config.mjs",
    "content": "/** @type {import('postcss-load-config').Config} */\nconst config = {\n  plugins: {\n    tailwindcss: {},\n  },\n};\n\nexport default config;\n"
  },
  {
    "path": "client/state/api.ts",
    "content": "import {\n  ProjectTypes,\n  SearchResults,\n  TasksTypes,\n  Team,\n  User,\n} from \"@/types/type\";\nimport { createApi, fetchBaseQuery } from \"@reduxjs/toolkit/query/react\";\nimport { fetchAuthSession, getCurrentUser } from \"aws-amplify/auth\";\n\nexport const api = createApi({\n  baseQuery: fetchBaseQuery({\n    baseUrl: process.env.NEXT_PUBLIC_BASE_URL,\n    prepareHeaders: async (headers) => {\n      const session = await fetchAuthSession();\n      const { accessToken } = session.tokens ?? {};\n\n      if (accessToken) {\n        headers.set(\"Authorization\", `Bearer ${accessToken}`);\n      }\n\n      return headers;\n    },\n  }),\n  reducerPath: \"api\",\n  tagTypes: [\"Projects\", \"Tasks\", \"Users\", \"Teams\"],\n  endpoints: (build) => ({\n    getAuthUser: build.query({\n      queryFn: async (_, _queryApi, _extraoptions, fetchWihBQ) => {\n        try {\n          const user = await getCurrentUser();\n          const session = await fetchAuthSession();\n\n          if (!session) throw new Error(\"No session found\");\n\n          const { userSub } = session;\n          const { accessToken } = session.tokens ?? {};\n\n          const userDetailsResponse = await fetchWihBQ(`users/${userSub}`);\n          const userDetails = userDetailsResponse.data as User;\n\n          return { data: { user, userSub, userDetails } };\n        } catch (error: any) {\n          return { error: error.message || \"could not fetch user data\" };\n        }\n      },\n    }),\n    getProjects: build.query<ProjectTypes[], void>({\n      query: () => \"projects\",\n      providesTags: [\"Projects\"],\n    }),\n    createProject: build.mutation<ProjectTypes, Partial<ProjectTypes>>({\n      query: (project) => ({\n        url: \"projects\",\n        method: \"POST\",\n        body: project,\n      }),\n      invalidatesTags: [\"Projects\"],\n    }),\n    getTasks: build.query<TasksTypes[], { projectId: number }>({\n      query: ({ projectId }) => `tasks?projectId=${projectId}`,\n      providesTags: (result) =>\n        result\n          ? result.map(({ id }) => ({ type: \"Tasks\" as const, id }))\n          : [{ type: \"Tasks\" as const }],\n    }),\n    getTasksByUser: build.query<TasksTypes[], number>({\n      query: (userId) => `tasks/user/${userId}`,\n      providesTags: (result, error, userId) =>\n        result\n          ? result.map(({ id }) => ({ type: \"Tasks\", id }))\n          : [{ type: \"Tasks\", id: userId }],\n    }),\n    createTasks: build.mutation<TasksTypes, Partial<TasksTypes>>({\n      query: (task) => ({\n        url: \"tasks\",\n        method: \"POST\",\n        body: task,\n      }),\n      invalidatesTags: [\"Tasks\"],\n    }),\n    updateTasks: build.mutation<TasksTypes, { taskId: number; status: string }>(\n      {\n        query: ({ taskId, status }) => ({\n          url: `tasks/${taskId}/status`,\n          method: \"PATCH\",\n          body: { status },\n        }),\n        invalidatesTags: (result, error, { taskId }) => [\n          { type: \"Tasks\", id: taskId },\n        ],\n      },\n    ),\n    getTeams: build.query<Team[], void>({\n      query: () => \"teams\",\n      providesTags: [\"Teams\"],\n    }),\n    getUsers: build.query<User[], void>({\n      query: () => \"users\",\n      providesTags: [\"Users\"],\n    }),\n    search: build.query<SearchResults, string>({\n      query: (query) => `search?query=${query}`,\n    }),\n  }),\n});\n\nexport const {\n  useGetProjectsQuery,\n  useCreateProjectMutation,\n  useGetTasksQuery,\n  useCreateTasksMutation,\n  useUpdateTasksMutation,\n  useSearchQuery,\n  useGetUsersQuery,\n  useGetTeamsQuery,\n  useGetTasksByUserQuery,\n  useGetAuthUserQuery,\n} = api;\n"
  },
  {
    "path": "client/state/index.ts",
    "content": "import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\n\nexport interface initialStateTypes {\n  isSidebarCollapsed: boolean;\n  isDarkMode: boolean;\n}\n\nconst initialState: initialStateTypes = {\n  isSidebarCollapsed: false,\n  isDarkMode: false,\n};\n\nexport const globalSlice = createSlice({\n  name: \"global\",\n  initialState,\n  reducers: {\n    setIsSidebarCollapsed: (state, action: PayloadAction<boolean>) => {\n      state.isSidebarCollapsed = action.payload;\n    },\n    setIsDarkMode: (state, action: PayloadAction<boolean>) => {\n      state.isDarkMode = action.payload;\n    },\n  },\n});\n\nexport const { setIsSidebarCollapsed, setIsDarkMode } = globalSlice.actions;\nexport default globalSlice.reducer;\n"
  },
  {
    "path": "client/tailwind.config.ts",
    "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n  darkMode: \"class\",\n  content: [\n    \"./pages/**/*.{js,ts,jsx,tsx,mdx}\",\n    \"./components/**/*.{js,ts,jsx,tsx,mdx}\",\n    \"./app/**/*.{js,ts,jsx,tsx,mdx}\",\n  ],\n  theme: {\n    extend: {\n      colors: {\n        white: \"#ffffff\",\n        gray: {\n          100: \"#f3f4f6\",\n          200: \"#e5e7eb\",\n          300: \"#d1d5db\",\n          500: \"#6b7280\",\n          700: \"#374151\",\n          800: \"#1f2937\",\n        },\n        blue: {\n          200: \"#93c5fd\",\n          400: \"#60a5fa\",\n          500: \"#3b82f6\",\n        },\n        \"dark-bg\": \"#101214\",\n        \"dark-secondary\": \"#1d1f21\",\n        \"dark-tertiary\": \"#3b3d40\",\n        \"blue-primary\": \"#0275ff\",\n        \"stroke-dark\": \"#2d3135\",\n        background: \"var(--background)\",\n        foreground: \"var(--foreground)\",\n      },\n    },\n  },\n  plugins: [],\n} satisfies Config;\n"
  },
  {
    "path": "client/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"noEmit\": true,\n    \"esModuleInterop\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"bundler\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"jsx\": \"preserve\",\n    \"incremental\": true,\n    \"plugins\": [\n      {\n        \"name\": \"next\"\n      }\n    ],\n    \"paths\": {\n      \"@/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\"next-env.d.ts\", \"**/*.ts\", \"**/*.tsx\", \".next/types/**/*.ts\"],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "client/types/type.ts",
    "content": "export interface ProjectTypes {\n  id: number;\n  name: string;\n  description?: string;\n  startDate?: string;\n  endDate?: string;\n}\n\nexport enum Status {\n  ToDo = \"To Do\",\n  WorkInProgress = \"Work In Progress\",\n  UnderReview = \"Under Review\",\n  Completed = \"Completed\",\n}\n\nexport enum Priority {\n  Urgent = \"Urgent\",\n  High = \"High\",\n  Medium = \"Medium\",\n  Low = \"Low\",\n  Backlog = \"Backlog\",\n}\n\nexport interface User {\n  userId?: number;\n  username: string;\n  email: string;\n  profilePictureUrl?: string;\n  cognitoId?: string;\n  teamId?: number;\n}\n\nexport interface Attachment {\n  id: number;\n  fileURL: string;\n  fileName: string;\n  taskId: number;\n  uploadedById: number;\n}\n\nexport interface TasksTypes {\n  id: number;\n  title: string;\n  description?: string;\n  status?: Status;\n  priority?: Priority;\n  tags?: string;\n  startDate?: string;\n  dueDate?: string;\n  points?: number;\n  projectId: number;\n  authorUserId?: number;\n  assignedUserId?: number;\n\n  author?: User;\n  assignee?: User;\n  comments?: Comment[];\n  attachments?: Attachment[];\n}\n\nexport interface SearchResults {\n  tasks?: TasksTypes[];\n  projects?: ProjectTypes[];\n  users?: User[];\n}\n\nexport interface Team {\n  teamId: number;\n  teamName: string;\n  productOwnerUserId?: number;\n  projectManagerUserId?: number;\n}\n\nexport type TaskTypeItems = \"task\" | \"milestone\" | \"project\";\n"
  },
  {
    "path": "lamda_trigger.mjs",
    "content": "import https from \"node:https\";\n\nexport const handler = async (event) => {\n  const postdata = JSON.stringify({\n    username:\n      event.request.userAttributes[\"preferred_username\"] || event.userName,\n    cognitoId: event.userName,\n    profilePictureUrl: \"i1.jpg\",\n    teamId: 1,\n  });\n\n  const opctions = {\n    hostname: \"https://2yk8eg8yxd.execute-api.us-east-1.amazonaws.com/prod\",\n    port: 443,\n    path: \"/create-user\",\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"Content-Length\": postdata.length,\n    },\n  };\n\n  const responseBody = await new Promise((resolve, reject) => {\n    const req = https.request(opctions, (res) => {\n      /* console.log(`statusCode: ${res.statusCode}`) */\n\n      res.setEncoding(\"utf8\");\n      let body = \"\";\n      res.on(\"data\", (chunk) => (body += chunk));\n      res.on(\"end\", () => resolve(body));\n    });\n\n    req.on(\"error\", reject);\n    req.write(postdata);\n    req.end();\n  });\n\n  return event();\n};\n"
  },
  {
    "path": "production-level-application/.eslintrc.json",
    "content": "{\n  \"extends\": \"next/core-web-vitals\"\n}\n"
  },
  {
    "path": "production-level-application/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n.yarn/install-state.gz\n\n# testing\n/coverage\n\n# next.js\n/.next/\n/out/\n\n# production\n/build\n\n# misc\n.DS_Store\n*.pem\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# local env files\n.env*.local\n\n\n# vercel\n.vercel\n\n# typescript\n*.tsbuildinfo\nnext-env.d.ts\n"
  },
  {
    "path": "production-level-application/README.md",
    "content": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n"
  },
  {
    "path": "production-level-application/actions/index.ts",
    "content": "import { currentUser } from \"@clerk/nextjs/server\";\nimport { redirect } from \"next/navigation\";\n\nexport const onCurrentUser = async () => {\n  const user = await currentUser();\n  if (!user) return redirect(\"/\");\n\n  return user;\n};\n"
  },
  {
    "path": "production-level-application/app/(auth)/layout.tsx",
    "content": "import React from \"react\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nfunction Layout({ children }: Props) {\n  return (\n    <div className=\"h-screen flex justify-center items-center\">{children}</div>\n  );\n}\n\nexport default Layout;\n"
  },
  {
    "path": "production-level-application/app/(auth)/sign-in/[[...sign-in]]/page.tsx",
    "content": "import { SignIn } from \"@clerk/nextjs\";\nimport React from \"react\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <SignIn />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/(auth)/sign-up/[[...sign-up]]/page.tsx",
    "content": "import { SignUp } from \"@clerk/nextjs\";\nimport React from \"react\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return <SignUp />;\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/api/move/[taskId]/route.tsx",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\nexport async function PATCH(\n  request: Request,\n  { params }: { params: { taskId?: string } }\n) {\n  const { taskId } = params;\n  const body = await request.json();\n  const { status } = body;\n\n  if (!taskId)\n    return NextResponse.json({ error: \"Missing taskId\" }, { status: 400 });\n\n  try {\n    const updateTasks = await prisma.task.update({\n      where: {\n        id: taskId,\n      },\n      data: {\n        status: status,\n      },\n    });\n\n    return NextResponse.json(updateTasks);\n  } catch (error: any) {\n    return NextResponse.json(\n      {\n        error: `Failed to update task ${error.message}`,\n      },\n      { status: 500 }\n    );\n  }\n}\n\nexport async function DELETE(\n  request: Request,\n  { params }: { params: { taskId?: string } }\n) {\n  const { taskId } = params;\n\n  if (!taskId)\n    return NextResponse.json({ error: \"Missing taskId\" }, { status: 401 });\n\n  try {\n    const deleteTask = await prisma.task.delete({\n      where: {\n        id: taskId,\n      },\n    });\n\n    return NextResponse.json(deleteTask, { status: 200 });\n  } catch (error: any) {\n    return NextResponse.json({ error: error.message }, { status: 400 });\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/projects/[projectId]/route.ts",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\nexport async function DELETE(\n  request: Request,\n  { params }: { params: { projectId?: string } }\n) {\n  const { projectId } = params;\n\n  if (!projectId)\n    return NextResponse.json({ error: \"Missing projectId\" }, { status: 400 });\n\n  try {\n    const deleteTask = await prisma.project.delete({\n      where: {\n        id: projectId,\n      },\n    });\n    return NextResponse.json(deleteTask);\n  } catch (error: any) {\n    return NextResponse.json({ error: error.message }, { status: 400 });\n  }\n}\n\nexport async function PATCH(\n  request: Request,\n  { params }: { params: { projectId?: string } }\n) {\n  const { projectId } = params;\n  const body = await request.json();\n  const { userId } = body;\n\n  if (!projectId)\n    return NextResponse.json({ error: \"Missing projectId\" }, { status: 400 });\n\n  try {\n    const checkItsAvailable = await prisma.project.findUnique({\n      where: {\n        id: projectId,\n        authorsIds: {\n          has: userId,\n        },\n      },\n    });\n\n    if (checkItsAvailable)\n      return NextResponse.json(\n        { error: \"Your Already In Project Or Current Project Not available!\" },\n        { status: 401 }\n      );\n\n    const updateProject = await prisma.project.update({\n      where: {\n        id: projectId,\n      },\n      data: {\n        authorsIds: {\n          push: userId,\n        },\n      },\n    });\n\n    return NextResponse.json(updateProject, { status: 200 });\n  } catch (error: any) {\n    return NextResponse.json({ error: error.message }, { status: 400 });\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/projects/route.ts",
    "content": "import { onCurrentUser } from \"@/actions\";\nimport prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\nexport async function GET(request: Request) {\n  const user = await onCurrentUser();\n\n  const currentUserId = await prisma.user.findUnique({\n    where: {\n      clerkId: user.id,\n    },\n  });\n\n  if (!currentUserId)\n    return NextResponse.json({ error: \"User not found\" }, { status: 404 });\n\n  try {\n    const project = await prisma.project.findMany({\n      where: {\n        authorsIds: {\n          has: currentUserId.id,\n        },\n      },\n    });\n    return NextResponse.json(project);\n  } catch (error: any) {\n    return NextResponse.json(\n      { error: `Failed to fetch projects ${error.message}` },\n      { status: 500 }\n    );\n  }\n}\n\nexport async function POST(request: Request) {\n  const body = await request.json();\n  const { name, description, startDate, endDate, user } = body;\n\n  try {\n    const createUser = await prisma.user.findFirst({\n      where: {\n        clerkId: user,\n      },\n    });\n\n    if (!createUser?.id)\n      return NextResponse.json({ error: \"User not found\" }, { status: 404 });\n\n    const newProject = await prisma.project.create({\n      data: {\n        name,\n        description,\n        startDate,\n        endDate,\n        userId: createUser?.id,\n        authorsIds: [createUser?.id],\n      },\n    });\n\n    return NextResponse.json({ newProject }, { status: 201 });\n  } catch (error: any) {\n    return NextResponse.json(\n      { error: `Failed to create project ${error.message}` },\n      { status: 500 }\n    );\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/tasks/[projectId]/route.ts",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\ninterface IParams {\n  projectId?: string;\n}\n\nexport async function GET(request: Request, { params }: { params: IParams }) {\n  const { projectId } = params;\n\n  if (!projectId)\n    return NextResponse.json({ error: \"Missing projectId\" }, { status: 400 });\n\n  try {\n    const tasks = await prisma.task.findMany({\n      where: {\n        projectId: projectId,\n      },\n      include: {\n        author: true,\n        comments: true,\n        attachments: true,\n      },\n    });\n\n    return NextResponse.json(tasks);\n  } catch (error: any) {\n    return NextResponse.json(\n      {\n        error: `Failed to fetch tasks ${error.message}`,\n      },\n      { status: 500 }\n    );\n  }\n}\n\nexport async function PATCH(\n  request: Request,\n  { params }: { params: { projectId?: string } }\n) {\n  const { projectId } = params;\n  const body = await request.json();\n  const { userId } = body;\n\n  if (!projectId || !userId)\n    return NextResponse.json(\n      { error: \"Missing projectId or userId\" },\n      { status: 400 }\n    );\n\n  try {\n    const project = await prisma.project.findUnique({\n      where: {\n        id: projectId,\n      },\n      select: {\n        authorsIds: true,\n      },\n    });\n\n    if (!project)\n      return NextResponse.json({ error: \"Project not found\" }, { status: 404 });\n\n    const updateUsers = project.authorsIds.filter((id) => id !== userId);\n\n    const removeUserFromProject = await prisma.project.update({\n      where: {\n        id: projectId,\n      },\n      data: {\n        authorsIds: {\n          set: updateUsers,\n        },\n      },\n    });\n\n    return NextResponse.json(removeUserFromProject);\n  } catch (error: any) {\n    return NextResponse.json({ error: error.message }, { status: 500 });\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/tasks/route.ts",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\nexport async function POST(request: Request) {\n  const body = await request.json();\n\n  const {\n    title,\n    description,\n    status,\n    priority,\n    tags,\n    startDate,\n    dueDate,\n    points,\n    projectId,\n    authorUserId,\n    imageSrc,\n    userId,\n  } = body;\n\n  try {\n    const newTask = await prisma.task.create({\n      data: {\n        title,\n        description,\n        status,\n        priority,\n        tags,\n        startDate,\n        dueDate,\n        points,\n        projectId,\n        authorUserId,\n        imageSrc,\n        userId,\n      },\n      include: {\n        author: true,\n      },\n    });\n\n    return NextResponse.json({ newTask }, { status: 201 });\n  } catch (error: any) {\n    console.log(error.message);\n\n    return NextResponse.json(\n      { error: `Failed to create task ${error.message}` },\n      { status: 500 }\n    );\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/tasks/user/[userId]/route.ts",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\ninterface IParams {\n  userId?: string;\n}\n\nexport async function GET(request: Request, { params }: { params: IParams }) {\n  const { userId } = params;\n\n  try {\n    const tasks = await prisma.task.findMany({\n      where: {\n        OR: [{ authorUserId: userId }, { assignedUserId: userId }],\n      },\n      include: {\n        author: true,\n      },\n    });\n    return NextResponse.json(tasks);\n  } catch (error: any) {\n    return NextResponse.json(\n      { error: `Failed to get user tasks ${error.message}` },\n      { status: 500 }\n    );\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/user/[userId]/route.ts",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\ninterface IParams {\n  userId?: string;\n}\n\nexport async function GET(request: Request, { params }: { params: IParams }) {\n  const { userId } = params;\n\n  try {\n    const findUser = await prisma.user.findFirst({\n      where: {\n        clerkId: userId,\n      },\n    });\n\n    return NextResponse.json(findUser);\n  } catch (error: any) {\n    return NextResponse.json({ error: \"User not found\" }, { status: 404 });\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/api/user/route.ts",
    "content": "import prisma from \"@/lib/prismadb\";\nimport { NextResponse } from \"next/server\";\n\nexport async function POST(request: Request) {\n  try {\n    const body = await request.json();\n\n    const { firstName, secondName, clerkId, profilePictureUrl } = body;\n\n    const checkUser = await prisma.user.findUnique({\n      where: { clerkId },\n    });\n\n    if (checkUser) {\n      return NextResponse.json(\n        { error: \"User already exists\" },\n        { status: 404 }\n      );\n    } else {\n      const newUsers = await prisma.user.create({\n        data: {\n          firstName,\n          secondName,\n          clerkId,\n          profilePictureUrl,\n        },\n      });\n      return NextResponse.json({\n        message: \"User created successfully\",\n        newUsers,\n      });\n    }\n  } catch (error: any) {\n    return NextResponse.json(\n      {\n        error: `Failed to fetch users ${error.message}`,\n      },\n      { status: 500 }\n    );\n  }\n}\n"
  },
  {
    "path": "production-level-application/app/dashboard/layout.tsx",
    "content": "import DashboardWrapper from \"@/components/wrapper/dashboardWrapper\";\nimport React from \"react\";\nimport { ToastContainer } from \"react-toastify\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nfunction layout({ children }: Props) {\n  return (\n    <DashboardWrapper>\n      <ToastContainer />\n      {children}\n    </DashboardWrapper>\n  );\n}\n\nexport default layout;\n"
  },
  {
    "path": "production-level-application/app/dashboard/loading.tsx",
    "content": "import { Spinner } from \"@/components/global/loader/spinner\";\n\ntype Props = {};\n\nfunction Loading({}: Props) {\n  return <Spinner />;\n}\n\nexport default Loading;\n"
  },
  {
    "path": "production-level-application/app/dashboard/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport RootHomePage from \"@/components/home-page/root-home-page\";\n\ntype Props = {};\n\nasync function Page({}: Props) {\n  return (\n    <ClientOnly>\n      <RootHomePage />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/priority/backlog/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport PriorityPage from \"@/components/priority-page\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <PriorityPage priority={Priority.Backlog} />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/priority/high/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport PriorityPage from \"@/components/priority-page\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <PriorityPage priority={Priority.High} />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/priority/low/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport PriorityPage from \"@/components/priority-page\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <PriorityPage priority={Priority.Low} />;\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/priority/medium/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport PriorityPage from \"@/components/priority-page\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <PriorityPage priority={Priority.Medium} />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/priority/urgent/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport PriorityPage from \"@/components/priority-page\";\nimport { Priority } from \"@/types/type\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <PriorityPage priority={Priority.Urgent} />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/projects/[id]/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport ProjectPage from \"@/components/global/project-page\";\n\ntype Props = {\n  params: {\n    id: string;\n  };\n};\n\nfunction Page({ params }: Props) {\n  const { id } = params;\n\n  return (\n    <ClientOnly>\n      <ProjectPage id={id} />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/dashboard/timeline/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport TimeLinePage from \"@/components/timeline\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <TimeLinePage />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/app/globals.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n*,\n*::before,\n*::after {\n  box-sizing: border-box;\n}\n\nhtml,\nbody,\n#root,\n.app {\n  height: 100%;\n  width: 100%;\n  @apply text-sm;\n  @apply bg-gray-500;\n  @apply text-gray-900;\n}\n\n.timeline ._3_ygE {\n  @apply rounded-tl-md border border-r-0 border-[#e6e4e4] dark:border-stroke-dark;\n}\n.timeline ._2eZzQ {\n  @apply border-[#e6e4e4] dark:border-stroke-dark;\n}\n.timeline ._2dZTy {\n  @apply fill-white dark:fill-dark-secondary;\n}\n.timeline ._2dZTy:nth-child(even) {\n  @apply fill-[#f5f5f5] dark:fill-dark-tertiary;\n}\n.timeline ._35nLX {\n  @apply fill-white stroke-[#e6e4e4] dark:fill-dark-secondary dark:stroke-stroke-dark;\n}\n.timeline ._9w8d5 {\n  @apply fill-[#333] dark:fill-white;\n}\n.timeline ._34SS0 {\n  @apply bg-white dark:bg-dark-secondary;\n}\n.timeline ._34SS0:nth-of-type(even) {\n  @apply bg-[#f5f5f5] dark:bg-dark-tertiary;\n}\n.timeline ._RuwuK,\n.timeline ._3rUKi,\n.timeline ._1rLuZ {\n  @apply stroke-[#e6e4e4] dark:stroke-stroke-dark;\n}\n.timeline ._3ZbQT {\n  @apply border-l-0 border-[#e6e4e4] dark:border-stroke-dark;\n}\n.timeline ._3T42e {\n  @apply bg-white dark:bg-dark-bg;\n}\n.timeline ._29NTg {\n  @apply dark:text-neutral-500;\n}\n\n::-webkit-scrollbar {\n  width: 0px;\n  height: 0px;\n}\n"
  },
  {
    "path": "production-level-application/app/layout.tsx",
    "content": "import ReduxProvider from \"@/provider/reduxProvider\";\nimport { ClerkProvider } from \"@clerk/nextjs\";\nimport type { Metadata } from \"next\";\nimport { Plus_Jakarta_Sans } from \"next/font/google\";\nimport \"./globals.css\";\n\nconst jakarta = Plus_Jakarta_Sans({ subsets: [\"latin\"] });\n\nexport const metadata: Metadata = {\n  title: \"Project Management App\",\n  description: \"Generated by create next app\",\n};\n\nexport default function RootLayout({\n  children,\n}: Readonly<{\n  children: React.ReactNode;\n}>) {\n  return (\n    <ClerkProvider>\n      <html lang=\"en\">\n        <body className={jakarta.className}>\n          <ReduxProvider>{children}</ReduxProvider>\n        </body>\n      </html>\n    </ClerkProvider>\n  );\n}\n"
  },
  {
    "path": "production-level-application/app/loading.tsx",
    "content": "import { Spinner } from \"@/components/global/loader/spinner\";\n\ntype Props = {};\n\nfunction Loading({}: Props) {\n  return <Spinner />;\n}\n\nexport default Loading;\n"
  },
  {
    "path": "production-level-application/app/page.tsx",
    "content": "import ClientOnly from \"@/components/global/client-only\";\nimport HomeNavBar from \"@/components/navbar/home\";\n\ntype Props = {};\n\nfunction Page({}: Props) {\n  return (\n    <ClientOnly>\n      <HomeNavBar />\n    </ClientOnly>\n  );\n}\n\nexport default Page;\n"
  },
  {
    "path": "production-level-application/components/data/columns.tsx",
    "content": "import {\n  GridColDef,\n  GridToolbarContainer,\n  GridToolbarExport,\n  GridToolbarFilterButton,\n} from \"@mui/x-data-grid\";\n\nexport const columns: GridColDef[] = [\n  {\n    field: \"title\",\n    headerName: \"Title\",\n    width: 100,\n  },\n  {\n    field: \"description\",\n    headerName: \"Description\",\n    width: 200,\n  },\n  {\n    field: \"status\",\n    headerName: \"Status\",\n    width: 130,\n    renderCell: (params) => (\n      <span className=\"inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800\">\n        {params.value}\n      </span>\n    ),\n  },\n  {\n    field: \"priority\",\n    headerName: \"Priority\",\n    width: 75,\n  },\n  {\n    field: \"tags\",\n    headerName: \"Tags\",\n    width: 130,\n  },\n  {\n    field: \"startDate\",\n    headerName: \"Start Date\",\n    width: 130,\n  },\n  {\n    field: \"dueDate\",\n    headerName: \"Due Date\",\n    width: 130,\n  },\n  {\n    field: \"author\",\n    headerName: \"Author\",\n    width: 150,\n    renderCell: (params) => params.value?.author || \"Unknown\",\n  },\n  {\n    field: \"assignee\",\n    headerName: \"Assignee\",\n    width: 150,\n    renderCell: (params) => params.value?.assignee || \"Unassigned\",\n  },\n];\n\nexport const userSettings = {\n  username: \"johndoe\",\n  email: \"john.doe@example.com\",\n  teamName: \"Development Team\",\n  roleName: \"Developer\",\n};\n\nexport const CustomToolbar = () => (\n  <GridToolbarContainer className=\"toolbar flex gap-2\">\n    <GridToolbarFilterButton />\n    <GridToolbarExport />\n  </GridToolbarContainer>\n);\n\nexport const taskColumns: GridColDef[] = [\n  { field: \"title\", headerName: \"Title\", width: 200 },\n  { field: \"status\", headerName: \"Status\", width: 150 },\n  { field: \"priority\", headerName: \"Priority\", width: 150 },\n  { field: \"dueDate\", headerName: \"Due Date\", width: 150 },\n];\n\nexport const COLORS = [\"#0088FE\", \"#00C49F\", \"#FFBB28\", \"#FF8042\"];\n\nexport const priorityColumns: GridColDef[] = [\n  {\n    field: \"title\",\n    headerName: \"Title\",\n    width: 100,\n  },\n  {\n    field: \"description\",\n    headerName: \"Description\",\n    width: 200,\n  },\n  {\n    field: \"status\",\n    headerName: \"Status\",\n    width: 130,\n    renderCell: (params) => (\n      <span className=\"inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800\">\n        {params.value}\n      </span>\n    ),\n  },\n  {\n    field: \"priority\",\n    headerName: \"Priority\",\n    width: 75,\n  },\n  {\n    field: \"tags\",\n    headerName: \"Tags\",\n    width: 130,\n  },\n  {\n    field: \"startDate\",\n    headerName: \"Start Date\",\n    width: 130,\n  },\n  {\n    field: \"dueDate\",\n    headerName: \"Due Date\",\n    width: 130,\n  },\n  {\n    field: \"author\",\n    headerName: \"Author\",\n    width: 150,\n    renderCell: (params) => params.value?.username || \"Unknown\",\n  },\n  {\n    field: \"assignee\",\n    headerName: \"Assignee\",\n    width: 150,\n    renderCell: (params) => params.value?.username || \"Unassigned\",\n  },\n];\n\nexport const formFields = {\n  signUp: {\n    username: {\n      order: 1,\n      placeholder: \"Choose a username\",\n      label: \"Username\",\n      inputProps: { required: true },\n    },\n    email: {\n      order: 1,\n      placeholder: \"Enter your email address\",\n      label: \"Email\",\n      inputProps: { type: \"email\", required: true },\n    },\n    password: {\n      order: 3,\n      placeholder: \"Enter your password\",\n      label: \"Password\",\n      inputProps: { type: \"password\", required: true },\n    },\n    confirm_password: {\n      order: 4,\n      placeholder: \"Confirm your password\",\n      label: \"Confirm Password\",\n      inputProps: { type: \"password\", required: true },\n    },\n  },\n};\n"
  },
  {
    "path": "production-level-application/components/global/border-view/index.tsx",
    "content": "import { useGetTasksQuery, useUpdateTasksMutation } from \"@/state/api\";\nimport { DndProvider } from \"react-dnd\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\nimport { Spinner } from \"../loader/spinner\";\nimport TaskColumn from \"../task-column\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nconst taskStatus = [\"To Do\", \"Work In Progress\", \"Under Review\", \"Completed\"];\n\nfunction BorderView({ id, setIsModelNewTasOpen }: Props) {\n  const { data: tasks, isLoading, error } = useGetTasksQuery({ projectId: id });\n\n  const [updateTaskStatus] = useUpdateTasksMutation();\n\n  const moveTask = (taskId: number, toStatus: string) => {\n    updateTaskStatus({ taskId, status: toStatus });\n  };\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <DndProvider backend={HTML5Backend}>\n      <div className=\"grid grid-cols-1 gap-4 p-4 md:grid-cols-2 xl:grid-cols-4\">\n        {taskStatus.map((status) => (\n          <TaskColumn\n            key={status}\n            status={status}\n            tasks={tasks || []}\n            moveTask={moveTask}\n            setIsModelNewTasOpen={setIsModelNewTasOpen}\n          />\n        ))}\n      </div>\n    </DndProvider>\n  );\n}\n\nexport default BorderView;\n"
  },
  {
    "path": "production-level-application/components/global/client-only/index.tsx",
    "content": "\"use client\";\n\nimport { motion } from \"framer-motion\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nfunction ClientOnly({ children }: Props) {\n  return (\n    <motion.div\n      initial={{ opacity: 0 }}\n      whileInView={{ opacity: 1 }}\n      viewport={{ once: true }}\n    >\n      {children}\n    </motion.div>\n  );\n}\n\nexport default ClientOnly;\n"
  },
  {
    "path": "production-level-application/components/global/image-card/index.tsx",
    "content": "import { ImageCardProps } from \"@/types/type\";\nimport React from \"react\";\n\ntype Props = {};\n\nfunction ImageCard({ src, aspectRatio, marginTop = \"\" }: ImageCardProps) {\n  return (\n    <img\n      loading=\"lazy\"\n      src={src}\n      alt=\"\"\n      className={`object-contain w-full aspect-[${aspectRatio}] ${marginTop}`}\n    />\n  );\n}\n\nexport default ImageCard;\n"
  },
  {
    "path": "production-level-application/components/global/image-upload/index.tsx",
    "content": "\"use client\";\n\nimport { Camera, PhoneOutgoingIcon } from \"lucide-react\";\nimport { CldUploadWidget } from \"next-cloudinary\";\nimport Image from \"next/image\";\nimport React, { useCallback } from \"react\";\n\ndeclare global {\n  var cloudinary: any;\n}\n\ntype Props = {\n  setImageSrc: (image: { secure_url: string }) => void;\n  value: string;\n};\n\nfunction ImageUpload({ setImageSrc, value }: Props) {\n  /*   const [resource, setResource] = React.useState<any | null>(null);\n  console.log(\"🚀 ~ ImageUpload ~ resource:\", resource.secure_url); */\n  /*   const handleCallback = useCallback(\n    (result: any) => {\n      onChange(result.info.secure_url);\n    },\n    [onchange]\n  ); */\n\n  return (\n    <CldUploadWidget\n      //onUpload={handleCallback}\n      onSuccess={(result: any, { widget }) => {\n        if (result?.info?.secure_url) {\n          setImageSrc({ secure_url: result.info.secure_url });\n        } else {\n          console.error(\"Upload failed, secure_url not found\");\n        }\n      }}\n      uploadPreset=\"pmapppreset\"\n      options={{\n        maxFiles: 1,\n      }}\n    >\n      {({ open }) => {\n        return (\n          <div\n            onClick={() => open?.()}\n            className=\"relative cursor-pointer hover:opacity-70 transition border-dashed border-2 p-20 border-neutral-300 flex flex-col justify-center items-center gap-4 text-neutral-600 h-96\"\n          >\n            <Camera size={50} />\n            <div className=\"font-semibold text-lg\">Click to upload</div>\n            {value && (\n              <div className=\"absolute inset-0 w-full h-full\">\n                <Image\n                  alt=\"uploade\"\n                  fill\n                  style={{ objectFit: \"cover\" }}\n                  src={value}\n                />\n              </div>\n            )}\n          </div>\n        );\n      }}\n    </CldUploadWidget>\n  );\n}\n\nexport default ImageUpload;\n"
  },
  {
    "path": "production-level-application/components/global/list-view/index.tsx",
    "content": "import { useGetTasksQuery } from \"@/state/api\";\nimport { TasksTypes } from \"@/types/type\";\nimport { Spinner } from \"../loader/spinner\";\nimport Header from \"@/components/header\";\nimport TaskCard from \"../task-card\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nfunction ListView({ id, setIsModelNewTasOpen }: Props) {\n  const { data: tasks, error, isLoading } = useGetTasksQuery({ projectId: id });\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"px-4 pb-8 xl:px-6\">\n      <div className=\"pt-5\">\n        <Header\n          name=\"List\"\n          buttonComponent={\n            <button\n              className=\"hove:bg-blue-600 flex items-center rounded-md bg-blue-primary px-3 py-3 text-white\"\n              onClick={() => setIsModelNewTasOpen(true)}\n            >\n              Add Task\n            </button>\n          }\n          isSmallText\n        />\n      </div>\n      <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 lg:gap-6\">\n        {tasks?.map((task: TasksTypes) => (\n          <TaskCard key={task.id} task={task} />\n        ))}\n      </div>\n    </div>\n  );\n}\n\nexport default ListView;\n"
  },
  {
    "path": "production-level-application/components/global/loader/buttonLoader.tsx",
    "content": "type SpinnerProps = {\n  color?: string;\n};\n\nexport const ButtonLoader = ({ color }: SpinnerProps) => {\n  return (\n    <div role=\"status\" className=\"flex items-center justify-center\">\n      <svg\n        aria-hidden=\"true\"\n        className=\"inline h-8 w-8 animate-spin fill-yellow-400 text-gray-200 dark:text-gray-600\"\n        viewBox=\"0 0 100 101\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path\n          d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n          fill={color || \"#fff\"}\n        />\n        <path\n          d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n          fill={color || \"#fff\"}\n        />\n      </svg>\n    </div>\n  );\n};\n"
  },
  {
    "path": "production-level-application/components/global/loader/spinner.tsx",
    "content": "type SpinnerProps = {\n  color?: string;\n};\n\nexport const Spinner = ({ color }: SpinnerProps) => {\n  return (\n    <div\n      role=\"status\"\n      className=\"flex h-screen w-screen items-center justify-center\"\n    >\n      <svg\n        aria-hidden=\"true\"\n        className=\"inline h-8 w-8 animate-spin fill-yellow-400 text-gray-200 dark:text-gray-600\"\n        viewBox=\"0 0 100 101\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path\n          d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n          fill={color || \"#fff\"}\n        />\n        <path\n          d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n          fill={color || \"#fff\"}\n        />\n      </svg>\n    </div>\n  );\n};\n"
  },
  {
    "path": "production-level-application/components/global/project-header/index.tsx",
    "content": "import Header from \"@/components/header\";\nimport ModalNewProject from \"@/components/modal/modal-new-project\";\nimport ModelShareModel from \"@/components/modal/model-share-project\";\nimport {\n  useDeleteProjectMutation,\n  useGetUserQuery,\n  useRemoveUserFromTaskMutation,\n} from \"@/state/api\";\nimport { ProjectTypes } from \"@/types/type\";\nimport {\n  Clock,\n  Filter,\n  Grid3x3,\n  Grid3X3,\n  List,\n  LogOut,\n  PlusSquare,\n  Share2,\n  Table,\n  Trash2,\n  Users,\n} from \"lucide-react\";\nimport { useRouter } from \"next/navigation\";\nimport { useState } from \"react\";\nimport { toast } from \"react-toastify\";\nimport TabButton from \"../tab-button\";\n\ntype Props = {\n  id: string;\n  userId?: string;\n  activeTab: string;\n  projectsUserId?: ProjectTypes;\n  setActiveTab: (tabName: string) => void;\n};\n\nfunction ProjectHeader({\n  activeTab,\n  setActiveTab,\n  id,\n  userId,\n  projectsUserId,\n}: Props) {\n  const router = useRouter();\n  const { data: user, error } = useGetUserQuery({\n    userId: userId ?? \"defaultUserId\",\n  });\n  const [deleteProject] = useDeleteProjectMutation();\n  const [removeUsers, { error: removeUser }] = useRemoveUserFromTaskMutation();\n  const [sharedProjectId, setSharedProjectId] = useState(\"\");\n  const [isModalNameProjectOpen, setIsModalNameProjectOpen] = useState(false);\n  const [isModelShareProjectOpen, setIsModelShareProjectOpen] = useState(false);\n\n  /*   const handleUpdateAuthors = async (authorIds: string, sProjectId: string) => {\n    if (!authorIds) return;\n    if (!sProjectId) return;\n\n    try {\n      await updateProjectAuthors({\n        projectId: sProjectId,\n        userId: authorIds,\n      }).then(() => setIsModalNameProjectOpen(false));\n    } catch (error: any) {\n      console.log(\"🚀 ~ handleUpdateAuthors ~ error:\", error);\n    }\n  }; */\n\n  const handleRemoveAuthor = async (userId: string, projectId: string) => {\n    if (!userId) return;\n    if (!projectId) return;\n\n    try {\n      await removeUsers({\n        projectId: projectId,\n        userId: userId,\n      }).then(() =>\n        toast.warning(\"Leave Project Successfully!\", {\n          position: \"bottom-right\",\n        })\n      );\n      router.refresh();\n      router.push(\"/dashboard\");\n    } catch (error: any) {\n      console.error(\"Error removing user from Project:\", error);\n    }\n  };\n\n  const handleDelete = async (projectId: string) => {\n    if (!projectId) {\n      console.error(\"projectId is undefined or invalid\");\n      return;\n    }\n\n    try {\n      deleteProject({ projectId }).then(() =>\n        toast.warning(\"Project Delete Successfully!\", {\n          position: \"bottom-right\",\n        })\n      );\n      router.refresh();\n      router.push(\"/dashboard\");\n    } catch (error) {\n      console.error(\"Error deleting Project:\", error);\n    }\n  };\n\n  return (\n    <div className=\"px-4 xl:px-6\">\n      <ModalNewProject\n        isOpen={isModalNameProjectOpen}\n        onClose={() => setIsModalNameProjectOpen(false)}\n      />\n      <ModelShareModel\n        id={id}\n        currentUserId={String(user?.id)}\n        sharedProjectId={sharedProjectId}\n        setSharedProjectId={setSharedProjectId}\n        isOpen={isModelShareProjectOpen}\n        onClose={() => setIsModelShareProjectOpen(false)}\n      />\n      <div className=\"pb-6 pt-6 lg:pb-4 lg:pt-8\">\n        <Header\n          name=\"Product Design Development\"\n          buttonComponent={\n            <div className=\"flex justify-center gap-x-3\">\n              {/*  <CreateOrganization /> */}\n\n              <button\n                className=\"flex items-center rounded-md bg-blue-primary px-3 py-2 text-white hover:bg-blue-600\"\n                onClick={() => setIsModalNameProjectOpen(true)}\n              >\n                <PlusSquare className=\"mr-2 h-5 w-5\" /> New Board\n              </button>\n              <button\n                className=\"flex items-center rounded-md bg-green-400 px-3 py-2 hover:text-white hover:bg-green-600\"\n                onClick={() => setIsModelShareProjectOpen(true)}\n              >\n                <Users className=\"mr-2 h-5 w-5\" /> Invite or Join\n              </button>\n              {projectsUserId?.userId === user?.id ? (\n                <button\n                  className=\"flex items-center rounded-md bg-red-300 px-3 py-2 hover:text-white hover:bg-red-600\"\n                  onClick={() => handleDelete(id)}\n                >\n                  <Trash2 className=\"mr-2 h-5 w-5\" /> Delete\n                </button>\n              ) : (\n                <button\n                  className=\"flex items-center rounded-md bg-red-300 px-3 py-2 hover:text-white hover:bg-red-600\"\n                  onClick={() =>\n                    handleRemoveAuthor(\n                      String(user?.id),\n                      String(projectsUserId?.id)\n                    )\n                  }\n                >\n                  <LogOut className=\"mr-2 h-5 w-5\" /> Leave\n                </button>\n              )}\n            </div>\n          }\n        />\n      </div>\n      <div className=\"flex flex-wrap-reverse gap-2 border-y border-gray-200 pb-[8px] pt-2 dark:border-stroke-dark md:items-center\">\n        <div className=\"flex flex-1 items-center gap-2 md:gap-4\">\n          <TabButton\n            name=\"Board\"\n            icon={<Grid3X3 className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n          <TabButton\n            name=\"List\"\n            icon={<List className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n          <TabButton\n            name=\"Timeline\"\n            icon={<Clock className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n          <TabButton\n            name=\"Table\"\n            icon={<Table className=\"h5 w-5\" />}\n            activeTab={activeTab}\n            setActiveTab={setActiveTab}\n          />\n        </div>\n        <div className=\"flex items-center gap-2\">\n          <button className=\"text-gray-500 hover:text-gray-600 dark:text-neutral-500 dark:hover:text-gray-300\">\n            <Filter className=\"h-5 w-5\" />\n          </button>\n          <button className=\"text-gray-500 hover:text-gray-600 dark:text-neutral-500 dark:hover:text-gray-300\">\n            <Share2 className=\"h-5 w-5\" />\n          </button>\n          <div className=\"relative\">\n            <input\n              type=\"text\"\n              placeholder=\"Search Task\"\n              className=\"rounded-md border py-1 pl-10 pr-4 focus:outline-none dark:border-dark-secondary dark:bg-dark-secondary dark:text-white\"\n            />\n            <Grid3x3 className=\"absolute left-3 top-2 h-4 w-4 text-gray-400 dark:text-neutral-500\" />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default ProjectHeader;\n"
  },
  {
    "path": "production-level-application/components/global/project-page/index.tsx",
    "content": "\"use client\";\n\nimport ModelNewTask from \"@/components/modal/model-new-task\";\nimport { useGetProjectsQuery } from \"@/state/api\";\nimport { ProjectTypes } from \"@/types/type\";\nimport { useUser } from \"@clerk/nextjs\";\nimport { useEffect, useState } from \"react\";\nimport BorderView from \"../border-view\";\nimport ClientOnly from \"../client-only\";\nimport ListView from \"../list-view\";\nimport ProjectHeader from \"../project-header\";\nimport TableView from \"../table-view\";\nimport Timeline from \"../timeline-view\";\n\ntype Props = {\n  id: string;\n};\n\nfunction ProjectPage({ id }: Props) {\n  const { user } = useUser();\n  const [activeTAB, setActiveTAB] = useState(\"Board\");\n  const [filterData, setFilterData] = useState<ProjectTypes>();\n  const [isModelNewTasOpen, setIsModelNewTasOpen] = useState(false);\n  const { data: projects, isLoading: isProjectsLoading } =\n    useGetProjectsQuery();\n\n  useEffect(() => {\n    const filterData = projects?.find((p) => String(p.id) === String(id));\n    setFilterData(filterData);\n  }, [id, projects]);\n\n  return (\n    <div>\n      <ModelNewTask\n        id={id}\n        userId={user?.id}\n        isOpen={isModelNewTasOpen}\n        onClose={() => setIsModelNewTasOpen(false)}\n      />\n      <ProjectHeader\n        id={id}\n        userId={user?.id}\n        activeTab={activeTAB}\n        setActiveTab={setActiveTAB}\n        projectsUserId={filterData}\n      />\n      {activeTAB === \"Board\" && (\n        <ClientOnly>\n          <BorderView id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n        </ClientOnly>\n      )}\n      {activeTAB === \"List\" && (\n        <ClientOnly>\n          <ListView id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n        </ClientOnly>\n      )}\n      {activeTAB === \"Timeline\" && (\n        <ClientOnly>\n          <Timeline id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n        </ClientOnly>\n      )}\n      {activeTAB === \"Table\" && (\n        <ClientOnly>\n          <TableView id={id} setIsModelNewTasOpen={setIsModelNewTasOpen} />\n        </ClientOnly>\n      )}\n    </div>\n  );\n}\n\nexport default ProjectPage;\n"
  },
  {
    "path": "production-level-application/components/global/tab-button/index.tsx",
    "content": "import React from \"react\";\n\ntype Props = {\n  name: string;\n  icon: React.ReactNode;\n  setActiveTab: (tabName: string) => void;\n  activeTab: string;\n};\n\nfunction TabButton({ activeTab, icon, name, setActiveTab }: Props) {\n  const isActive = activeTab === name;\n\n  return (\n    <button\n      className={`relative flex items-center gap-2 px-1 py-2 text-gray-500 after:absolute after:-bottom-[9px] after:left-0 after:h-[1px] after:w-full hover:text-blue-600 dark:text-neutral-500 dark:hover:text-white sm:px-2 lg:px-4 ${\n        isActive ? \"text-blue-600 after:bg-blue-600 dark:text-white\" : \"\"\n      }`}\n      onClick={() => setActiveTab(name)}\n    >\n      {icon}\n      {name}\n    </button>\n  );\n}\n\nexport default TabButton;\n"
  },
  {
    "path": "production-level-application/components/global/table-view/index.tsx",
    "content": "import { columns } from \"@/components/data/columns\";\nimport Header from \"@/components/header\";\nimport { useAppSelector } from \"@/components/wrapper/redux\";\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetTasksQuery } from \"@/state/api\";\nimport { DataGrid } from \"@mui/x-data-grid\";\nimport { Spinner } from \"../loader/spinner\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nfunction TableView({ id, setIsModelNewTasOpen }: Props) {\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n  const { data: tasks, error, isLoading } = useGetTasksQuery({ projectId: id });\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"h-[540px] w-full px-4 pb-8 xl:px-6\">\n      <div className=\"pt-5\">\n        <Header\n          name=\"Table\"\n          buttonComponent={\n            <button\n              className=\"flex items-center rounded-md bg-blue-primary px-3 py-2 text-white hover:bg-blue-600\"\n              onClick={() => setIsModelNewTasOpen(true)}\n            >\n              Add Task\n            </button>\n          }\n          isSmallText\n        />\n      </div>\n      <DataGrid\n        rows={tasks || []}\n        columns={columns}\n        className={dataGridClassNames}\n        sx={dataGridSxStyles(isDarkMode)}\n      />\n    </div>\n  );\n}\n\nexport default TableView;\n"
  },
  {
    "path": "production-level-application/components/global/task-card/index.tsx",
    "content": "import { TasksTypes } from \"@/types/type\";\nimport { format } from \"date-fns\";\nimport Image from \"next/image\";\nimport React from \"react\";\n\ntype Props = {\n  task: TasksTypes;\n};\n\nfunction TaskCard({ task }: Props) {\n  return (\n    <div className=\"mb-3 rounded bg-white p-4 shadow dark:bg-dark-secondary dark:text-white\">\n      {task.attachments && task.attachments.length > 0 && (\n        <div>\n          <strong>Attachments:</strong>\n          <div className=\"flex flex-wrap\">\n            {task.attachments && task.attachments.length > 0 && (\n              <Image\n                src={`https://sh-s3-images.s3.us-east-1.amazonaws.com/${task.attachments[0].fileURL}`}\n                alt={task.attachments[0].fileName}\n                width={400}\n                height={200}\n                className=\"rounded-md\"\n              />\n            )}\n          </div>\n        </div>\n      )}\n      <p>\n        <strong>ID:</strong> {task.id}\n      </p>\n      <p>\n        <strong>Title:</strong> {task.title}\n      </p>\n      <p>\n        <strong>Description:</strong>{\" \"}\n        {task.description || \"No description provided\"}\n      </p>\n      <p>\n        <strong>Status:</strong> {task.status}\n      </p>\n      <p>\n        <strong>Priority:</strong> {task.priority}\n      </p>\n      <p>\n        <strong>Tags:</strong> {task.tags || \"No tags\"}\n      </p>\n      <p>\n        <strong>Start Date:</strong>{\" \"}\n        {task.startDate ? format(new Date(task.startDate), \"P\") : \"Not set\"}\n      </p>\n      <p>\n        <strong>Due Date:</strong>{\" \"}\n        {task.dueDate ? format(new Date(task.dueDate), \"P\") : \"Not set\"}\n      </p>\n      <p>\n        <strong>Author:</strong>{\" \"}\n        {task.author ? task.author.firstName : \"Unknown\"}\n      </p>\n      <p>\n        <strong>Assignee:</strong>{\" \"}\n        {task.assignee ? task.assignee.firstName : \"Unassigned\"}\n      </p>\n    </div>\n  );\n}\n\nexport default TaskCard;\n"
  },
  {
    "path": "production-level-application/components/global/task-column/index.tsx",
    "content": "import { EllipsisVertical, Plus } from \"lucide-react\";\nimport React from \"react\";\nimport { useDrop } from \"react-dnd\";\nimport { TasksTypes } from \"@/types/type\";\nimport Task from \"@/components/task\";\n\ntype Props = {\n  status: string;\n  tasks: TasksTypes[];\n  moveTask: (taskId: number, toStatus: string) => void;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\nfunction TaskColumn({ moveTask, setIsModelNewTasOpen, status, tasks }: Props) {\n  const [{ isOver }, drop] = useDrop(() => ({\n    accept: \"task\",\n    drop: (item: { id: number }) => moveTask(item.id, status),\n    collect: (monitor: any) => ({\n      isOver: !!monitor.isOver(),\n    }),\n  }));\n\n  const tasksCount = tasks.filter((task) => task.status === status).length;\n\n  const statusColor: any = {\n    \"To Do\": \"#2563EB\",\n    \"Work In Progress\": \"#059669\",\n    \"Under Review\": \"#D97706\",\n    Completed: \"#000000\",\n  };\n\n  return (\n    <div\n      ref={(instance) => {\n        drop(instance);\n      }}\n      className={`sl:py-4 rounded-lg py-2 xl:px-2 ${\n        isOver ? \"bg-blue-100 dark:bg-neutral-950\" : \"\"\n      }`}\n    >\n      <div className=\"mb-3 flex w-full\">\n        <div\n          className={`w-2 !bg-[${statusColor[status]}] rounded-s-lg`}\n          style={{ backgroundColor: statusColor[status] }}\n        />\n        <div className=\"flex w-full items-center justify-between rounded-e-lg bg-white px-5 py-4 dark:bg-dark-secondary\">\n          <h3 className=\"flex items-center text-lg font-semibold dark:text-white\">\n            {status}{\" \"}\n            <span\n              className=\"ml-2 inline-block rounded-full bg-gray-200 p-1 text-center text-sm leading-none dark:bg-dark-tertiary\"\n              style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n            >\n              {tasksCount}\n            </span>\n          </h3>\n          <div className=\"flex items-center gap-1\">\n            <button className=\"flex h-6 w-5 items-center justify-center dark:text-neutral-500\">\n              <EllipsisVertical size={26} />\n            </button>\n            <button\n              className=\"flex h-6 w-6 items-center justify-center rounded bg-gray-200 dark:bg-dark-tertiary dark:text-white\"\n              onClick={() => setIsModelNewTasOpen(true)}\n            >\n              <Plus size={16} />\n            </button>\n          </div>\n        </div>\n      </div>\n\n      {tasks\n        .filter((task) => task.status === status)\n        .map((task) => (\n          <Task key={task.id} task={task} />\n        ))}\n    </div>\n  );\n}\nexport default TaskColumn;\n"
  },
  {
    "path": "production-level-application/components/global/timeline-view/index.tsx",
    "content": "import { useAppSelector } from \"@/components/wrapper/redux\";\nimport { useGetTasksQuery } from \"@/state/api\";\nimport { DisplayOption, Gantt, ViewMode } from \"gantt-task-react\";\nimport \"gantt-task-react/dist/index.css\";\nimport React, { useMemo, useState } from \"react\";\nimport { Spinner } from \"../loader/spinner\";\n\ntype Props = {\n  id: string;\n  setIsModelNewTasOpen: (isOpen: boolean) => void;\n};\n\ntype TaskTypeItems = \"task\" | \"milestone\" | \"project\";\n\nfunction Timeline({ id, setIsModelNewTasOpen }: Props) {\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  const { data: tasks, error, isLoading } = useGetTasksQuery({ projectId: id });\n\n  const [displayOptions, setDisplayOptions] = useState<DisplayOption>({\n    viewMode: ViewMode.Month,\n    locale: \"en-US\",\n  });\n\n  const ganttTasks = useMemo(() => {\n    return (\n      tasks?.map((task) => ({\n        start: new Date(task.startDate as string),\n        end: new Date(task.dueDate as string),\n        name: task.title,\n        id: `Task-${task.id}`,\n        type: \"task\" as TaskTypeItems,\n        progress: task.points ? (task.points / 100) * 100 : 0,\n        isDisabled: false,\n      })) || []\n    );\n  }, [tasks]);\n\n  const handleViewModeChange = (\n    event: React.ChangeEvent<HTMLSelectElement>\n  ) => {\n    setDisplayOptions((prevOptions) => ({\n      ...prevOptions,\n      viewMode: event.target.value as ViewMode,\n    }));\n  };\n\n  if (isLoading) return <Spinner />;\n  if (error) return <div>An error has occurred</div>;\n\n  return (\n    <div className=\"px-4 xl:px-6\">\n      <div className=\"flex flex-wrap items-center justify-between gap-2 py-5\">\n        <h1 className=\"me-2 text-lg font-bold dark:text-white\">\n          Project Tasks Timeline\n        </h1>\n        <div className=\"relative inline-block w-64\">\n          <select\n            className=\"focus:shadow-outline block w-full appearance-none rounded border border-gray-400 bg-white px-4 py-2 pr-8 leading-tight shadow hover:border-gray-500 focus:outline-none dark:border-dark-secondary dark:bg-dark-secondary dark:text-white\"\n            value={displayOptions.viewMode}\n            onChange={handleViewModeChange}\n          >\n            <option value={ViewMode.Day}>Day</option>\n            <option value={ViewMode.Week}>Week</option>\n            <option value={ViewMode.Month}>Month</option>\n          </select>\n        </div>\n      </div>\n\n      <div className=\"overflow-hidden rounded-md bg-white shadow dark:bg-dark-secondary dark:text-white\">\n        <div className=\"timeline\">\n          <Gantt\n            tasks={ganttTasks}\n            {...displayOptions}\n            columnWidth={displayOptions.viewMode === ViewMode.Month ? 150 : 100}\n            listCellWidth=\"100px\"\n            barBackgroundColor={isDarkMode ? \"#101214\" : \"#aeb8c2\"}\n            barBackgroundSelectedColor={isDarkMode ? \"#000\" : \"#9ba1a6\"}\n          />\n        </div>\n        <div className=\"px-4 pb-5 pt-1\">\n          <button\n            className=\"flex items-center rounded bg-blue-primary px-3 py-2 text-white hover:bg-blue-600\"\n            onClick={() => setIsModelNewTasOpen(true)}\n          >\n            Add New Task\n          </button>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default Timeline;\n"
  },
  {
    "path": "production-level-application/components/header/index.tsx",
    "content": "import React from \"react\";\n\ntype Props = {\n  name: string;\n  buttonComponent?: any;\n  isSmallText?: boolean;\n};\n\nfunction Header({ name, buttonComponent, isSmallText }: Props) {\n  return (\n    <div className=\"mb-5 flex w-full items-center justify-between\">\n      <h1\n        className={`${\n          isSmallText ? \"text-lg\" : \"text-2xl\"\n        } font-semibold dark:text-white`}\n      >\n        {name}\n      </h1>\n      {buttonComponent}\n    </div>\n  );\n}\n\nexport default Header;\n"
  },
  {
    "path": "production-level-application/components/home-page/index.tsx",
    "content": "/* eslint-disable @next/next/no-img-element */\n\"use client\";\n\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetProjectsQuery, useGetTasksQuery } from \"@/state/api\";\nimport { Priority, ProjectTypes, TasksTypes } from \"@/types/type\";\nimport { DataGrid } from \"@mui/x-data-grid\";\nimport { useState } from \"react\";\nimport {\n  Bar,\n  BarChart,\n  CartesianGrid,\n  Cell,\n  Legend,\n  Pie,\n  PieChart,\n  ResponsiveContainer,\n  Tooltip,\n  XAxis,\n  YAxis,\n} from \"recharts\";\nimport { COLORS, taskColumns } from \"../data/columns\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport Header from \"../header\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {\n  projectId?: number;\n  project: ProjectTypes[];\n};\n\nfunction HomePage({ projectId, project }: Props) {\n  const [selectProjectId, setSelectProjectId] = useState(projectId);\n  const {\n    data: tasks,\n    isLoading: tasksLoading,\n    isError: tasksError,\n  } = useGetTasksQuery({\n    projectId: String(selectProjectId),\n  });\n\n  const { data: projects, isLoading: isProjectsLoading } =\n    useGetProjectsQuery();\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  if (tasksLoading || isProjectsLoading) return <Spinner />;\n  if (tasksError || !tasks || !projects)\n    return <div>An error has occurred</div>;\n\n  const priorityCount = tasks.reduce(\n    (acc: Record<string, number>, task: TasksTypes) => {\n      const { priority } = task;\n      acc[priority as Priority] = (acc[priority as Priority] || 0) + 1;\n      return acc;\n    },\n    {}\n  );\n\n  const taskDistribution = Object.keys(priorityCount).map((key) => ({\n    name: key,\n    count: priorityCount[key],\n  }));\n\n  const statusCount = tasks.reduce(\n    (acc: Record<string, number>, task: TasksTypes) => {\n      const { status } = task;\n      acc[status as any] = (acc[status as any] || 0) + 1;\n      return acc;\n    },\n    {}\n  );\n\n  const projectStatus = Object.keys(statusCount).map((key) => ({\n    name: key,\n    count: statusCount[key],\n  }));\n\n  const chartColors = isDarkMode\n    ? {\n        bar: \"#8884d8\",\n        barGrid: \"#303030\",\n        pieFill: \"#4A90E2\",\n        text: \"#FFFFFF\",\n      }\n    : {\n        bar: \"#8884d8\",\n        barGrid: \"#E0E0E0\",\n        pieFill: \"#82ca9d\",\n        text: \"#000000\",\n      };\n\n  const selectStyles =\n    \"mb-4 block w-full rounded border border-gray-300 px-3 py-2 dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  return (\n    <>\n      {tasks.length > 0 ? (\n        <div className=\"h-screen w-screen bg-gray-100 bg-transparent p-8\">\n          <Header name=\"Project Management Dashboard\" />\n          <div>\n            <select\n              className={selectStyles}\n              value={selectProjectId}\n              onChange={(e) => setSelectProjectId(e.target.value as any)}\n            >\n              {project.map((project) => (\n                <option key={project.id} value={project.id}>\n                  {project.name.toUpperCase()}\n                </option>\n              ))}\n            </select>\n          </div>\n          <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n            <div className=\"rounded-lg bg-white p-4 shadow dark:bg-dark-secondary\">\n              <h3 className=\"mb-4 text-lg font-semibold dark:text-white\">\n                Task Priority Distribution\n              </h3>\n              <ResponsiveContainer width=\"100%\" height={300}>\n                <BarChart data={taskDistribution}>\n                  <CartesianGrid\n                    strokeDasharray=\"3 3\"\n                    stroke={chartColors.barGrid}\n                  />\n                  <XAxis dataKey=\"name\" stroke={chartColors.text} />\n                  <YAxis stroke={chartColors.text} />\n                  <Tooltip\n                    contentStyle={{\n                      width: \"min-content\",\n                      height: \"min-content\",\n                    }}\n                  />\n                  <Legend />\n                  <Bar dataKey=\"count\" fill={chartColors.bar} />\n                </BarChart>\n              </ResponsiveContainer>\n            </div>\n            <div className=\"rounded-lg bg-white p-4 shadow dark:bg-dark-secondary\">\n              <h3 className=\"mb-4 text-lg font-semibold dark:text-white\">\n                Project Status\n              </h3>\n              <ResponsiveContainer width=\"100%\" height={300}>\n                <PieChart>\n                  <Pie\n                    dataKey=\"count\"\n                    data={projectStatus}\n                    fill=\"#82ca9d\"\n                    label\n                  >\n                    {projectStatus.map((entry, index) => (\n                      <Cell\n                        key={`cell-${index}`}\n                        fill={COLORS[index % COLORS.length]}\n                      />\n                    ))}\n                  </Pie>\n                  <Tooltip />\n                  <Legend />\n                </PieChart>\n              </ResponsiveContainer>\n            </div>\n            <div className=\"rounded-lg bg-white p-4 shadow dark:bg-dark-secondary md:col-span-2\">\n              <h3 className=\"mb-4 text-lg font-semibold dark:text-white\">\n                Your Tasks\n              </h3>\n              <div style={{ height: 400, width: \"100%\" }}>\n                <DataGrid\n                  rows={tasks}\n                  columns={taskColumns}\n                  checkboxSelection\n                  loading={tasksLoading}\n                  getRowClassName={() => \"data-grid-row\"}\n                  getCellClassName={() => \"data-grid-cell\"}\n                  className={dataGridClassNames}\n                  sx={dataGridSxStyles(isDarkMode)}\n                />\n              </div>\n            </div>\n          </div>\n        </div>\n      ) : (\n        <div className=\"w-screen h-screen flex flex-col justify-center items-center\">\n          {project.length > 0 && (\n            <div className=\"w-96\">\n              <select\n                className={selectStyles}\n                value={selectProjectId}\n                onChange={(e) => setSelectProjectId(e.target.value as any)}\n              >\n                {project.map((project) => (\n                  <option key={project.id} value={project.id}>\n                    {project.name.toUpperCase()}\n                  </option>\n                ))}\n              </select>\n            </div>\n          )}\n          <img\n            src=\"https://projectvectors.com.au/_next/image?url=%2Fimages%2Fmanagement.png&w=1080&q=75\"\n            alt=\"img\"\n            className=\"w-[500px]\"\n          />\n          <p className=\"text-black dark:text-white text-lg font-semibold mt-4\">\n            {`Currently You Don't have Task`}\n          </p>\n        </div>\n      )}\n    </>\n  );\n}\nexport default HomePage;\n"
  },
  {
    "path": "production-level-application/components/home-page/root-home-page/index.tsx",
    "content": "/* eslint-disable @next/next/no-img-element */\n\"use client\";\n\nimport ModalNewProject from \"@/components/modal/modal-new-project\";\nimport { useCreateUserMutation, useGetProjectsQuery } from \"@/state/api\";\nimport { useUser } from \"@clerk/nextjs\";\nimport { PlusSquare } from \"lucide-react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport HomePage from \"..\";\n\ntype Props = {};\n\nfunction RootHomePage({}: Props) {\n  const { isSignedIn, user } = useUser();\n  const [createUser] = useCreateUserMutation();\n  const { data: projects, isLoading: isProjectsLoading } =\n    useGetProjectsQuery();\n  const [isModalNameProjectOpen, setIsModalNameProjectOpen] = useState(false);\n\n  const createCurrentUser = useMemo(\n    () => async () => {\n      if (user?.id) {\n        await createUser({\n          firstName: user.firstName! || user.username!,\n          secondName: user.lastName! || \"\",\n          profilePictureUrl: user.firstName\n            ? user.imageUrl\n            : `https://api.dicebear.com/9.x/initials/png?seed=${user.username}`,\n          clerkId: user.id,\n        });\n      }\n    },\n    [\n      createUser,\n      user?.firstName,\n      user?.id,\n      user?.imageUrl,\n      user?.lastName,\n      user?.username,\n    ]\n  );\n\n  useEffect(() => {\n    createCurrentUser();\n  }, [createCurrentUser, user?.id]);\n\n  return (\n    <div>\n      {projects && projects.length > 0 ? (\n        <HomePage projectId={projects[0].id} project={projects} />\n      ) : (\n        <div className=\"w-screen h-screen flex flex-col justify-center items-center\">\n          <img\n            src=\"https://projectvectors.com.au/_next/image?url=%2Fimages%2Fmanagement.png&w=1080&q=75\"\n            alt=\"img\"\n            className=\"w-[500px]\"\n          />\n          <p className=\"text-black dark:text-white text-lg font-semibold mt-4\">\n            {`Currently You Don't have Project`}\n          </p>\n          <div className=\"flex justify-center mt-4 gap-x-2\">\n            <ModalNewProject\n              isOpen={isModalNameProjectOpen}\n              onClose={() => setIsModalNameProjectOpen(false)}\n            />\n            <button\n              className=\"flex items-center rounded-md bg-blue-primary px-3 py-2 text-white hover:bg-blue-600 w-full\"\n              onClick={() => setIsModalNameProjectOpen(true)}\n            >\n              <PlusSquare className=\"mr-1 h-5 w-5\" /> New Board\n            </button>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport default RootHomePage;\n"
  },
  {
    "path": "production-level-application/components/modal/index.tsx",
    "content": "import { X } from \"lucide-react\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport ClientOnly from \"../global/client-only\";\nimport Header from \"../header\";\n\ntype Props = {\n  children: React.ReactNode;\n  isOpen: boolean;\n  onClose: () => void;\n  name: string;\n};\n\nfunction Modal({ children, isOpen, onClose, name }: Props) {\n  if (!isOpen) return null;\n\n  return ReactDOM.createPortal(\n    <div className=\"fixed inset-0 z-50 flex h-full w-full items-center justify-center overflow-y-auto bg-gray-600 bg-opacity-50 p-4\">\n      <ClientOnly>\n        <div className=\"w-screen max-w-2xl rounded-lg bg-white p-4 shadow-lg dark:bg-dark-secondary\">\n          <Header\n            name={name}\n            buttonComponent={\n              <button\n                className=\"flex h-7 w-7 items-center justify-center rounded-full bg-blue-primary text-white hover:bg-blue-600\"\n                onClick={onClose}\n              >\n                <X size={18} />\n              </button>\n            }\n            isSmallText\n          />\n          {children}\n        </div>\n      </ClientOnly>\n    </div>,\n\n    document.body\n  );\n}\n\nexport default Modal;\n"
  },
  {
    "path": "production-level-application/components/modal/modal-new-project/index.tsx",
    "content": "import { ButtonLoader } from \"@/components/global/loader/buttonLoader\";\nimport { useCreateProjectMutation } from \"@/state/api\";\nimport { useUser } from \"@clerk/nextjs\";\nimport { formatISO } from \"date-fns\";\nimport { useState } from \"react\";\nimport { toast } from \"react-toastify\";\nimport Modal from \"..\";\n\ntype Props = {\n  isOpen: boolean;\n  onClose: () => void;\n};\n\nfunction ModalNewProject({ isOpen, onClose }: Props) {\n  const { isSignedIn, user, isLoaded } = useUser();\n  const [createProject, { isLoading }] = useCreateProjectMutation();\n  const [projectName, setProjectName] = useState(\"\");\n  const [description, setDescription] = useState(\"\");\n  const [startDate, setStartDate] = useState(\"\");\n  const [endDate, setEndDate] = useState(\"\");\n\n  const handleSubmit = async () => {\n    if (!projectName || !startDate || !endDate) return;\n\n    const formateStartDate = formatISO(new Date(startDate), {\n      representation: \"complete\",\n    });\n    const formateEndDate = formatISO(new Date(endDate), {\n      representation: \"complete\",\n    });\n\n    await createProject({\n      user: user?.id,\n      name: projectName,\n      description,\n      startDate: formateStartDate,\n      endDate: formateEndDate,\n    })\n      .then(() =>\n        toast.success(\"Project Created Successfully!\", {\n          position: \"bottom-right\",\n        })\n      )\n      .catch(() =>\n        toast.error(\"Project Created Error\", { position: \"bottom-right\" })\n      );\n\n    onClose();\n  };\n\n  const isFormValid = () => {\n    return projectName && description && startDate && endDate;\n  };\n\n  const inputStyle =\n    \"w-full rounded-md border border-gray-300 p-2 shadow-sm dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  return (\n    <Modal isOpen={isOpen} onClose={onClose} name=\"Create New Project\">\n      <form\n        className=\"mt-4 space-y-6\"\n        onSubmit={(e) => {\n          e.preventDefault();\n          handleSubmit();\n        }}\n      >\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Project Name\"\n          value={projectName}\n          onChange={(e) => setProjectName(e.target.value)}\n        />\n        <textarea\n          className={inputStyle}\n          placeholder=\"Description\"\n          value={description}\n          onChange={(e) => setDescription(e.target.value)}\n        />\n        <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-2\">\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={startDate}\n            onChange={(e) => setStartDate(e.target.value)}\n          />\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={endDate}\n            onChange={(e) => setEndDate(e.target.value)}\n          />\n        </div>\n        <button\n          type=\"submit\"\n          className={`focus-offset-2 mt-4 flex w-full justify-center rounded-md border border-transparent bg-blue-primary px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-600 ${\n            !isFormValid() || isLoading ? \"cursor-not-allowed opacity-50\" : \"\"\n          }`}\n          disabled={!isFormValid() || isLoading}\n        >\n          {isLoading ? <ButtonLoader /> : \"Create Project\"}\n        </button>\n      </form>\n    </Modal>\n  );\n}\n\nexport default ModalNewProject;\n"
  },
  {
    "path": "production-level-application/components/modal/model-new-task/index.tsx",
    "content": "import ImageUpload from \"@/components/global/image-upload\";\nimport { ButtonLoader } from \"@/components/global/loader/buttonLoader\";\nimport {\n  useCreateTasksMutation,\n  useGetUserQuery,\n  useLazyGetTasksQuery,\n} from \"@/state/api\";\nimport { Priority, Status } from \"@/types/type\";\nimport { formatISO } from \"date-fns\";\nimport { useState } from \"react\";\nimport { toast } from \"react-toastify\";\nimport Modal from \"..\";\n\ntype Props = {\n  id?: string | null;\n  userId?: string;\n  isOpen: boolean;\n  onClose: () => void;\n};\n\nfunction ModelNewTask({ id, userId, isOpen, onClose }: Props) {\n  const { data: user, error } = useGetUserQuery({\n    userId: userId ?? \"defaultUserId\",\n  });\n  const [createTask, { isLoading }] = useCreateTasksMutation();\n  const [refetchTasks] = useLazyGetTasksQuery();\n  const [title, setTitle] = useState(\"\");\n  const [description, setDescription] = useState(\"\");\n  const [status, setStatus] = useState<Status>(Status.ToDo);\n  const [priority, setPriority] = useState<Priority>(Priority.Backlog);\n  const [tags, setTags] = useState(\"\");\n  const [startDate, setStartDate] = useState(\"\");\n  const [dueDate, setDueDate] = useState(\"\");\n  const [projectId, setProjectId] = useState(\"\");\n  const [imageSrc, setImageSrc] = useState({\n    secure_url: \"\",\n  });\n\n  const handleSubmit = async () => {\n    if (!title || !(id !== null || projectId)) return;\n\n    const formateStartDate = formatISO(new Date(startDate), {\n      representation: \"complete\",\n    });\n    const formateEndDate = formatISO(new Date(dueDate), {\n      representation: \"complete\",\n    });\n\n    await createTask({\n      title,\n      description,\n      status,\n      priority,\n      tags,\n      startDate: formateStartDate,\n      dueDate: formateEndDate,\n      authorUserId: /* user?.id */ userId,\n      projectId: id !== null ? id : projectId,\n      imageSrc: imageSrc.secure_url,\n      userId: user?.id,\n    })\n      .then(() =>\n        toast.success(\"Task Created Successfully!\", {\n          position: \"bottom-right\",\n        })\n      )\n      .catch(() =>\n        toast.error(\"Task Created Error\", { position: \"bottom-right\" })\n      );\n    refetchTasks({ projectId: String(id) });\n\n    setTitle(\"\");\n    setDescription(\"\");\n    setStatus(Status.ToDo);\n    setPriority(Priority.Backlog);\n    setTags(\"\");\n    setStartDate(\"\");\n    setDueDate(\"\");\n    setProjectId(\"\");\n    setImageSrc({\n      secure_url: \"\",\n    });\n\n    onClose();\n  };\n\n  const isFormValid = () => {\n    return title && (id !== null || projectId) && startDate && dueDate;\n  };\n\n  const selectStyles =\n    \"mb-4 block w-full rounded border border-gray-300 px-3 py-2 dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  const inputStyle =\n    \"w-full rounded-md border border-gray-300 p-2 shadow-sm dark:border-dark-tertiary dark:bg-dark-tertiary dark:text-white dark:focus:outline-none\";\n\n  return (\n    <Modal isOpen={isOpen} onClose={onClose} name=\"Create New Task\">\n      <form\n        className=\"mt-4 space-y-6\"\n        onSubmit={(e) => {\n          e.preventDefault();\n          handleSubmit();\n        }}\n      >\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Title\"\n          value={title}\n          onChange={(e) => setTitle(e.target.value)}\n        />\n        <textarea\n          className={inputStyle}\n          placeholder=\"Description\"\n          value={description}\n          onChange={(e) => setDescription(e.target.value)}\n        />\n        <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-2\">\n          <select\n            className={selectStyles}\n            value={status}\n            onChange={(e) => setStatus(e.target.value as any)}\n          >\n            <option value=\"\">Select Status</option>\n            <option value={Status.ToDo}>To Do</option>\n            <option value={Status.WorkInProgress}>Work In Progress</option>\n            <option value={Status.UnderReview}>Under Review</option>\n            <option value={Status.Completed}>Completed</option>\n          </select>\n          <select\n            className={selectStyles}\n            value={priority}\n            onChange={(e) =>\n              setPriority(Priority[e.target.value as keyof typeof Priority])\n            }\n          >\n            <option value=\"\">Select Priority</option>\n            <option value={Priority.Urgent}>Urgent</option>\n            <option value={Priority.High}>High</option>\n            <option value={Priority.Medium}>Medium</option>\n            <option value={Priority.Low}>Low</option>\n            <option value={Priority.Backlog}>Backlog</option>\n          </select>\n        </div>\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Tags (comma separated)\"\n          value={tags}\n          onChange={(e) => setTags(e.target.value)}\n        />\n        <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-2\">\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={startDate}\n            onChange={(e) => setStartDate(e.target.value)}\n          />\n          <input\n            type=\"date\"\n            className={inputStyle}\n            value={dueDate}\n            onChange={(e) => setDueDate(e.target.value)}\n          />\n        </div>\n        <div className=\"flex flex-col gap-y-4\">\n          <p className=\"font-semibold text-center text-[15px] text-black dark:text-gray-400\">\n            Add Attachment\n          </p>\n          <ImageUpload setImageSrc={setImageSrc} value={imageSrc.secure_url} />\n        </div>\n\n        {/*         <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Author User ID\"\n          value={authorUserId}\n          onChange={(e) => setAuthorUserId(e.target.value)}\n        />\n        <input\n          type=\"text\"\n          className={inputStyle}\n          placeholder=\"Assigned User ID\"\n          value={assignedUserId}\n          onChange={(e) => setAssignedUserId(e.target.value)}\n        /> */}\n        {id === undefined && (\n          <input\n            type=\"text\"\n            className={inputStyle}\n            placeholder=\"Project Id\"\n            value={projectId}\n            onChange={(e) => setProjectId(e.target.value)}\n          />\n        )}\n        <button\n          type=\"submit\"\n          className={`focus-offset-2 mt-4 flex w-full justify-center rounded-md border border-transparent bg-blue-primary px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-600 ${\n            !isFormValid() || isLoading ? \"cursor-not-allowed opacity-50\" : \"\"\n          }`}\n          disabled={!isFormValid() || isLoading}\n        >\n          {isLoading ? <ButtonLoader /> : \"Create Task\"}\n        </button>\n      </form>\n    </Modal>\n  );\n}\n\nexport default ModelNewTask;\n"
  },
  {
    "path": "production-level-application/components/modal/model-share-project/index.tsx",
    "content": "import { useState } from \"react\";\nimport Modal from \"..\";\nimport { useUpdateProjectAuthorsMutation } from \"@/state/api\";\nimport { toast } from \"react-toastify\";\n\ntype Props = {\n  id: string;\n  currentUserId: string;\n  isOpen: boolean;\n  onClose: () => void;\n  sharedProjectId: string;\n  setSharedProjectId: (sharedProjectId: string) => void;\n};\n\nfunction ModelShareModel({\n  isOpen,\n  onClose,\n  id,\n  currentUserId,\n  setSharedProjectId,\n  sharedProjectId,\n}: Props) {\n  const [updateProjectAuthors, { error: updateError }] =\n    useUpdateProjectAuthorsMutation();\n  const [copied, setCopied] = useState(false);\n\n  const handleCopy = async () => {\n    try {\n      await navigator.clipboard.writeText(id);\n      setCopied(true);\n      setTimeout(() => setCopied(false), 2000); // Reset after 2 seconds\n    } catch (err) {\n      console.error(\"Failed to copy:\", err);\n    }\n  };\n\n  const handleUpdateAuthors = async (authorIds: string, sProjectId: string) => {\n    if (!authorIds) return;\n    if (!sProjectId) return;\n\n    try {\n      await updateProjectAuthors({\n        projectId: sProjectId,\n        userId: authorIds,\n      })\n        .then(() => {\n          if (\n            updateError &&\n            \"status\" in updateError &&\n            updateError.status === 401\n          ) {\n            toast.error(\n              \"Your Already In Project Or Current Project Not available!\",\n              {\n                position: \"bottom-right\",\n              }\n            );\n          } else if (\n            updateError &&\n            \"status\" in updateError &&\n            updateError.status === 400\n          ) {\n            toast.error(\"Missing projectId\", {\n              position: \"bottom-right\",\n            });\n          } else {\n            toast.success(\"Project Join Successfully!\", {\n              position: \"bottom-right\",\n            });\n\n            setSharedProjectId(\"\");\n            onClose();\n          }\n        })\n        .catch(() =>\n          toast.error(\"Project Join Error\", { position: \"bottom-right\" })\n        );\n    } catch (error: any) {\n      console.log(\"🚀 ~ handleUpdateAuthors ~ error:\", error);\n    }\n  };\n\n  return (\n    <Modal isOpen={isOpen} onClose={onClose} name=\"Collaborate With Others\">\n      <div className=\"flex flex-col gap-y-3\">\n        <div className=\"flex flex-col justify-start items-start\">\n          <p className=\"text-black dark:text-white p-2\">Copy Id and Share</p>\n          <div className=\"flex items-center space-x-4 p-4 border dark:border-dark-tertiary rounded-lg bg-gray-100 dark:bg-dark-secondary shadow-md w-full\">\n            <input\n              type=\"text\"\n              value={id}\n              readOnly\n              className=\"w-full p-2 text-gray-700 dark:text-white border dark:border-gray-500 rounded-md bg-gray-200 dark:bg-dark-tertiary cursor-pointer\"\n            />\n            <button\n              onClick={handleCopy}\n              className=\"px-4 py-2 text-white bg-blue-600 rounded-md hover:bg-blue-700 transition-all\"\n            >\n              {copied ? \"Copied!\" : \"Copy\"}\n            </button>\n          </div>\n        </div>\n        <div className=\"flex flex-col justify-start items-start\">\n          <p className=\"text-black dark:text-white p-2\">{`For Join Other Member's Enter Shared Id`}</p>\n          <div className=\"flex items-center space-x-4 p-4 border dark:border-dark-tertiary rounded-lg bg-gray-100 dark:bg-dark-secondary shadow-md w-full\">\n            <input\n              type=\"text\"\n              value={sharedProjectId}\n              onChange={(e) => setSharedProjectId(e.target.value)}\n              placeholder=\"Enter Shared Id\"\n              className=\"w-full p-2 text-gray-700 dark:text-white border dark:border-gray-500 rounded-md bg-gray-200 dark:bg-dark-tertiary\"\n            />\n            <button\n              className=\"px-4 py-2 text-white bg-blue-600 rounded-md hover:bg-blue-700 transition-all\"\n              onClick={() =>\n                handleUpdateAuthors(currentUserId, sharedProjectId)\n              }\n            >\n              Enter\n            </button>\n          </div>\n        </div>\n      </div>\n    </Modal>\n  );\n}\n\nexport default ModelShareModel;\n"
  },
  {
    "path": "production-level-application/components/navbar/home/index.tsx",
    "content": "\"use client\";\n\nimport ImageCard from \"@/components/global/image-card\";\nimport { useAppDispatch, useAppSelector } from \"@/components/wrapper/redux\";\nimport { setIsDarkMode } from \"@/state\";\nimport { Moon, Sun } from \"lucide-react\";\nimport Link from \"next/link\";\nimport React from \"react\";\n\ntype Props = {};\n\nconst imageData = [\n  {\n    src: \"https://www.itarian.com/assets-new/images/project-management.png\",\n    aspectRatio: \"0.94\",\n  },\n  {\n    src: \"https://png.pngtree.com/png-vector/20220527/ourmid/pngtree-woman-doing-project-management-png-image_4752006.png\",\n    aspectRatio: \"0.94\",\n    marginTop: \"mt-4\",\n  },\n  /*   {\n    src: \"https://marketplace.canva.com/EAE2pXyqyx0/1/0/1600w/canva-simple-instagram-frame-template-instagram-post-ObQSn5BL2ZQ.jpg\",\n    aspectRatio: \"1.7\",\n    marginTop: \"mt-4\",\n  }, */\n];\n\nconst imageData2 = [\n  {\n    src: \"https://cdni.iconscout.com/illustration/premium/thumb/online-test-illustration-download-in-svg-png-gif-file-formats--exam-education-e-learning-digital-world-pack-seo-web-illustrations-6770271.png?f=webp\",\n    aspectRatio: \"1.7\",\n  },\n  {\n    src: \"https://static.vecteezy.com/system/resources/previews/022/608/528/non_2x/business-infographic-analysis-marketing-data-analysis-marketing-business-solutions-free-png.png\",\n    aspectRatio: \"0.94\",\n    marginTop: \"mt-4\",\n  },\n  {\n    src: \"https://cdni.iconscout.com/illustration/premium/thumb/project-planning-illustration-download-in-svg-png-gif-file-formats--management-plan-business-discussion-teamwork-pack-illustrations-6666400.png?f=webp\",\n    aspectRatio: \"0.94\",\n    marginTop: \"mt-4\",\n  },\n];\n\nfunction HomeNavBar({}: Props) {\n  const dispatch = useAppDispatch();\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  return (\n    <section\n      className={`relative h-screen ${isDarkMode ? \"bg-black\" : \"bg-white\"}`}\n    >\n      {isDarkMode && (\n        <div className=\"absolute inset-0 bg-[linear-gradient(to_right,#0f172a_1px,transparent_1px),linear-gradient(to_bottom,#0f172a_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_110%)]\" />\n      )}\n      <div className=\"relative\">\n        <div className=\"flex items-center justify-between\">\n          <div className=\"flex flex-col w-full max-md:ml-0 max-md:w-full\">\n            <div className=\"flex overflow-hidden flex-col w-full max-md:mt-10 max-md:max-w-full\">\n              <div className=\"flex items-center justify-between\">\n                <div className=\"flex items-center gap-2 mt-4\">\n                  {/*  <div className=\"h-8 w-8 rounded-lg bg-white text-black flex items-center justify-center font-bold\">\n                    li\n                  </div> */}\n                  <span\n                    className={`pl-4 text-xl font-semibold ${\n                      isDarkMode ? \"text-blue-200\" : \"text-blue-800\"\n                    }`}\n                  >\n                    Project Management\n                  </span>\n                </div>\n                <nav\n                  className={`hidden space-x-6 text-sm md:block  ${\n                    isDarkMode ? \"text-blue-200\" : \"text-blue-800\"\n                  }`}\n                >\n                  <Link href=\"#features\">Features</Link>\n                  <Link href=\"#pricing\">Pricing</Link>\n                  <Link href=\"#about\">About</Link>\n                </nav>\n                <div className=\"flex justify-center items-center gap-x-2\">\n                  <button\n                    onClick={() => dispatch(setIsDarkMode(!isDarkMode))}\n                    className={\n                      isDarkMode\n                        ? `rounded p-2 hover:bg-gray-700`\n                        : `rounded p-2 hover:bg-gray-100`\n                    }\n                  >\n                    {isDarkMode ? (\n                      <Sun className=\"h-6 w-6 cursor-pointer text-white\" />\n                    ) : (\n                      <Moon className=\"h-6 w-6 cursor-pointer text-black\" />\n                    )}\n                  </button>\n\n                  <Link href=\"/dashboard\">\n                    <button className=\"bg-white text-black font-semibold rounded-md px-6 py-4\">\n                      Login\n                    </button>\n                  </Link>\n                </div>\n              </div>\n              {/* Rest of the component implementation follows with the extracted components */}\n              {/* Features section */}\n\n              <div className=\"flex overflow-hidden flex-col px-16 mt-28 w-full min-h-[900px] max-md:px-5 max-md:max-w-full\">\n                <div className=\"flex flex-wrap flex-1 size-full max-md:max-w-full\">\n                  <div className=\"flex flex-col flex-1 shrink justify-center pr-20 basis-0 min-w-[240px] max-md:max-w-full\">\n                    <div className=\"flex flex-col w-full text-white max-md:max-w-full\">\n                      <h1\n                        className={`text-4xl font-bold leading-tight tracking-tighter  sm:text-5xl md:text-6xl lg:text-7xl ${\n                          isDarkMode ? \"text-gray-200\" : \"text-gray-700\"\n                        }`}\n                      >\n                        Smart Project Management System for Agile Teams\n                      </h1>\n                      <p\n                        className={`mt-6 text-lg ${\n                          isDarkMode ? \"text-blue-200\" : \"text-blue-700\"\n                        }`}\n                      >\n                        {`The Smart Project Management System is a comprehensive\n                        web-based platform designed to help Agile teams\n                        efficiently plan, execute, and monitor projects. The\n                        system offers a collaborative workspace where team\n                        members can create tasks, assign responsibilities, set\n                        deadlines, and track progress using visual tools like\n                        Kanban boards and Gantt charts.`}\n                      </p>\n                    </div>\n                    <div className=\"flex gap-4 items-start self-start mt-8 text-base\">\n                      <Link href=\"/dashboard\">\n                        <button className=\"bg-blue-600 text-white hover:bg-blue-700 rounded-md px-6 py-4\">\n                          Get Started\n                        </button>\n                      </Link>\n                      <Link href=\"/dashboard\">\n                        <button\n                          className={`border-blue-400  hover:bg-blue-900/50 rounded-md px-6 py-4 ${\n                            isDarkMode ? \"text-white \" : \"text-gray-700\"\n                          }`}\n                        >\n                          Learn More\n                        </button>\n                      </Link>\n                    </div>\n                  </div>\n                  <div className=\"flex relative flex-1 shrink gap-4 items-start my-auto basis-20 left-44\">\n                    <img\n                      src=\"https://projectvectors.com.au/_next/image?url=%2Fimages%2Fmanagement.png&w=1080&q=75\"\n                      alt=\"img\"\n                      className=\"w-[800px]\"\n                    />\n                    {/*                   <div className=\"flex absolute right-0 bottom-0 z-0 flex-col h-[800px] left-[550px] min-w-[240px] w-[360px]\">\n                      {imageData.map((image, index) => (\n                        <ImageCard\n                          key={`right-${index}`}\n                          src={image.src}\n                          aspectRatio={image.aspectRatio}\n                          marginTop={image.marginTop}\n                        />\n                      ))}\n                    </div>\n                    <div className=\"flex absolute bottom-0 left-[100px] z-0 flex-col h-[1000px] right-[337px] w-[370px]\">\n                      {imageData2.map((image, index) => (\n                        <ImageCard\n                          key={`left-${index}`}\n                          src={image.src}\n                          aspectRatio={image.aspectRatio}\n                          marginTop={image.marginTop}\n                        />\n                      ))}\n                    </div> */}\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n\nexport default HomeNavBar;\n"
  },
  {
    "path": "production-level-application/components/navbar/index.tsx",
    "content": "import { setIsDarkMode, setIsSidebarCollapsed } from \"@/state\";\nimport { UserButton } from \"@clerk/nextjs\";\nimport { Menu, Moon, Search, Settings, Sun } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useAppDispatch, useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nfunction Navbar({}: Props) {\n  const dispatch = useAppDispatch();\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed\n  );\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  return (\n    <div className=\"flex items-center justify-between bg-white px-4 py-3 dark:bg-black\">\n      <div className=\"flex items-center gap-8\">\n        {!isSidebarCollapsed ? null : (\n          <button\n            onClick={() => dispatch(setIsSidebarCollapsed(!isSidebarCollapsed))}\n          >\n            <Menu className=\"h-8 w-8 dark:text-white\" />\n          </button>\n        )}\n        <div className=\"relative flex h-min w-[200px]\">\n          <Search className=\"absolute left-[4px] top-1/2 mr-2 h-5 w-5 -translate-y-1/2 transform cursor-pointer dark:text-white\" />\n          <input\n            className=\"w-full rounded border-none bg-gray-100 p-2 pl-8 placeholder-gray-500 focus:border-transparent focus:outline-none dark:bg-gray-700 dark:text-white dark:placeholder-white\"\n            type=\"search\"\n            placeholder=\"Search...\"\n          />\n        </div>\n      </div>\n      <div className=\"flex items-center\">\n        <button\n          onClick={() => dispatch(setIsDarkMode(!isDarkMode))}\n          className={\n            isDarkMode\n              ? `rounded p-2 dark:hover:bg-gray-700`\n              : `rounded p-2 hover:bg-gray-100`\n          }\n        >\n          {isDarkMode ? (\n            <Sun className=\"h-6 w-6 cursor-pointer dark:text-white\" />\n          ) : (\n            <Moon className=\"h-6 w-6 cursor-pointer dark:text-white\" />\n          )}\n        </button>\n        <Link\n          href=\"/settings\"\n          className={\n            isDarkMode\n              ? `h-min w-min rounded p-2 dark:hover:bg-gray-700`\n              : `h-min w-min rounded p-2 hover:bg-gray-100`\n          }\n        >\n          <Settings className=\"h-6 w-6 cursor-pointer dark:text-white\" />\n        </Link>\n        <div className=\"ml-2 mr-5 hidden min-h-[2em] w-[0.1rem] bg-gray-200 md:inline-block\"></div>\n        <div className=\"hidden items-center justify-between md:flex\">\n          <div className=\"align-center flex h-9 w-9 justify-center\">\n            {/* <User className=\"h-6 w-6 cursor-pointer self-center rounded-full dark:text-white\" /> */}\n            <UserButton />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default Navbar;\n"
  },
  {
    "path": "production-level-application/components/priority-page/index.tsx",
    "content": "\"use client\";\n\nimport { dataGridClassNames, dataGridSxStyles } from \"@/lib/utils\";\nimport { useGetTasksByUserQuery } from \"@/state/api\";\nimport { Priority, TasksTypes } from \"@/types/type\";\nimport { useUser } from \"@clerk/nextjs\";\nimport { DataGrid } from \"@mui/x-data-grid\";\nimport { useState } from \"react\";\nimport { priorityColumns } from \"../data/columns\";\nimport TaskCard from \"../global/task-card\";\nimport Header from \"../header\";\nimport ModelNewTask from \"../modal/model-new-task\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {\n  priority: Priority;\n};\n\nfunction PriorityPage({ priority }: Props) {\n  const { isSignedIn, user } = useUser();\n  const [view, setView] = useState(\"list\");\n  const [isMobileNewTaskOpen, setIsMobileNewTaskOpen] = useState(false);\n\n  const userId = user?.id ?? null;\n\n  const {\n    data: task,\n    isLoading,\n    isError: isTasksError,\n  } = useGetTasksByUserQuery(userId as any);\n\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n  const filteredTasks = task?.filter(\n    (t: TasksTypes) => t.priority === priority\n  );\n\n  if (isTasksError || !task) return <div>An error occurred</div>;\n\n  return (\n    <div className=\"m-5 p-4\">\n      <ModelNewTask\n        isOpen={isMobileNewTaskOpen}\n        onClose={() => setIsMobileNewTaskOpen(false)}\n      />\n      <Header\n        name=\"Priority Page\"\n        buttonComponent={\n          <button\n            className=\"mr-3 rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700\"\n            onClick={() => setIsMobileNewTaskOpen(true)}\n          >\n            Add Task\n          </button>\n        }\n      />\n      <div className=\"mb-4 flex justify-start\">\n        <button\n          className={`rounded-bl-md rounded-tl-md px-4 py-2 ${\n            view === \"list\" ? \"bg-gray-300\" : \"bg-white\"\n          } `}\n          onClick={() => setView(\"list\")}\n        >\n          List\n        </button>\n        <button\n          className={`rounded-br-md rounded-tr-md px-4 py-2 ${\n            view === \"table\" ? \"bg-gray-300\" : \"bg-white\"\n          } `}\n          onClick={() => setView(\"table\")}\n        >\n          Table\n        </button>\n      </div>\n      {isLoading ? (\n        <div>Loading tasks...</div>\n      ) : view === \"list\" ? (\n        <div className=\"grid grid-cols-1 gap-4\">\n          {filteredTasks?.map((task: TasksTypes) => (\n            <TaskCard key={task.id} task={task} />\n          ))}\n        </div>\n      ) : (\n        view === \"table\" &&\n        filteredTasks && (\n          <div className=\"z-0 w-full\">\n            <DataGrid\n              rows={filteredTasks}\n              columns={priorityColumns}\n              checkboxSelection\n              getRowId={(row) => row.id}\n              className={dataGridClassNames}\n              sx={dataGridSxStyles(isDarkMode)}\n            />\n          </div>\n        )\n      )}\n    </div>\n  );\n}\n\nexport default PriorityPage;\n"
  },
  {
    "path": "production-level-application/components/sidebar/index.tsx",
    "content": "\"use client\";\n\nimport { setIsSidebarCollapsed } from \"@/state\";\nimport { useGetProjectsQuery } from \"@/state/api\";\nimport {\n  AlertCircle,\n  AlertOctagon,\n  AlertTriangle,\n  Briefcase,\n  ChevronDown,\n  ChevronUp,\n  Home,\n  Layers3,\n  LockIcon,\n  LucideIcon,\n  PlusSquare,\n  ShieldAlert,\n  X,\n} from \"lucide-react\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { usePathname } from \"next/navigation\";\nimport { useState } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport ModalNewProject from \"../modal/modal-new-project\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nfunction SideBar({}: Props) {\n  const dispatch = useDispatch();\n  const [showProject, setShowProject] = useState(true);\n  const [showPriority, setShowPriority] = useState(true);\n  const [isModalNameProjectOpen, setIsModalNameProjectOpen] = useState(false);\n\n  const { data: projects } = useGetProjectsQuery();\n\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed\n  );\n\n  /*   if (!currentUser) return null;\n  const currentUserDetails = currentUser.user; */\n  const sideBarClassNames = `fixed flex flex-col h-full justify-between shadow-xl\n  transition-all duration-300 ease-in-out z-40 dark:bg-black overflow-y-auto bg-white\n  ${\n    isSidebarCollapsed\n      ? \"max-w-0 overflow-hidden opacity-0\"\n      : \"max-w-64 opacity-100\"\n  }`;\n\n  return (\n    <div className={sideBarClassNames}>\n      <div className=\"flex h-[100%] w-full flex-col justify-start\">\n        {/*    */}\n        <div className=\"z-50 flex min-h-[56px] w-64 items-center justify-between bg-white px-6 pt-3 dark:bg-black\">\n          <div className=\"text-xl font-bold text-gray-800 dark:text-white\">\n            LIST\n          </div>\n          {isSidebarCollapsed ? null : (\n            <button\n              className=\"py-3\"\n              onClick={() =>\n                dispatch(setIsSidebarCollapsed(!isSidebarCollapsed))\n              }\n            >\n              <X className=\"h-6 w-6 text-gray-800 hover:text-gray-500 dark:text-white\" />\n            </button>\n          )}\n        </div>\n        <div className=\"flex items-center gap-5 border-y-[1.5px] border-gray-500 px-8 py-4 dark:border-gray-700\">\n          <Image src=\"/logo.png\" alt=\"logo\" width={40} height={40} />\n          <div>\n            <h3 className=\"text-lg font-bold tracking-wide dark:text-gray-200\">\n              Project Management\n            </h3>\n\n            <div className=\"mt-1 flex items-start gap-2\">\n              <LockIcon className=\"mt-[0.1rem] h-3 w-3 text-gray-500 dark:text-gray-400\" />\n              <p className=\"text-xs text-gray-500\">Private</p>\n            </div>\n          </div>\n        </div>\n        <nav className=\"z-10 w-full\">\n          <SidebarLink icon={Home} label=\"Home\" href=\"/dashboard\" />\n          {projects && projects.length > 0 && (\n            <SidebarLink\n              icon={Briefcase}\n              label=\"Timeline\"\n              href=\"/dashboard/timeline\"\n            />\n          )}\n\n          {/*           <SidebarLink icon={Search} label=\"Search\" href=\"/dashboard/search\" />\n          <SidebarLink\n            icon={Settings}\n            label=\"Settings\"\n            href=\"/dashboard/settings\"\n          />\n          <SidebarLink icon={User} label=\"Users\" href=\"/dashboard/users\" />\n          <SidebarLink icon={Users} label=\"Teams\" href=\"/dashboard/teams\" /> */}\n        </nav>\n        <button\n          onClick={() => setShowProject((prev) => !prev)}\n          className=\"flex w-full items-center justify-between px-8 py-3 text-gray-500\"\n        >\n          <span>Projects</span>\n          {showProject ? (\n            <ChevronUp className=\"h-5 w-5\" />\n          ) : (\n            <ChevronDown className=\"h-5 w-5\" />\n          )}\n        </button>\n        {showProject &&\n          projects?.map((project) => (\n            <SidebarLink\n              key={project.id}\n              icon={Briefcase}\n              label={project.name}\n              href={`/dashboard/projects/${project.id}`}\n            />\n          ))}\n        <button\n          onClick={() => setShowPriority((prev) => !prev)}\n          className=\"flex w-full items-center justify-between px-8 py-3 text-gray-500\"\n        >\n          <span>Priory</span>\n          {showPriority ? (\n            <ChevronUp className=\"h-5 w-5\" />\n          ) : (\n            <ChevronDown className=\"h-5 w-5\" />\n          )}\n        </button>\n        {showPriority && (\n          <>\n            <SidebarLink\n              icon={AlertCircle}\n              label=\"Urgent\"\n              href=\"/dashboard/priority/urgent\"\n            />\n            <SidebarLink\n              icon={ShieldAlert}\n              label=\"High\"\n              href=\"/dashboard/priority/high\"\n            />\n            <SidebarLink\n              icon={AlertTriangle}\n              label=\"Medium\"\n              href=\"/dashboard/priority/medium\"\n            />\n            <SidebarLink\n              icon={AlertOctagon}\n              label=\"Low\"\n              href=\"/dashboard/priority/low\"\n            />\n            <SidebarLink\n              icon={Layers3}\n              label=\"Backlog\"\n              href=\"/dashboard/priority/backlog\"\n            />\n          </>\n        )}\n        <div className=\"flex justify-center mt-4 gap-x-2\">\n          <ModalNewProject\n            isOpen={isModalNameProjectOpen}\n            onClose={() => setIsModalNameProjectOpen(false)}\n          />\n          <button\n            className=\"flex items-center rounded-sm bg-blue-300 text-black dark:bg-blue-950 px-3 py-2 dark:text-white hover:bg-blue-600 w-full\"\n            onClick={() => setIsModalNameProjectOpen(true)}\n          >\n            <PlusSquare className=\"mr-1 h-5 w-5\" /> New Board\n          </button>\n        </div>\n      </div>\n      <div className=\"z-10 mt-32 flex w-full flex-col items-center gap-4 bg-white px-8 py-4 dark:bg-black md:hidden\">\n        <div className=\"flex w-full items-center\">\n          <div className=\"align-center flex h-9 w-9 justify-center\">\n            {/*      {!!currentUserDetails?.profilePictureUrl ? (\n              <Image\n                src={`https://pm-s3-images.s3.us-east-2.amazonaws.com/${currentUserDetails?.profilePictureUrl}`}\n                alt={currentUserDetails?.username || \"User Profile Picture\"}\n                width={100}\n                height={50}\n                className=\"h-full rounded-full object-cover\"\n              />\n            ) : (\n              <User className=\"h-6 w-6 cursor-pointer self-center rounded-full dark:text-white\" />\n            )} */}\n            {/*   <User className=\"h-6 w-6 cursor-pointer self-center rounded-full dark:text-white\" /> */}\n          </div>\n          {/*           <span className=\"mx-3 text-gray-800 dark:text-white\">sashen</span>\n          <button\n            className=\"self-start rounded bg-blue-400 px-4 py-2 text-xs font-bold text-white hover:bg-blue-500 md:block\"\n            // onClick={handleSignOut}\n          >\n            Sign out\n          </button> */}\n        </div>\n      </div>\n    </div>\n  );\n}\n\ninterface SideBarLinksType {\n  href: string;\n  icon: LucideIcon;\n  label: string;\n}\n\nconst SidebarLink = ({ href, icon: Icon, label }: SideBarLinksType) => {\n  const pathName = usePathname();\n  const isActive =\n    pathName === href || (pathName === \"/\" && href === \"/dashboard\");\n  const screenWidth = window.innerWidth;\n\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed\n  );\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  return (\n    <Link href={href} className=\"w-full\">\n      <div\n        className={`relative flex cursor-pointer items-center gap-3 rounded-sm transition-colors hover:bg-gray-100 dark:bg-black dark:hover:bg-gray-700 ${\n          isActive ? \"bg-gray-100 text-white dark:bg-gray-600\" : \"\"\n        } justify-start px-8 py-3`}\n      >\n        {isActive && (\n          <div className=\"absolute left-0 top-0 h-[100%] w-[5px] bg-blue-200\" />\n        )}\n\n        <Icon className=\"h-6 w-6 text-gray-800 dark:text-gray-500\" />\n        <span className={`font-medium text-gray-800 dark:text-gray-100`}>\n          {label}\n        </span>\n      </div>\n    </Link>\n  );\n};\n\nexport default SideBar;\n\n// 1.40\n"
  },
  {
    "path": "production-level-application/components/task/index.tsx",
    "content": "import { useDeleteTasksMutation } from \"@/state/api\";\nimport { TasksTypes } from \"@/types/type\";\nimport { useUser } from \"@clerk/nextjs\";\nimport { format } from \"date-fns\";\nimport { EllipsisVertical, Trash2 } from \"lucide-react\";\nimport Image from \"next/image\";\nimport { useDrag } from \"react-dnd\";\nimport ClientOnly from \"../global/client-only\";\nimport { toast } from \"react-toastify\";\n\ntype Props = {\n  task: TasksTypes;\n};\n\nfunction Task({ task }: Props) {\n  const { user } = useUser();\n  const [deleteTask] = useDeleteTasksMutation();\n  const [{ isDragging }, drop] = useDrag(() => ({\n    type: \"task\",\n    item: { id: task.id },\n    collect: (monitor: any) => ({\n      isDragging: !!monitor.isDragging(),\n    }),\n  }));\n\n  const taskTagsSplit = task.tags ? task.tags.split(\",\") : [];\n\n  const formattedStartDate = task.startDate\n    ? format(new Date(task.startDate), \"P\")\n    : \"\";\n\n  const formattedDueDate = task.dueDate\n    ? format(new Date(task.dueDate), \"P\")\n    : \"\";\n\n  const handleDelete = async (taskId: number) => {\n    if (!taskId) {\n      console.error(\"taskId is undefined or invalid\");\n      return;\n    }\n\n    try {\n      deleteTask({ taskId }).then(() =>\n        toast.warning(\"Task Delete Successfully!\", {\n          position: \"bottom-right\",\n        })\n      );\n    } catch (error) {\n      console.error(\"Error deleting task:\", error);\n    }\n  };\n\n  const timeAgo = (dateString: string): string => {\n    // Step 1: Check the original date format coming in\n    //console.log(\"Original date string:\", dateString);\n\n    // If the date has 'Z' (UTC), convert it to ISO format\n    let formattedDateString = dateString;\n\n    // Check if the string includes a 'Z', if not, make sure the string is in ISO format\n    if (!dateString.includes(\"Z\") && dateString.includes(\" \")) {\n      formattedDateString = dateString.replace(\" \", \"T\"); // Convert space to 'T' for ISO format\n    }\n\n    //console.log(\"Formatted to ISO 8601:\", formattedDateString);\n\n    // Step 2: Parse the string into a Date object\n    const createdAt = new Date(formattedDateString);\n    //console.log(\"Created At Date Object:\", createdAt);\n\n    // Step 3: Check if the Date is valid\n    if (isNaN(createdAt.getTime())) {\n      // console.error(\"Invalid Date:\", formattedDateString);\n      return \"Invalid date\"; // If the date is invalid\n    }\n\n    // Step 4: Get the current time for comparison\n    const now = new Date();\n    // console.log(\"Current Date:\", now);\n\n    // Step 5: Calculate the time difference in seconds\n    const differenceInSeconds = Math.floor(\n      (now.getTime() - createdAt.getTime()) / 1000\n    );\n    //console.log(\"Difference in seconds:\", differenceInSeconds);\n\n    // Step 6: Handle different time differences\n    if (differenceInSeconds < 60) {\n      return `${differenceInSeconds} seconds ago`;\n    } else if (differenceInSeconds < 3600) {\n      const minutes = Math.floor(differenceInSeconds / 60);\n      return `${minutes} minutes ago`;\n    } else if (differenceInSeconds < 86400) {\n      const hours = Math.floor(differenceInSeconds / 3600);\n      return `${hours} hours ago`;\n    } else if (differenceInSeconds < 2592000) {\n      const days = Math.floor(differenceInSeconds / 86400);\n      return `${days} days ago`;\n    } else if (differenceInSeconds < 31536000) {\n      const months = Math.floor(differenceInSeconds / 2592000);\n      return `${months} months ago`;\n    } else {\n      const years = Math.floor(differenceInSeconds / 31536000);\n      return `${years} years ago`;\n    }\n  };\n\n  const PriorityTags = ({ priority }: { priority: TasksTypes[\"priority\"] }) => (\n    <div\n      className={`rounded-full px-2 py-1 text-xs font-semibold ${\n        priority === \"Urgent\"\n          ? \"bg-red-200 text-red-700\"\n          : priority === \"High\"\n          ? \"bg-yellow-200 text-yellow-700\"\n          : priority === \"Medium\"\n          ? \"bg-green-200 text-green-700\"\n          : priority === \"Low\"\n          ? \"bg-blue-200 text-blue-700\"\n          : \"bg-gray-200 text-gray-700\"\n      }`}\n    >\n      {priority}\n    </div>\n  );\n\n  return (\n    <ClientOnly>\n      <div\n        ref={(instance) => {\n          drop(instance);\n        }}\n        className={`mb-4 rounded-md bg-white shadow dark:bg-dark-secondary ${\n          isDragging ? \"opacity-50\" : \"opacity-100\"\n        }`}\n      >\n        {task.imageSrc && (\n          <Image\n            src={task.imageSrc}\n            alt={task.imageSrc}\n            width={400}\n            height={200}\n            className=\"h-auto w-full rounded-md\"\n          />\n        )}\n        <div className=\"p-4 md:p-6\">\n          <div className=\"flex items-start justify-between\">\n            <div className=\"flex flex-1 flex-wrap items-center gap-2\">\n              {task.priority && <PriorityTags priority={task.priority} />}\n\n              <div className=\"flex gap-2\">\n                {taskTagsSplit.map((tag) => (\n                  <div\n                    key={tag}\n                    className=\"rounded-full bg-blue-100 px-2 py-1 text-xs\"\n                  >\n                    {\" \"}\n                    {tag}\n                  </div>\n                ))}\n              </div>\n            </div>\n            <button className=\"flex h-6 w-4 flex-shrink-0 items-center justify-center dark:text-neutral-500\">\n              <EllipsisVertical size={26} />\n            </button>\n          </div>\n          <div className=\"my-3 flex justify-between\">\n            <h4 className=\"text-md font-bold dark:text-white\">{task.title}</h4>\n            {typeof task.points === \"number\" && (\n              <div className=\"text-xs font-semibold dark:text-white\">\n                {task.points} pts\n              </div>\n            )}\n          </div>\n          <div className=\"text-xs text-gray-500 dark:text-neutral-500\">\n            {formattedStartDate && <span>{formattedStartDate} - </span>}\n            {formattedDueDate && <span>{formattedDueDate}</span>}\n          </div>\n          <p className=\"text-sm font-semibold text-gray-600 dark:text-neutral-500\">\n            {task.description}\n          </p>\n          <div className=\"mt-4 border-t border-gray-200 dark:border-stroke-dark\" />\n\n          <div className=\"mt-3 flex items-center justify-between\">\n            <div className=\"flex -space-x-[6px] overflow-hidden\">\n              {task.assignee && (\n                <Image\n                  src={`${task.assignee.profilePictureUrl}`}\n                  alt={task.assignee.firstName}\n                  width={30}\n                  height={30}\n                  className=\"h-8 w-8 rounded-full border-2 border-white object-cover dark:border-dark-secondary\"\n                />\n              )}\n              {task.author?.profilePictureUrl && (\n                <Image\n                  src={task.author.profilePictureUrl}\n                  alt={task.author.firstName}\n                  width={30}\n                  height={30}\n                  className=\"h-8 w-8 rounded-full border-2 border-white object-cover dark:border-dark-secondary\"\n                />\n              )}\n            </div>\n            {user?.id === task.authorUserId && (\n              <div\n                className=\"flex items-center text-gray-500 dark:text-neutral-500 hover:bg-red-500 cursor-pointer rounded-full px-2 py-2 hover:text-white\"\n                onClick={() => {\n                  handleDelete(task.id);\n                }}\n              >\n                <Trash2 size={20} />\n              </div>\n            )}\n          </div>\n          {task.createdAt && (\n            <div className=\"flex justify-end items-center\">\n              <p className=\"text-gray-500  text-[10px]\">\n                {timeAgo(task.createdAt)}\n              </p>\n            </div>\n          )}\n        </div>\n      </div>\n    </ClientOnly>\n  );\n}\n\nexport default Task;\n"
  },
  {
    "path": "production-level-application/components/timeline/index.tsx",
    "content": "\"use client\";\n\nimport { useGetProjectsQuery } from \"@/state/api\";\nimport { TaskTypeItems } from \"@/types/type\";\nimport { DisplayOption, Gantt, ViewMode } from \"gantt-task-react\";\nimport \"gantt-task-react/dist/index.css\";\nimport React, { useMemo, useState } from \"react\";\nimport { Spinner } from \"../global/loader/spinner\";\nimport Header from \"../header\";\nimport { useAppSelector } from \"../wrapper/redux\";\n\ntype Props = {};\n\nfunction TimeLinePage({}: Props) {\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n  const { data: projects, isError, isLoading } = useGetProjectsQuery();\n\n  const [displayOptions, setDisplayOptions] = useState<DisplayOption>({\n    viewMode: ViewMode.Month,\n    locale: \"en-US\",\n  });\n\n  const ganttTasks = useMemo(() => {\n    return (\n      projects?.map((project) => ({\n        start: new Date(project.startDate as string),\n        end: new Date(project.endDate as string),\n        name: project.name,\n        id: `Project-${project.id}`,\n        type: \"project\" as TaskTypeItems,\n        progress: 50,\n        isDisabled: false,\n      })) || []\n    );\n  }, [projects]);\n\n  const handleViewModeChange = (\n    event: React.ChangeEvent<HTMLSelectElement>\n  ) => {\n    setDisplayOptions((prevOptions) => ({\n      ...prevOptions,\n      viewMode: event.target.value as ViewMode,\n    }));\n  };\n\n  if (isLoading) return <Spinner />;\n  if (isError || !projects)\n    return <div>An error occurred while fetching projects</div>;\n\n  return (\n    <div className=\"max-w-full p-8\">\n      <header className=\"mb-4 flex items-center justify-between\">\n        <Header name=\"Projects Timeline\" />\n        <div className=\"relative inline-block w-64\">\n          <select\n            className=\"focus:shadow-outline block w-full appearance-none rounded border border-gray-400 bg-white px-4 py-2 pr-8 leading-tight shadow hover:border-gray-500 focus:outline-none dark:border-dark-secondary dark:bg-dark-secondary dark:text-white\"\n            value={displayOptions.viewMode}\n            onChange={handleViewModeChange}\n          >\n            <option value={ViewMode.Day}>Day</option>\n            <option value={ViewMode.Week}>Week</option>\n            <option value={ViewMode.Month}>Month</option>\n          </select>\n        </div>\n      </header>\n      <div className=\"overflow-hidden rounded-md bg-white shadow dark:bg-dark-secondary dark:text-white\">\n        <div className=\"timeline\">\n          <Gantt\n            tasks={ganttTasks}\n            {...displayOptions}\n            columnWidth={displayOptions.viewMode === ViewMode.Month ? 150 : 100}\n            listCellWidth=\"100px\"\n            projectBackgroundColor={isDarkMode ? \"#101214\" : \"#1f2937\"}\n            projectProgressColor={isDarkMode ? \"#1f2937\" : \"#aeb8c2\"}\n            projectProgressSelectedColor={isDarkMode ? \"#000\" : \"#9ba1a6\"}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default TimeLinePage;\n"
  },
  {
    "path": "production-level-application/components/wrapper/dashboardWrapper.tsx",
    "content": "\"use client\";\n\nimport React, { useEffect } from \"react\";\nimport Navbar from \"../navbar\";\nimport SideBar from \"../sidebar\";\nimport { useAppSelector } from \"./redux\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nfunction DashboardLayout({ children }: Props) {\n  const isSidebarCollapsed = useAppSelector(\n    (state) => state.global.isSidebarCollapsed\n  );\n  const isDarkMode = useAppSelector((state) => state.global.isDarkMode);\n\n  useEffect(() => {\n    if (isDarkMode) {\n      document.documentElement.classList.add(\"dark\");\n    } else {\n      document.documentElement.classList.remove(\"dark\");\n    }\n  });\n\n  return (\n    <div className=\"flex min-h-screen w-full bg-gray-50 text-gray-900\">\n      <SideBar />\n      <main\n        className={`flex w-full flex-col bg-gray-50 dark:bg-dark-bg ${\n          isSidebarCollapsed ? \"\" : \"md:pl-64\"\n        }`}\n      >\n        <Navbar />\n        {children}\n      </main>\n    </div>\n  );\n}\n\nconst DashboardWrapper = ({ children }: { children: React.ReactNode }) => {\n  return <DashboardLayout>{children}</DashboardLayout>;\n};\n\nexport default DashboardWrapper;\n"
  },
  {
    "path": "production-level-application/components/wrapper/redux.tsx",
    "content": "import globalReducer from \"@/state\";\nimport { api } from \"@/state/api\";\nimport { combineReducers, configureStore } from \"@reduxjs/toolkit\";\nimport { setupListeners } from \"@reduxjs/toolkit/query\";\nimport { useRef } from \"react\";\nimport {\n  Provider,\n  TypedUseSelectorHook,\n  useDispatch,\n  useSelector,\n} from \"react-redux\";\nimport {\n  FLUSH,\n  PAUSE,\n  PERSIST,\n  persistReducer,\n  persistStore,\n  PURGE,\n  REGISTER,\n  REHYDRATE,\n} from \"redux-persist\";\nimport { PersistGate } from \"redux-persist/integration/react\";\nimport createWebStorage from \"redux-persist/lib/storage/createWebStorage\";\n\n/* REDUX PERSISTENCE */\nconst createNoopStorage = () => {\n  return {\n    getItem(_key: any) {\n      return Promise.resolve(null);\n    },\n    setItem(_key: any, value: any) {\n      return Promise.resolve(value);\n    },\n    removeItem(_key: any) {\n      return Promise.resolve();\n    },\n  };\n};\n\nconst storage =\n  typeof window === \"undefined\"\n    ? createNoopStorage()\n    : createWebStorage(\"local\");\n\nconst persistConfig = {\n  key: \"root\",\n  storage,\n  whitelist: [\"global\"],\n};\nconst rootReducer = combineReducers({\n  global: globalReducer,\n  [api.reducerPath]: api.reducer,\n});\nconst persistedReducer = persistReducer(persistConfig, rootReducer);\n\n/* REDUX STORE */\nexport const makeStore = () => {\n  return configureStore({\n    reducer: persistedReducer,\n    // @ts-ignore\n    middleware: (getDefault) =>\n      getDefault({\n        serializableCheck: {\n          ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],\n        },\n      }).concat(api.middleware),\n  });\n};\n\n/* REDUX TYPES */\nexport type AppStore = ReturnType<typeof makeStore>;\nexport type RootState = ReturnType<AppStore[\"getState\"]>;\nexport type AppDispatch = AppStore[\"dispatch\"];\nexport const useAppDispatch = () => useDispatch<AppDispatch>();\nexport const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;\n\n/* PROVIDER */\nexport default function StoreProvider({\n  children,\n}: {\n  children: React.ReactNode;\n}) {\n  const storeRef = useRef<AppStore>();\n  if (!storeRef.current) {\n    storeRef.current = makeStore();\n    setupListeners(storeRef.current.dispatch);\n  }\n  const persistor = persistStore(storeRef.current);\n\n  return (\n    <Provider store={storeRef.current}>\n      <PersistGate loading={null} persistor={persistor}>\n        {children}\n      </PersistGate>\n    </Provider>\n  );\n}\n"
  },
  {
    "path": "production-level-application/lib/prismadb.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\n\ndeclare global {\n  var prisma: PrismaClient | undefined;\n}\n\nconst client = globalThis.prisma || new PrismaClient();\n\nif (process.env.NODE_ENV !== \"production\") globalThis.prisma = client;\n\nexport default client;\n"
  },
  {
    "path": "production-level-application/lib/utils.ts",
    "content": "export const dataGridClassNames =\n  \"border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200\";\n\nexport const dataGridSxStyles = (isDarkMode: boolean) => {\n  return {\n    \"& .MuiDataGrid-columnHeaders\": {\n      color: `${isDarkMode ? \"#e5e7eb\" : \"\"}`,\n      '& [role=\"row\"] > *': {\n        backgroundColor: `${isDarkMode ? \"#1d1f21\" : \"white\"}`,\n        borderColor: `${isDarkMode ? \"#2d3135\" : \"\"}`,\n      },\n    },\n    \"& .MuiIconbutton-root\": {\n      color: `${isDarkMode ? \"#a3a3a3\" : \"\"}`,\n    },\n    \"& .MuiTablePagination-root\": {\n      color: `${isDarkMode ? \"#a3a3a3\" : \"\"}`,\n    },\n    \"& .MuiTablePagination-selectIcon\": {\n      color: `${isDarkMode ? \"#a3a3a3\" : \"\"}`,\n    },\n    \"& .MuiDataGrid-cell\": {\n      border: \"none\",\n    },\n    \"& .MuiDataGrid-row\": {\n      borderBottom: `1px solid ${isDarkMode ? \"#2d3135\" : \"e5e7eb\"}`,\n    },\n    \"& .MuiDataGrid-withBorderColor\": {\n      borderColor: `${isDarkMode ? \"#2d3135\" : \"e5e7eb\"}`,\n    },\n  };\n};\n"
  },
  {
    "path": "production-level-application/middleware.ts",
    "content": "import { clerkMiddleware, createRouteMatcher } from \"@clerk/nextjs/server\";\n\nconst isProtectedRoute = createRouteMatcher([\"/dashboard(.*)\", \"/api(.*)\"]);\n\nexport default clerkMiddleware(async (auth, req) => {\n  if (isProtectedRoute(req)) await auth.protect();\n});\n\nexport const config = {\n  matcher: [\n    // Skip Next.js internals and all static files, unless found in search params\n    \"/((?!_next|[^?]*\\\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)\",\n    // Always run for API routes\n    \"/(api|trpc)(.*)\",\n  ],\n};\n"
  },
  {
    "path": "production-level-application/next.config.mjs",
    "content": "/** @type {import('next').NextConfig} */\nconst nextConfig = {\n  images: {\n    remotePatterns: [\n      {\n        protocol: \"https\",\n        hostname: \"res.cloudinary.com\",\n        port: \"\",\n        pathname: \"/**\",\n      },\n      {\n        protocol: \"https\",\n        hostname: \"img.clerk.com\",\n        port: \"\",\n        pathname: \"/**\",\n      },\n      {\n        protocol: \"https\",\n        hostname: \"api.dicebear.com\",\n        port: \"\",\n        pathname: \"/**\",\n      },\n    ],\n  },\n};\n\nexport default nextConfig;\n"
  },
  {
    "path": "production-level-application/package.json",
    "content": "{\n  \"name\": \"pm-app\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"build\": \"next build\",\n    \"start\": \"next start\",\n    \"lint\": \"next lint\",\n    \"postinstall\": \"prisma generate\"\n  },\n  \"dependencies\": {\n    \"@clerk/nextjs\": \"^6.9.14\",\n    \"@emotion/react\": \"^11.14.0\",\n    \"@emotion/styled\": \"^11.14.0\",\n    \"@mui/material\": \"^6.4.1\",\n    \"@mui/x-data-grid\": \"^7.24.0\",\n    \"@prisma/client\": \"^6.2.1\",\n    \"@reduxjs/toolkit\": \"^2.5.0\",\n    \"date-fns\": \"^4.1.0\",\n    \"framer-motion\": \"^12.0.5\",\n    \"gantt-task-react\": \"^0.3.9\",\n    \"lodash\": \"^4.17.21\",\n    \"lucide-react\": \"^0.473.0\",\n    \"next\": \"14.2.7\",\n    \"next-cloudinary\": \"^6.16.0\",\n    \"react\": \"^18\",\n    \"react-dnd\": \"^16.0.1\",\n    \"react-dnd-html5-backend\": \"^16.0.1\",\n    \"react-dom\": \"^18\",\n    \"react-redux\": \"^9.2.0\",\n    \"react-toastify\": \"^11.0.3\",\n    \"recharts\": \"^2.15.0\",\n    \"redux-persist\": \"^6.0.0\",\n    \"uuid\": \"^11.0.5\"\n  },\n  \"devDependencies\": {\n    \"@types/lodash\": \"^4.17.14\",\n    \"@types/node\": \"^20\",\n    \"@types/react\": \"^18\",\n    \"@types/react-dom\": \"^18\",\n    \"eslint\": \"^8\",\n    \"eslint-config-next\": \"14.2.7\",\n    \"postcss\": \"^8\",\n    \"prisma\": \"^6.2.1\",\n    \"tailwindcss\": \"^3.4.1\",\n    \"typescript\": \"^5\"\n  }\n}"
  },
  {
    "path": "production-level-application/postcss.config.mjs",
    "content": "/** @type {import('postcss-load-config').Config} */\nconst config = {\n  plugins: {\n    tailwindcss: {},\n  },\n};\n\nexport default config;\n"
  },
  {
    "path": "production-level-application/prisma/schema.prisma",
    "content": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel User {\n  id                String  @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  clerkId           String  @unique\n  firstName         String\n  secondName        String\n  emailAddress      String?\n  profilePictureUrl String?\n\n  taskAssignments TaskAssignment[]\n  attachments     Attachment[]\n  comments        Comment[]\n  team            Team[]\n  Project         Project[]\n  Task            Task[]\n}\n\nmodel Team {\n  id                   String        @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  teamName             String\n  productOwnerUserId   Int?\n  projectManagerUserId Int?\n  projectTeams         ProjectTeam[]\n  user                 User[]\n}\n\nmodel Project {\n  id          String    @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  name        String\n  description String?\n  startDate   DateTime?\n  endDate     DateTime?\n  user        User?     @relation(fields: [userId], references: [id], onDelete: Cascade)\n  userId      String?   @db.Uuid\n  authorsIds  String[]\n\n  tasks        Task[]\n  projectTeams ProjectTeam[]\n}\n\nmodel ProjectTeam {\n  id        String  @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  teamId    String  @db.Uuid\n  projectId String  @db.Uuid\n  team      Team    @relation(fields: [teamId], references: [id])\n  project   Project @relation(fields: [projectId], references: [id])\n}\n\nmodel Task {\n  id             String    @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  title          String\n  description    String?\n  status         String?\n  priority       String?\n  tags           String?\n  startDate      DateTime?\n  dueDate        DateTime?\n  points         Int?\n  imageSrc       String?\n  projectId      String    @db.Uuid\n  authorUserId   String\n  assignedUserId String?\n  author         User?     @relation(fields: [userId], references: [id], onDelete: Cascade)\n  userId         String?   @db.Uuid\n  editAuthors    String[]\n  createdAt      DateTime  @default(dbgenerated(\"NOW()\"))\n  updatedAt      DateTime  @updatedAt\n\n  project         Project          @relation(fields: [projectId], references: [id], onDelete: Cascade)\n  taskAssignments TaskAssignment[]\n  attachments     Attachment[]\n  comments        Comment[]\n}\n\nmodel TaskAssignment {\n  id     String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  userId String @db.Uuid\n  taskId String @db.Uuid\n\n  user User @relation(fields: [userId], references: [id])\n  task Task @relation(fields: [taskId], references: [id])\n}\n\nmodel Attachment {\n  id           String  @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  fileURL      String\n  fileName     String?\n  taskId       String  @db.Uuid\n  uploadedById String  @db.Uuid\n\n  task       Task @relation(fields: [taskId], references: [id], onDelete: Cascade)\n  uploadedBy User @relation(fields: [uploadedById], references: [id])\n}\n\nmodel Comment {\n  id     String  @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n  text   String\n  taskId String  @db.Uuid\n  userId String? @unique @db.Uuid\n\n  task Task  @relation(fields: [taskId], references: [id])\n  user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n"
  },
  {
    "path": "production-level-application/provider/reduxProvider.tsx",
    "content": "\"use client\";\n\nimport StoreProvider from \"@/components/wrapper/redux\";\nimport React from \"react\";\n\ntype Props = {\n  children: React.ReactNode;\n};\n\nfunction ReduxProvider({ children }: Props) {\n  return <StoreProvider>{children}</StoreProvider>;\n}\n\nexport default ReduxProvider;\n"
  },
  {
    "path": "production-level-application/state/api.ts",
    "content": "import { ProjectTypes, TasksTypes, User } from \"@/types/type\";\nimport { createApi, fetchBaseQuery } from \"@reduxjs/toolkit/query/react\";\n\nexport const api = createApi({\n  baseQuery: fetchBaseQuery({\n    baseUrl: process.env.NEXT_PUBLIC_API_URL,\n  }),\n  reducerPath: \"api\",\n  tagTypes: [\"Projects\", \"Tasks\", \"Users\", \"Teams\"],\n  endpoints: (build) => ({\n    createUser: build.mutation<User, Partial<User>>({\n      query: (user) => ({\n        url: \"user\",\n        method: \"POST\",\n        body: user,\n      }),\n      invalidatesTags: [\"Users\"],\n    }),\n    getUser: build.query<User, { userId: string }>({\n      query: ({ userId }) => `user/${userId}`,\n      providesTags: (result, error, { userId }) =>\n        result ? [{ type: \"Users\", id: userId }] : [],\n    }),\n    getProjects: build.query<ProjectTypes[], void>({\n      query: () => \"projects\",\n      providesTags: [\"Projects\"],\n    }),\n    createProject: build.mutation<ProjectTypes, Partial<ProjectTypes>>({\n      query: (project) => ({\n        url: \"projects\",\n        method: \"POST\",\n        body: project,\n      }),\n      invalidatesTags: [\"Projects\"],\n    }),\n    getTasks: build.query<TasksTypes[], { projectId: string }>({\n      query: ({ projectId }) => `tasks/${projectId}`,\n      providesTags: (result) =>\n        result\n          ? result.map(({ id }) => ({ type: \"Tasks\" as const, id }))\n          : [{ type: \"Tasks\" as const }],\n    }),\n    getTasksByUser: build.query<TasksTypes[], number>({\n      query: (userId) => `tasks/user/${userId}`,\n      providesTags: (result, error, userId) =>\n        result\n          ? result.map(({ id }) => ({ type: \"Tasks\", id }))\n          : [{ type: \"Tasks\", id: userId }],\n    }),\n    createTasks: build.mutation<TasksTypes, Partial<TasksTypes>>({\n      query: (task) => ({\n        url: \"tasks\",\n        method: \"POST\",\n        body: task,\n      }),\n      invalidatesTags: [\"Tasks\"],\n    }),\n    updateTasks: build.mutation<TasksTypes, { taskId: number; status: string }>(\n      {\n        query: ({ taskId, status }) => ({\n          url: `move/${taskId}`,\n          method: \"PATCH\",\n          body: { status },\n        }),\n        invalidatesTags: (result, error, { taskId }) => [\n          { type: \"Tasks\", id: taskId },\n        ],\n      }\n    ),\n    deleteTasks: build.mutation<void, { taskId: number }>({\n      query: ({ taskId }) => ({\n        url: `move/${taskId}`,\n        method: \"DELETE\",\n      }),\n      invalidatesTags: (result, error, { taskId }) => [\n        { type: \"Tasks\", id: taskId },\n      ],\n    }),\n    updateProjectAuthors: build.mutation<\n      ProjectTypes,\n      { projectId: string; userId: string }\n    >({\n      query: ({ projectId, userId }) => ({\n        url: `projects/${projectId}`,\n        method: \"PATCH\",\n        body: { userId },\n      }),\n      invalidatesTags: [\"Projects\"],\n    }),\n    deleteProject: build.mutation<void, { projectId: string }>({\n      query: ({ projectId }) => ({\n        url: `projects/${projectId}`,\n        method: \"DELETE\",\n      }),\n      invalidatesTags: [\"Projects\"],\n    }),\n    removeUserFromTask: build.mutation<\n      ProjectTypes,\n      { projectId: string; userId: string }\n    >({\n      query: ({ projectId, userId }) => ({\n        url: `tasks/${projectId}`,\n        method: \"PATCH\",\n        body: { userId },\n      }),\n      invalidatesTags: [\"Projects\"],\n    }),\n  }),\n});\n\nexport const {\n  useCreateUserMutation,\n  useGetProjectsQuery,\n  useCreateProjectMutation,\n  useGetTasksQuery,\n  useGetTasksByUserQuery,\n  useCreateTasksMutation,\n  useUpdateTasksMutation,\n  useDeleteTasksMutation,\n  useDeleteProjectMutation,\n  useGetUserQuery,\n  useUpdateProjectAuthorsMutation,\n  useRemoveUserFromTaskMutation,\n  useLazyGetTasksQuery,\n} = api;\n"
  },
  {
    "path": "production-level-application/state/index.ts",
    "content": "import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\n\nexport interface initialStateTypes {\n  isSidebarCollapsed: boolean;\n  isDarkMode: boolean;\n}\n\nconst initialState: initialStateTypes = {\n  isSidebarCollapsed: false,\n  isDarkMode: false,\n};\n\nexport const globalSlice = createSlice({\n  name: \"global\",\n  initialState,\n  reducers: {\n    setIsSidebarCollapsed: (state, action: PayloadAction<boolean>) => {\n      state.isSidebarCollapsed = action.payload;\n    },\n    setIsDarkMode: (state, action: PayloadAction<boolean>) => {\n      state.isDarkMode = action.payload;\n    },\n  },\n});\n\nexport const { setIsSidebarCollapsed, setIsDarkMode } = globalSlice.actions;\nexport default globalSlice.reducer;\n"
  },
  {
    "path": "production-level-application/tailwind.config.ts",
    "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n  darkMode: \"class\",\n  content: [\n    \"./pages/**/*.{js,ts,jsx,tsx,mdx}\",\n    \"./components/**/*.{js,ts,jsx,tsx,mdx}\",\n    \"./app/**/*.{js,ts,jsx,tsx,mdx}\",\n  ],\n  theme: {\n    extend: {\n      colors: {\n        white: \"#ffffff\",\n        gray: {\n          100: \"#f3f4f6\",\n          200: \"#e5e7eb\",\n          300: \"#d1d5db\",\n          500: \"#6b7280\",\n          700: \"#374151\",\n          800: \"#1f2937\",\n        },\n        blue: {\n          200: \"#93c5fd\",\n          400: \"#60a5fa\",\n          500: \"#3b82f6\",\n        },\n        \"dark-bg\": \"#101214\",\n        \"dark-secondary\": \"#1d1f21\",\n        \"dark-tertiary\": \"#3b3d40\",\n        \"blue-primary\": \"#0275ff\",\n        \"stroke-dark\": \"#2d3135\",\n        background: \"var(--background)\",\n        foreground: \"var(--foreground)\",\n      },\n    },\n  },\n  plugins: [],\n} satisfies Config;\n"
  },
  {
    "path": "production-level-application/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"noEmit\": true,\n    \"esModuleInterop\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"bundler\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"jsx\": \"preserve\",\n    \"incremental\": true,\n    \"plugins\": [\n      {\n        \"name\": \"next\"\n      }\n    ],\n    \"paths\": {\n      \"@/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\"next-env.d.ts\", \"**/*.ts\", \"**/*.tsx\", \".next/types/**/*.ts\"],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "production-level-application/types/type.ts",
    "content": "export interface ProjectTypes {\n  id: number;\n  name: string;\n  description?: string;\n  startDate?: string;\n  endDate?: string;\n  user?: String;\n  userId?: string;\n}\n\nexport enum Status {\n  ToDo = \"To Do\",\n  WorkInProgress = \"Work In Progress\",\n  UnderReview = \"Under Review\",\n  Completed = \"Completed\",\n}\n\nexport enum Priority {\n  Urgent = \"Urgent\",\n  High = \"High\",\n  Medium = \"Medium\",\n  Low = \"Low\",\n  Backlog = \"Backlog\",\n}\n\nexport interface User {\n  id?: string;\n  userId?: number;\n  firstName: string;\n  secondName: string;\n  email: string;\n  profilePictureUrl?: string;\n  clerkId?: string;\n}\n\nexport interface Attachment {\n  id: number;\n  fileURL: string;\n  fileName: string;\n  taskId: number;\n  uploadedById: number;\n}\n\nexport interface TasksTypes {\n  id: number;\n  title: string;\n  description?: string;\n  status?: Status;\n  priority?: Priority;\n  tags?: string;\n  startDate?: string;\n  dueDate?: string;\n  points?: number;\n  projectId: string;\n  authorUserId?: string;\n  assignedUserId?: number;\n  imageSrc?: string;\n  userId?: string;\n  createdAt?: string;\n  updatedAt?: string;\n\n  author?: User;\n  assignee?: User;\n  comments?: Comment[];\n  attachments?: Attachment[];\n}\n\nexport interface SearchResults {\n  tasks?: TasksTypes[];\n  projects?: ProjectTypes[];\n  users?: User[];\n}\n\nexport interface Team {\n  teamId: number;\n  teamName: string;\n  productOwnerUserId?: number;\n  projectManagerUserId?: number;\n}\n\nexport type TaskTypeItems = \"task\" | \"milestone\" | \"project\";\n\nexport interface ImageCardProps {\n  src: string;\n  aspectRatio: string;\n  marginTop?: string;\n}\n"
  },
  {
    "path": "server/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n.yarn/install-state.gz\n\n# testing\n/coverage\n\n# next.js\n/.next/\n/out/\n\n# production\n/build\n\n# misc\n.DS_Store\n*.pem\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# local env files\n.env*.local\n\n# vercel\n.vercel\n\n# typescript\n*.tsbuildinfo\nnext-env.d.ts\n\ndist\n.env"
  },
  {
    "path": "server/ecosystem.config.js",
    "content": "module.exports = {\n  apps: [\n    {\n      name: \"project-management\",\n      script: \"npm\",\n      args: \"run dev\",\n      env: {\n        NODE_ENV: \"development\",\n      },\n    },\n  ],\n};\n"
  },
  {
    "path": "server/package.json",
    "content": "{\n  \"name\": \"server\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\n    \"build\": \"rimraf dist && npx tsc\",\n    \"start\": \"npm run build && node dist/index.js\",\n    \"dev\": \"npm run build && concurrently \\\"npx tsc -w\\\" \\\"nodemon --exec ts-node src/index.ts\\\"\",\n    \"seed\": \"ts-node prisma/seed.ts\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"description\": \"\",\n  \"devDependencies\": {\n    \"@types/cors\": \"^2.8.17\",\n    \"@types/express\": \"^5.0.0\",\n    \"@types/morgan\": \"^1.9.9\",\n    \"@types/node\": \"^22.10.3\",\n    \"concurrently\": \"^9.1.2\",\n    \"nodemon\": \"^3.1.9\",\n    \"prisma\": \"^6.2.1\",\n    \"rimraf\": \"^6.0.1\",\n    \"ts-node\": \"^10.9.2\",\n    \"typescript\": \"^5.7.2\"\n  },\n  \"dependencies\": {\n    \"@prisma/client\": \"^6.2.1\",\n    \"body-parser\": \"^1.20.3\",\n    \"cors\": \"^2.8.5\",\n    \"dotenv\": \"^16.4.7\",\n    \"express\": \"^4.21.2\",\n    \"helmet\": \"^8.0.0\",\n    \"morgan\": \"^1.10.0\"\n  }\n}\n"
  },
  {
    "path": "server/prisma/migrations/20250103002536_init/migration.sql",
    "content": "-- CreateTable\nCREATE TABLE \"User\" (\n    \"userId\" SERIAL NOT NULL,\n    \"cognitoId\" TEXT NOT NULL,\n    \"username\" TEXT NOT NULL,\n    \"profilePictureUrl\" TEXT,\n    \"teamId\" INTEGER,\n\n    CONSTRAINT \"User_pkey\" PRIMARY KEY (\"userId\")\n);\n\n-- CreateTable\nCREATE TABLE \"Team\" (\n    \"id\" SERIAL NOT NULL,\n    \"teamName\" TEXT NOT NULL,\n    \"productOwnerUserId\" INTEGER,\n    \"projectManagerUserId\" INTEGER,\n\n    CONSTRAINT \"Team_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateTable\nCREATE TABLE \"Project\" (\n    \"id\" SERIAL NOT NULL,\n    \"name\" TEXT NOT NULL,\n    \"description\" TEXT,\n    \"startDate\" TIMESTAMP(3),\n    \"endDate\" TIMESTAMP(3),\n\n    CONSTRAINT \"Project_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateTable\nCREATE TABLE \"ProjectTeam\" (\n    \"id\" SERIAL NOT NULL,\n    \"teamId\" INTEGER NOT NULL,\n    \"projectId\" INTEGER NOT NULL,\n\n    CONSTRAINT \"ProjectTeam_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateTable\nCREATE TABLE \"Task\" (\n    \"id\" SERIAL NOT NULL,\n    \"title\" TEXT NOT NULL,\n    \"description\" TEXT,\n    \"status\" TEXT,\n    \"priority\" TEXT,\n    \"tags\" TEXT,\n    \"startDate\" TIMESTAMP(3),\n    \"dueDate\" TIMESTAMP(3),\n    \"points\" INTEGER,\n    \"projectId\" INTEGER NOT NULL,\n    \"authorUserId\" INTEGER NOT NULL,\n    \"assignedUserId\" INTEGER,\n\n    CONSTRAINT \"Task_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateTable\nCREATE TABLE \"TaskAssignment\" (\n    \"id\" SERIAL NOT NULL,\n    \"userId\" INTEGER NOT NULL,\n    \"taskId\" INTEGER NOT NULL,\n\n    CONSTRAINT \"TaskAssignment_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateTable\nCREATE TABLE \"Attachment\" (\n    \"id\" SERIAL NOT NULL,\n    \"fileURL\" TEXT NOT NULL,\n    \"fileName\" TEXT,\n    \"taskId\" INTEGER NOT NULL,\n    \"uploadedById\" INTEGER NOT NULL,\n\n    CONSTRAINT \"Attachment_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateTable\nCREATE TABLE \"Comment\" (\n    \"id\" SERIAL NOT NULL,\n    \"text\" TEXT NOT NULL,\n    \"taskId\" INTEGER NOT NULL,\n    \"userId\" INTEGER NOT NULL,\n\n    CONSTRAINT \"Comment_pkey\" PRIMARY KEY (\"id\")\n);\n\n-- CreateIndex\nCREATE UNIQUE INDEX \"User_cognitoId_key\" ON \"User\"(\"cognitoId\");\n\n-- CreateIndex\nCREATE UNIQUE INDEX \"User_username_key\" ON \"User\"(\"username\");\n\n-- AddForeignKey\nALTER TABLE \"User\" ADD CONSTRAINT \"User_teamId_fkey\" FOREIGN KEY (\"teamId\") REFERENCES \"Team\"(\"id\") ON DELETE SET NULL ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"ProjectTeam\" ADD CONSTRAINT \"ProjectTeam_teamId_fkey\" FOREIGN KEY (\"teamId\") REFERENCES \"Team\"(\"id\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"ProjectTeam\" ADD CONSTRAINT \"ProjectTeam_projectId_fkey\" FOREIGN KEY (\"projectId\") REFERENCES \"Project\"(\"id\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Task\" ADD CONSTRAINT \"Task_projectId_fkey\" FOREIGN KEY (\"projectId\") REFERENCES \"Project\"(\"id\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Task\" ADD CONSTRAINT \"Task_authorUserId_fkey\" FOREIGN KEY (\"authorUserId\") REFERENCES \"User\"(\"userId\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Task\" ADD CONSTRAINT \"Task_assignedUserId_fkey\" FOREIGN KEY (\"assignedUserId\") REFERENCES \"User\"(\"userId\") ON DELETE SET NULL ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"TaskAssignment\" ADD CONSTRAINT \"TaskAssignment_userId_fkey\" FOREIGN KEY (\"userId\") REFERENCES \"User\"(\"userId\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"TaskAssignment\" ADD CONSTRAINT \"TaskAssignment_taskId_fkey\" FOREIGN KEY (\"taskId\") REFERENCES \"Task\"(\"id\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Attachment\" ADD CONSTRAINT \"Attachment_taskId_fkey\" FOREIGN KEY (\"taskId\") REFERENCES \"Task\"(\"id\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Attachment\" ADD CONSTRAINT \"Attachment_uploadedById_fkey\" FOREIGN KEY (\"uploadedById\") REFERENCES \"User\"(\"userId\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Comment\" ADD CONSTRAINT \"Comment_taskId_fkey\" FOREIGN KEY (\"taskId\") REFERENCES \"Task\"(\"id\") ON DELETE RESTRICT ON UPDATE CASCADE;\n\n-- AddForeignKey\nALTER TABLE \"Comment\" ADD CONSTRAINT \"Comment_userId_fkey\" FOREIGN KEY (\"userId\") REFERENCES \"User\"(\"userId\") ON DELETE RESTRICT ON UPDATE CASCADE;\n"
  },
  {
    "path": "server/prisma/migrations/migration_lock.toml",
    "content": "# Please do not edit this file manually\n# It should be added in your version-control system (e.g., Git)\nprovider = \"postgresql\""
  },
  {
    "path": "server/prisma/schema.prisma",
    "content": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel User {\n  userId            Int     @id @default(autoincrement())\n  cognitoId         String  @unique\n  username          String  @unique\n  profilePictureUrl String?\n  teamId            Int?\n\n  authoredTasks   Task[]           @relation(\"TaskAuthor\")\n  assignedTasks   Task[]           @relation(\"TaskAssignee\")\n  taskAssignments TaskAssignment[]\n  attachments     Attachment[]\n  comments        Comment[]\n  team            Team?            @relation(fields: [teamId], references: [id])\n}\n\nmodel Team {\n  id                   Int           @id @default(autoincrement())\n  teamName             String\n  productOwnerUserId   Int?\n  projectManagerUserId Int?\n  projectTeams         ProjectTeam[]\n  user                 User[]\n}\n\nmodel Project {\n  id           Int           @id @default(autoincrement())\n  name         String\n  description  String?\n  startDate    DateTime?\n  endDate      DateTime?\n  tasks        Task[]\n  projectTeams ProjectTeam[]\n}\n\nmodel ProjectTeam {\n  id        Int     @id @default(autoincrement())\n  teamId    Int\n  projectId Int\n  team      Team    @relation(fields: [teamId], references: [id])\n  project   Project @relation(fields: [projectId], references: [id])\n}\n\nmodel Task {\n  id             Int       @id @default(autoincrement())\n  title          String\n  description    String?\n  status         String?\n  priority       String?\n  tags           String?\n  startDate      DateTime?\n  dueDate        DateTime?\n  points         Int?\n  projectId      Int\n  authorUserId   Int\n  assignedUserId Int?\n\n  project         Project          @relation(fields: [projectId], references: [id])\n  author          User             @relation(\"TaskAuthor\", fields: [authorUserId], references: [userId])\n  assignee        User?            @relation(\"TaskAssignee\", fields: [assignedUserId], references: [userId])\n  taskAssignments TaskAssignment[]\n  attachments     Attachment[]\n  comments        Comment[]\n}\n\nmodel TaskAssignment {\n  id     Int @id @default(autoincrement())\n  userId Int\n  taskId Int\n\n  user User @relation(fields: [userId], references: [userId])\n  task Task @relation(fields: [taskId], references: [id])\n}\n\nmodel Attachment {\n  id           Int     @id @default(autoincrement())\n  fileURL      String\n  fileName     String?\n  taskId       Int\n  uploadedById Int\n\n  task       Task @relation(fields: [taskId], references: [id])\n  uploadedBy User @relation(fields: [uploadedById], references: [userId])\n}\n\nmodel Comment {\n  id     Int    @id @default(autoincrement())\n  text   String\n  taskId Int\n  userId Int\n\n  task Task @relation(fields: [taskId], references: [id])\n  user User @relation(fields: [userId], references: [userId])\n}\n"
  },
  {
    "path": "server/prisma/seed.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nconst prisma = new PrismaClient();\n\nasync function deleteAllData(orderedFileNames: string[]) {\n  const modelNames = orderedFileNames.map((fileName) => {\n    const modelName = path.basename(fileName, path.extname(fileName));\n    return modelName.charAt(0).toUpperCase() + modelName.slice(1);\n  });\n\n  for (const modelName of modelNames) {\n    const model: any = prisma[modelName as keyof typeof prisma];\n    try {\n      await model.deleteMany({});\n      console.log(`Cleared data from ${modelName}`);\n    } catch (error) {\n      console.error(`Error clearing data from ${modelName}:`, error);\n    }\n  }\n}\n\nasync function main() {\n  const dataDirectory = path.join(__dirname, \"seedData\");\n\n  const orderedFileNames = [\n    \"team.json\",\n    \"project.json\",\n    \"projectTeam.json\",\n    \"user.json\",\n    \"task.json\",\n    \"attachment.json\",\n    \"comment.json\",\n    \"taskAssignment.json\",\n  ];\n\n  await deleteAllData(orderedFileNames);\n\n  for (const fileName of orderedFileNames) {\n    const filePath = path.join(dataDirectory, fileName);\n    const jsonData = JSON.parse(fs.readFileSync(filePath, \"utf-8\"));\n    const modelName = path.basename(fileName, path.extname(fileName));\n    const model: any = prisma[modelName as keyof typeof prisma];\n\n    try {\n      for (const data of jsonData) {\n        await model.create({ data });\n      }\n      console.log(`Seeded ${modelName} with data from ${fileName}`);\n    } catch (error) {\n      console.error(`Error seeding data for ${modelName}:`, error);\n    }\n  }\n}\n\nmain()\n  .catch((e) => console.error(e))\n  .finally(async () => await prisma.$disconnect());\n\n// 02.02\n"
  },
  {
    "path": "server/prisma/seedData/attachment.json",
    "content": "[\n  {\n    \"id\": 1,\n    \"fileURL\": \"i1.jpg\",\n    \"fileName\": \"DesignDoc.pdf\",\n    \"taskId\": 1,\n    \"uploadedById\": 1\n  },\n  {\n    \"id\": 2,\n    \"fileURL\": \"i2.jpg\",\n    \"fileName\": \"NavAlgorithm.pdf\",\n    \"taskId\": 2,\n    \"uploadedById\": 3\n  },\n  {\n    \"id\": 3,\n    \"fileURL\": \"i3.jpg\",\n    \"fileName\": \"EnergySolutions.pdf\",\n    \"taskId\": 3,\n    \"uploadedById\": 5\n  },\n  {\n    \"id\": 4,\n    \"fileURL\": \"i4.jpg\",\n    \"fileName\": \"SoftwareWorkflow.pdf\",\n    \"taskId\": 4,\n    \"uploadedById\": 7\n  },\n  {\n    \"id\": 5,\n    \"fileURL\": \"i5.jpg\",\n    \"fileName\": \"AIPredictions.pdf\",\n    \"taskId\": 5,\n    \"uploadedById\": 9\n  },\n  {\n    \"id\": 6,\n    \"fileURL\": \"i6.jpg\",\n    \"fileName\": \"BiotechTest.pdf\",\n    \"taskId\": 6,\n    \"uploadedById\": 11\n  },\n  {\n    \"id\": 7,\n    \"fileURL\": \"i7.jpg\",\n    \"fileName\": \"GolfAI.pdf\",\n    \"taskId\": 7,\n    \"uploadedById\": 13\n  },\n  {\n    \"id\": 8,\n    \"fileURL\": \"i8.jpg\",\n    \"fileName\": \"HotelDB.pdf\",\n    \"taskId\": 8,\n    \"uploadedById\": 15\n  },\n  {\n    \"id\": 9,\n    \"fileURL\": \"i9.jpg\",\n    \"fileName\": \"TelecomUpgrade.pdf\",\n    \"taskId\": 9,\n    \"uploadedById\": 17\n  },\n  {\n    \"id\": 10,\n    \"fileURL\": \"i10.jpg\",\n    \"fileName\": \"SecurityProtocol.pdf\",\n    \"taskId\": 10,\n    \"uploadedById\": 19\n  }\n]\n"
  },
  {
    "path": "server/prisma/seedData/comment.json",
    "content": "[\n  {\n    \"id\": 1,\n    \"text\": \"We need to update this design to include new specifications.\",\n    \"taskId\": 1,\n    \"userId\": 2\n  },\n  {\n    \"id\": 2,\n    \"text\": \"Can we meet to discuss the navigation algorithm updates?\",\n    \"taskId\": 2,\n    \"userId\": 4\n  },\n  {\n    \"id\": 3,\n    \"text\": \"This energy solution looks promising, but needs more research.\",\n    \"taskId\": 3,\n    \"userId\": 6\n  },\n  {\n    \"id\": 4,\n    \"text\": \"Let's revise the software development workflow to include agile methodologies.\",\n    \"taskId\": 4,\n    \"userId\": 8\n  },\n  {\n    \"id\": 5,\n    \"text\": \"We should consider newer AI models for better accuracy.\",\n    \"taskId\": 5,\n    \"userId\": 10\n  },\n  {\n    \"id\": 6,\n    \"text\": \"Product testing needs to be more rigorous.\",\n    \"taskId\": 6,\n    \"userId\": 12\n  },\n  {\n    \"id\": 7,\n    \"text\": \"Optimization algorithms are not yet efficient.\",\n    \"taskId\": 7,\n    \"userId\": 14\n  },\n  {\n    \"id\": 8,\n    \"text\": \"Database overhaul could impact current operations negatively.\",\n    \"taskId\": 8,\n    \"userId\": 16\n  },\n  {\n    \"id\": 9,\n    \"text\": \"Infrastructure upgrades must be done during low traffic hours.\",\n    \"taskId\": 9,\n    \"userId\": 18\n  },\n  {\n    \"id\": 10,\n    \"text\": \"Security measures need to be enhanced to prevent data breaches.\",\n    \"taskId\": 10,\n    \"userId\": 20\n  },\n  {\n    \"id\": 11,\n    \"text\": \"Consider using more robust training datasets for AI.\",\n    \"taskId\": 11,\n    \"userId\": 1\n  },\n  {\n    \"id\": 12,\n    \"text\": \"Server security update meeting scheduled for next week.\",\n    \"taskId\": 12,\n    \"userId\": 2\n  },\n  {\n    \"id\": 13,\n    \"text\": \"UX redesign has been well received in initial user tests.\",\n    \"taskId\": 13,\n    \"userId\": 3\n  },\n  {\n    \"id\": 14,\n    \"text\": \"Data analytics implementation needs to account for real-time processing delays.\",\n    \"taskId\": 14,\n    \"userId\": 4\n  },\n  {\n    \"id\": 15,\n    \"text\": \"Encryption project needs to align with international security standards.\",\n    \"taskId\": 15,\n    \"userId\": 5\n  },\n  {\n    \"id\": 16,\n    \"text\": \"Review cloud storage optimization strategies in Q3 meeting.\",\n    \"taskId\": 16,\n    \"userId\": 6\n  },\n  {\n    \"id\": 17,\n    \"text\": \"Hardware compatibility tests to include newer device models.\",\n    \"taskId\": 17,\n    \"userId\": 7\n  },\n  {\n    \"id\": 18,\n    \"text\": \"Visualization tools to support both 2D and 3D data representations.\",\n    \"taskId\": 18,\n    \"userId\": 8\n  },\n  {\n    \"id\": 19,\n    \"text\": \"IoT device prototypes to undergo extensive field testing.\",\n    \"taskId\": 19,\n    \"userId\": 9\n  },\n  {\n    \"id\": 20,\n    \"text\": \"Legacy system upgrade to start with backend databases.\",\n    \"taskId\": 20,\n    \"userId\": 10\n  },\n  {\n    \"id\": 21,\n    \"text\": \"Network security framework should prioritize threat detection improvements.\",\n    \"taskId\": 21,\n    \"userId\": 1\n  },\n  {\n    \"id\": 22,\n    \"text\": \"Application deployment strategies to include Docker integration.\",\n    \"taskId\": 22,\n    \"userId\": 2\n  },\n  {\n    \"id\": 23,\n    \"text\": \"Market analysis should cover competitive product landscapes.\",\n    \"taskId\": 23,\n    \"userId\": 3\n  },\n  {\n    \"id\": 24,\n    \"text\": \"Feedback mechanisms to utilize adaptive questioning techniques.\",\n    \"taskId\": 24,\n    \"userId\": 4\n  },\n  {\n    \"id\": 25,\n    \"text\": \"API integration must ensure data privacy compliance.\",\n    \"taskId\": 25,\n    \"userId\": 5\n  }\n]\n"
  },
  {
    "path": "server/prisma/seedData/project.json",
    "content": "[\n  {\n    \"id\": 1,\n    \"name\": \"Apollo\",\n    \"description\": \"A space exploration project.\",\n    \"startDate\": \"2023-01-01T00:00:00Z\",\n    \"endDate\": \"2023-12-31T00:00:00Z\"\n  },\n  {\n    \"id\": 2,\n    \"name\": \"Beacon\",\n    \"description\": \"Developing advanced navigation systems.\",\n    \"startDate\": \"2023-02-01T00:00:00Z\",\n    \"endDate\": \"2023-10-15T00:00:00Z\"\n  },\n  {\n    \"id\": 3,\n    \"name\": \"Catalyst\",\n    \"description\": \"A project to boost renewable energy use.\",\n    \"startDate\": \"2023-03-05T00:00:00Z\",\n    \"endDate\": \"2024-03-05T00:00:00Z\"\n  },\n  {\n    \"id\": 4,\n    \"name\": \"Delta\",\n    \"description\": \"Delta project for new software development techniques.\",\n    \"startDate\": \"2023-01-20T00:00:00Z\",\n    \"endDate\": \"2023-09-20T00:00:00Z\"\n  },\n  {\n    \"id\": 5,\n    \"name\": \"Echo\",\n    \"description\": \"Echo project focused on AI advancements.\",\n    \"startDate\": \"2023-04-15T00:00:00Z\",\n    \"endDate\": \"2023-11-30T00:00:00Z\"\n  },\n  {\n    \"id\": 6,\n    \"name\": \"Foxtrot\",\n    \"description\": \"Exploring cutting-edge biotechnology.\",\n    \"startDate\": \"2023-02-25T00:00:00Z\",\n    \"endDate\": \"2023-08-25T00:00:00Z\"\n  },\n  {\n    \"id\": 7,\n    \"name\": \"Golf\",\n    \"description\": \"Development of new golf equipment using AI.\",\n    \"startDate\": \"2023-05-10T00:00:00Z\",\n    \"endDate\": \"2023-12-10T00:00:00Z\"\n  },\n  {\n    \"id\": 8,\n    \"name\": \"Hotel\",\n    \"description\": \"Hotel management system overhaul.\",\n    \"startDate\": \"2023-03-01T00:00:00Z\",\n    \"endDate\": \"2024-01-01T00:00:00Z\"\n  },\n  {\n    \"id\": 9,\n    \"name\": \"India\",\n    \"description\": \"Telecommunication infrastructure upgrade.\",\n    \"startDate\": \"2023-06-01T00:00:00Z\",\n    \"endDate\": \"2023-12-01T00:00:00Z\"\n  },\n  {\n    \"id\": 10,\n    \"name\": \"Juliet\",\n    \"description\": \"Initiative to enhance cyber-security measures.\",\n    \"startDate\": \"2023-07-01T00:00:00Z\",\n    \"endDate\": \"2024-02-01T00:00:00Z\"\n  }\n]\n"
  },
  {
    "path": "server/prisma/seedData/projectTeam.json",
    "content": "[\n  { \"id\": 1, \"teamId\": 1, \"projectId\": 1 },\n  { \"id\": 2, \"teamId\": 2, \"projectId\": 1 },\n  { \"id\": 3, \"teamId\": 3, \"projectId\": 1 },\n  { \"id\": 4, \"teamId\": 4, \"projectId\": 1 },\n  { \"id\": 5, \"teamId\": 5, \"projectId\": 1 },\n  { \"id\": 6, \"teamId\": 1, \"projectId\": 2 },\n  { \"id\": 7, \"teamId\": 2, \"projectId\": 2 },\n  { \"id\": 8, \"teamId\": 3, \"projectId\": 2 },\n  { \"id\": 9, \"teamId\": 4, \"projectId\": 2 },\n  { \"id\": 10, \"teamId\": 5, \"projectId\": 2 },\n  { \"id\": 11, \"teamId\": 1, \"projectId\": 3 },\n  { \"id\": 12, \"teamId\": 2, \"projectId\": 3 },\n  { \"id\": 13, \"teamId\": 3, \"projectId\": 3 },\n  { \"id\": 14, \"teamId\": 4, \"projectId\": 3 },\n  { \"id\": 15, \"teamId\": 5, \"projectId\": 3 },\n  { \"id\": 16, \"teamId\": 1, \"projectId\": 4 },\n  { \"id\": 17, \"teamId\": 2, \"projectId\": 4 },\n  { \"id\": 18, \"teamId\": 3, \"projectId\": 4 },\n  { \"id\": 19, \"teamId\": 4, \"projectId\": 4 },\n  { \"id\": 20, \"teamId\": 5, \"projectId\": 4 }\n]\n"
  },
  {
    "path": "server/prisma/seedData/task.json",
    "content": "[\n  {\n    \"id\": 1,\n    \"title\": \"Task 1\",\n    \"description\": \"Design the main module.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Design\",\n    \"startDate\": \"2023-01-10T00:00:00Z\",\n    \"dueDate\": \"2023-04-10T00:00:00Z\",\n    \"projectId\": 1,\n    \"authorUserId\": 1,\n    \"assignedUserId\": 2\n  },\n  {\n    \"id\": 2,\n    \"title\": \"Task 2\",\n    \"description\": \"Implement the navigation algorithm.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Coding\",\n    \"startDate\": \"2023-01-15T00:00:00Z\",\n    \"dueDate\": \"2023-05-15T00:00:00Z\",\n    \"projectId\": 2,\n    \"authorUserId\": 3,\n    \"assignedUserId\": 4\n  },\n  {\n    \"id\": 3,\n    \"title\": \"Task 3\",\n    \"description\": \"Develop renewable energy solutions.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Development\",\n    \"startDate\": \"2023-03-20T00:00:00Z\",\n    \"dueDate\": \"2023-09-20T00:00:00Z\",\n    \"projectId\": 3,\n    \"authorUserId\": 5,\n    \"assignedUserId\": 6\n  },\n  {\n    \"id\": 4,\n    \"title\": \"Task 4\",\n    \"description\": \"Outline new software development workflows.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Planning\",\n    \"startDate\": \"2023-01-25T00:00:00Z\",\n    \"dueDate\": \"2023-06-25T00:00:00Z\",\n    \"projectId\": 4,\n    \"authorUserId\": 7,\n    \"assignedUserId\": 8\n  },\n  {\n    \"id\": 5,\n    \"title\": \"Task 5\",\n    \"description\": \"Research AI models for prediction.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Research\",\n    \"startDate\": \"2023-04-20T00:00:00Z\",\n    \"dueDate\": \"2023-10-20T00:00:00Z\",\n    \"projectId\": 5,\n    \"authorUserId\": 9,\n    \"assignedUserId\": 10\n  },\n  {\n    \"id\": 6,\n    \"title\": \"Task 6\",\n    \"description\": \"Biotech product testing.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Backlog\",\n    \"tags\": \"Testing\",\n    \"startDate\": \"2023-03-01T00:00:00Z\",\n    \"dueDate\": \"2023-08-01T00:00:00Z\",\n    \"projectId\": 6,\n    \"authorUserId\": 11,\n    \"assignedUserId\": 12\n  },\n  {\n    \"id\": 7,\n    \"title\": \"Task 7\",\n    \"description\": \"AI optimization for golf equipment.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Optimization\",\n    \"startDate\": \"2023-05-15T00:00:00Z\",\n    \"dueDate\": \"2023-11-15T00:00:00Z\",\n    \"projectId\": 7,\n    \"authorUserId\": 13,\n    \"assignedUserId\": 14\n  },\n  {\n    \"id\": 8,\n    \"title\": \"Task 8\",\n    \"description\": \"Overhaul of the database for hotel management.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Database\",\n    \"startDate\": \"2023-04-01T00:00:00Z\",\n    \"dueDate\": \"2023-10-01T00:00:00Z\",\n    \"projectId\": 8,\n    \"authorUserId\": 15,\n    \"assignedUserId\": 16\n  },\n  {\n    \"id\": 9,\n    \"title\": \"Task 9\",\n    \"description\": \"Upgrade telecom infrastructure.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Infrastructure\",\n    \"startDate\": \"2023-06-10T00:00:00Z\",\n    \"dueDate\": \"2023-12-10T00:00:00Z\",\n    \"projectId\": 9,\n    \"authorUserId\": 17,\n    \"assignedUserId\": 18\n  },\n  {\n    \"id\": 10,\n    \"title\": \"Task 10\",\n    \"description\": \"Enhance security protocols.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Security\",\n    \"startDate\": \"2023-07-05T00:00:00Z\",\n    \"dueDate\": \"2024-01-05T00:00:00Z\",\n    \"projectId\": 10,\n    \"authorUserId\": 19,\n    \"assignedUserId\": 20\n  },\n  {\n    \"id\": 11,\n    \"title\": \"Task 11\",\n    \"description\": \"Finalize AI training parameters.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"AI, Training\",\n    \"startDate\": \"2023-01-20T00:00:00Z\",\n    \"dueDate\": \"2023-05-20T00:00:00Z\",\n    \"projectId\": 5,\n    \"authorUserId\": 1,\n    \"assignedUserId\": 3\n  },\n  {\n    \"id\": 12,\n    \"title\": \"Task 12\",\n    \"description\": \"Update server security protocols.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Security\",\n    \"startDate\": \"2023-02-10T00:00:00Z\",\n    \"dueDate\": \"2023-06-10T00:00:00Z\",\n    \"projectId\": 1,\n    \"authorUserId\": 2,\n    \"assignedUserId\": 4\n  },\n  {\n    \"id\": 13,\n    \"title\": \"Task 13\",\n    \"description\": \"Redesign user interface for better UX.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Design, UX\",\n    \"startDate\": \"2023-03-15T00:00:00Z\",\n    \"dueDate\": \"2023-07-15T00:00:00Z\",\n    \"projectId\": 2,\n    \"authorUserId\": 5,\n    \"assignedUserId\": 6\n  },\n  {\n    \"id\": 14,\n    \"title\": \"Task 14\",\n    \"description\": \"Implement real-time data analytics.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Analytics\",\n    \"startDate\": \"2023-04-05T00:00:00Z\",\n    \"dueDate\": \"2023-08-05T00:00:00Z\",\n    \"projectId\": 3,\n    \"authorUserId\": 7,\n    \"assignedUserId\": 8\n  },\n  {\n    \"id\": 15,\n    \"title\": \"Task 15\",\n    \"description\": \"Develop end-to-end encryption solution.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Encryption\",\n    \"startDate\": \"2023-05-01T00:00:00Z\",\n    \"dueDate\": \"2023-09-01T00:00:00Z\",\n    \"projectId\": 4,\n    \"authorUserId\": 9,\n    \"assignedUserId\": 10\n  },\n  {\n    \"id\": 16,\n    \"title\": \"Task 16\",\n    \"description\": \"Optimize cloud storage usage.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Backlog\",\n    \"tags\": \"Cloud, Storage\",\n    \"startDate\": \"2023-06-15T00:00:00Z\",\n    \"dueDate\": \"2023-10-15T00:00:00Z\",\n    \"projectId\": 5,\n    \"authorUserId\": 11,\n    \"assignedUserId\": 12\n  },\n  {\n    \"id\": 17,\n    \"title\": \"Task 17\",\n    \"description\": \"Test software for hardware compatibility.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Testing, Hardware\",\n    \"startDate\": \"2023-07-10T00:00:00Z\",\n    \"dueDate\": \"2023-11-10T00:00:00Z\",\n    \"projectId\": 6,\n    \"authorUserId\": 13,\n    \"assignedUserId\": 14\n  },\n  {\n    \"id\": 18,\n    \"title\": \"Task 18\",\n    \"description\": \"Create new data visualization tools.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Visualization\",\n    \"startDate\": \"2023-08-05T00:00:00Z\",\n    \"dueDate\": \"2023-12-05T00:00:00Z\",\n    \"projectId\": 7,\n    \"authorUserId\": 15,\n    \"assignedUserId\": 16\n  },\n  {\n    \"id\": 19,\n    \"title\": \"Task 19\",\n    \"description\": \"Build prototype for new IoT devices.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"IoT\",\n    \"startDate\": \"2023-09-01T00:00:00Z\",\n    \"dueDate\": \"2024-01-01T00:00:00Z\",\n    \"projectId\": 8,\n    \"authorUserId\": 17,\n    \"assignedUserId\": 18\n  },\n  {\n    \"id\": 20,\n    \"title\": \"Task 20\",\n    \"description\": \"Update legacy systems to new tech standards.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Legacy, Upgrade\",\n    \"startDate\": \"2023-10-10T00:00:00Z\",\n    \"dueDate\": \"2024-02-10T00:00:00Z\",\n    \"projectId\": 9,\n    \"authorUserId\": 19,\n    \"assignedUserId\": 20\n  },\n  {\n    \"id\": 21,\n    \"title\": \"Task 21\",\n    \"description\": \"Establish new network security framework.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Security\",\n    \"startDate\": \"2023-01-30T00:00:00Z\",\n    \"dueDate\": \"2023-05-30T00:00:00Z\",\n    \"projectId\": 10,\n    \"authorUserId\": 1,\n    \"assignedUserId\": 3\n  },\n  {\n    \"id\": 22,\n    \"title\": \"Task 22\",\n    \"description\": \"Revise application deployment strategies.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Deployment\",\n    \"startDate\": \"2023-02-20T00:00:00Z\",\n    \"dueDate\": \"2023-06-20T00:00:00Z\",\n    \"projectId\": 1,\n    \"authorUserId\": 2,\n    \"assignedUserId\": 4\n  },\n  {\n    \"id\": 23,\n    \"title\": \"Task 23\",\n    \"description\": \"Conduct market analysis for product fit.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Market Analysis\",\n    \"startDate\": \"2023-03-25T00:00:00Z\",\n    \"dueDate\": \"2023-07-25T00:00:00Z\",\n    \"projectId\": 2,\n    \"authorUserId\": 5,\n    \"assignedUserId\": 6\n  },\n  {\n    \"id\": 24,\n    \"title\": \"Task 24\",\n    \"description\": \"Optimize user feedback collection mechanism.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Feedback\",\n    \"startDate\": \"2023-04-15T00:00:00Z\",\n    \"dueDate\": \"2023-08-15T00:00:00Z\",\n    \"projectId\": 3,\n    \"authorUserId\": 7,\n    \"assignedUserId\": 8\n  },\n  {\n    \"id\": 25,\n    \"title\": \"Task 25\",\n    \"description\": \"Integrate new API for third-party services.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"API Integration\",\n    \"startDate\": \"2023-05-05T00:00:00Z\",\n    \"dueDate\": \"2023-09-05T00:00:00Z\",\n    \"projectId\": 4,\n    \"authorUserId\": 9,\n    \"assignedUserId\": 10\n  },\n  {\n    \"id\": 26,\n    \"title\": \"Task 26\",\n    \"description\": \"Update internal tooling for development teams.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Backlog\",\n    \"tags\": \"Tooling\",\n    \"startDate\": \"2023-06-25T00:00:00Z\",\n    \"dueDate\": \"2023-10-25T00:00:00Z\",\n    \"projectId\": 5,\n    \"authorUserId\": 11,\n    \"assignedUserId\": 12\n  },\n  {\n    \"id\": 27,\n    \"title\": \"Task 27\",\n    \"description\": \"Prepare cloud migration strategy document.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Cloud Migration\",\n    \"startDate\": \"2023-07-20T00:00:00Z\",\n    \"dueDate\": \"2023-11-20T00:00:00Z\",\n    \"projectId\": 6,\n    \"authorUserId\": 13,\n    \"assignedUserId\": 14\n  },\n  {\n    \"id\": 28,\n    \"title\": \"Task 28\",\n    \"description\": \"Design scalable database architecture.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Medium\",\n    \"tags\": \"Database Design\",\n    \"startDate\": \"2023-08-15T00:00:00Z\",\n    \"dueDate\": \"2023-12-15T00:00:00Z\",\n    \"projectId\": 7,\n    \"authorUserId\": 15,\n    \"assignedUserId\": 16\n  },\n  {\n    \"id\": 29,\n    \"title\": \"Task 29\",\n    \"description\": \"Prototype new mobile technology.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Mobile Tech\",\n    \"startDate\": \"2023-09-10T00:00:00Z\",\n    \"dueDate\": \"2024-01-10T00:00:00Z\",\n    \"projectId\": 8,\n    \"authorUserId\": 17,\n    \"assignedUserId\": 18\n  },\n  {\n    \"id\": 30,\n    \"title\": \"Task 30\",\n    \"description\": \"Enhance data encryption levels.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Encryption\",\n    \"startDate\": \"2023-10-15T00:00:00Z\",\n    \"dueDate\": \"2024-02-15T00:00:00Z\",\n    \"projectId\": 9,\n    \"authorUserId\": 19,\n    \"assignedUserId\": 20\n  },\n  {\n    \"id\": 31,\n    \"title\": \"Task 31\",\n    \"description\": \"Refactor backend code for better maintainability.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Refactoring, Backend\",\n    \"startDate\": \"2023-11-01T00:00:00Z\",\n    \"dueDate\": \"2024-03-01T00:00:00Z\",\n    \"projectId\": 10,\n    \"authorUserId\": 20,\n    \"assignedUserId\": 1\n  },\n  {\n    \"id\": 32,\n    \"title\": \"Task 32\",\n    \"description\": \"Expand the network infrastructure to support increased traffic.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Medium\",\n    \"tags\": \"Networking, Infrastructure\",\n    \"startDate\": \"2023-11-05T00:00:00Z\",\n    \"dueDate\": \"2024-01-05T00:00:00Z\",\n    \"projectId\": 1,\n    \"authorUserId\": 2,\n    \"assignedUserId\": 3\n  },\n  {\n    \"id\": 33,\n    \"title\": \"Task 33\",\n    \"description\": \"Create a new client dashboard interface.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"UI, Dashboard\",\n    \"startDate\": \"2023-11-10T00:00:00Z\",\n    \"dueDate\": \"2024-02-10T00:00:00Z\",\n    \"projectId\": 2,\n    \"authorUserId\": 4,\n    \"assignedUserId\": 5\n  },\n  {\n    \"id\": 34,\n    \"title\": \"Task 34\",\n    \"description\": \"Develop an automated testing framework for new software releases.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Medium\",\n    \"tags\": \"Testing, Automation\",\n    \"startDate\": \"2023-11-15T00:00:00Z\",\n    \"dueDate\": \"2024-03-15T00:00:00Z\",\n    \"projectId\": 3,\n    \"authorUserId\": 6,\n    \"assignedUserId\": 7\n  },\n  {\n    \"id\": 35,\n    \"title\": \"Task 35\",\n    \"description\": \"Optimize database queries to improve application performance.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Database, Optimization\",\n    \"startDate\": \"2023-11-20T00:00:00Z\",\n    \"dueDate\": \"2024-01-20T00:00:00Z\",\n    \"projectId\": 4,\n    \"authorUserId\": 8,\n    \"assignedUserId\": 9\n  },\n  {\n    \"id\": 36,\n    \"title\": \"Task 36\",\n    \"description\": \"Implement end-user training for new system features.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Backlog\",\n    \"tags\": \"Training, User Experience\",\n    \"startDate\": \"2023-11-25T00:00:00Z\",\n    \"dueDate\": \"2024-01-25T00:00:00Z\",\n    \"projectId\": 5,\n    \"authorUserId\": 10,\n    \"assignedUserId\": 11\n  },\n  {\n    \"id\": 37,\n    \"title\": \"Task 37\",\n    \"description\": \"Conduct a comprehensive security audit of the existing infrastructure.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Security, Audit\",\n    \"startDate\": \"2023-12-01T00:00:00Z\",\n    \"dueDate\": \"2024-02-01T00:00:00Z\",\n    \"projectId\": 6,\n    \"authorUserId\": 12,\n    \"assignedUserId\": 13\n  },\n  {\n    \"id\": 38,\n    \"title\": \"Task 38\",\n    \"description\": \"Revise mobile app to incorporate new payment integrations.\",\n    \"status\": \"To Do\",\n    \"priority\": \"Medium\",\n    \"tags\": \"Mobile, Payments\",\n    \"startDate\": \"2023-12-05T00:00:00Z\",\n    \"dueDate\": \"2024-02-05T00:00:00Z\",\n    \"projectId\": 7,\n    \"authorUserId\": 14,\n    \"assignedUserId\": 15\n  },\n  {\n    \"id\": 39,\n    \"title\": \"Task 39\",\n    \"description\": \"Update cloud configuration to optimize costs.\",\n    \"status\": \"Work In Progress\",\n    \"priority\": \"Urgent\",\n    \"tags\": \"Cloud, Cost Saving\",\n    \"startDate\": \"2023-12-10T00:00:00Z\",\n    \"dueDate\": \"2024-02-10T00:00:00Z\",\n    \"projectId\": 8,\n    \"authorUserId\": 16,\n    \"assignedUserId\": 17\n  },\n  {\n    \"id\": 40,\n    \"title\": \"Task 40\",\n    \"description\": \"Implement automated backup procedures for critical data.\",\n    \"status\": \"To Do\",\n    \"priority\": \"High\",\n    \"tags\": \"Backup, Automation\",\n    \"startDate\": \"2023-12-15T00:00:00Z\",\n    \"dueDate\": \"2024-02-15T00:00:00Z\",\n    \"projectId\": 9,\n    \"authorUserId\": 18,\n    \"assignedUserId\": 19\n  }\n]\n"
  },
  {
    "path": "server/prisma/seedData/taskAssignment.json",
    "content": "[\n  { \"id\": 1, \"userId\": 1, \"taskId\": 1 },\n  { \"id\": 2, \"userId\": 2, \"taskId\": 2 },\n  { \"id\": 3, \"userId\": 3, \"taskId\": 3 },\n  { \"id\": 4, \"userId\": 4, \"taskId\": 4 },\n  { \"id\": 5, \"userId\": 5, \"taskId\": 5 },\n  { \"id\": 6, \"userId\": 6, \"taskId\": 6 },\n  { \"id\": 7, \"userId\": 7, \"taskId\": 7 },\n  { \"id\": 8, \"userId\": 8, \"taskId\": 8 },\n  { \"id\": 9, \"userId\": 9, \"taskId\": 9 },\n  { \"id\": 10, \"userId\": 10, \"taskId\": 10 },\n  { \"id\": 11, \"userId\": 11, \"taskId\": 11 },\n  { \"id\": 12, \"userId\": 12, \"taskId\": 12 },\n  { \"id\": 13, \"userId\": 13, \"taskId\": 13 },\n  { \"id\": 14, \"userId\": 14, \"taskId\": 14 },\n  { \"id\": 15, \"userId\": 15, \"taskId\": 15 },\n  { \"id\": 16, \"userId\": 16, \"taskId\": 16 },\n  { \"id\": 17, \"userId\": 17, \"taskId\": 17 },\n  { \"id\": 18, \"userId\": 18, \"taskId\": 18 },\n  { \"id\": 19, \"userId\": 19, \"taskId\": 19 },\n  { \"id\": 20, \"userId\": 20, \"taskId\": 20 },\n  { \"id\": 21, \"userId\": 1, \"taskId\": 21 },\n  { \"id\": 22, \"userId\": 2, \"taskId\": 22 },\n  { \"id\": 23, \"userId\": 3, \"taskId\": 23 },\n  { \"id\": 24, \"userId\": 4, \"taskId\": 24 },\n  { \"id\": 25, \"userId\": 5, \"taskId\": 25 },\n  { \"id\": 26, \"userId\": 6, \"taskId\": 26 },\n  { \"id\": 27, \"userId\": 7, \"taskId\": 27 },\n  { \"id\": 28, \"userId\": 8, \"taskId\": 28 },\n  { \"id\": 29, \"userId\": 9, \"taskId\": 29 },\n  { \"id\": 30, \"userId\": 10, \"taskId\": 30 }\n]\n"
  },
  {
    "path": "server/prisma/seedData/team.json",
    "content": "[\n  {\n    \"teamName\": \"Quantum Innovations\",\n    \"productOwnerUserId\": 11,\n    \"projectManagerUserId\": 2\n  },\n  {\n    \"teamName\": \"Nebula Research\",\n    \"productOwnerUserId\": 13,\n    \"projectManagerUserId\": 4\n  },\n  {\n    \"teamName\": \"Orion Solutions\",\n    \"productOwnerUserId\": 15,\n    \"projectManagerUserId\": 6\n  },\n  {\n    \"teamName\": \"Krypton Developments\",\n    \"productOwnerUserId\": 17,\n    \"projectManagerUserId\": 8\n  },\n  {\n    \"teamName\": \"Zenith Technologies\",\n    \"productOwnerUserId\": 19,\n    \"projectManagerUserId\": 10\n  }\n]\n"
  },
  {
    "path": "server/prisma/seedData/user.json",
    "content": "[\n  {\n    \"username\": \"AliceJones\",\n    \"teamId\": 1,\n    \"profilePictureUrl\": \"p1.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174001\"\n  },\n  {\n    \"username\": \"BobSmith\",\n    \"teamId\": 2,\n    \"profilePictureUrl\": \"p2.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174002\"\n  },\n  {\n    \"username\": \"CarolWhite\",\n    \"teamId\": 3,\n    \"profilePictureUrl\": \"p3.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174003\"\n  },\n  {\n    \"username\": \"DaveBrown\",\n    \"teamId\": 4,\n    \"profilePictureUrl\": \"p4.jpeg\",\n    \"cognitoId\": \"213b7530-1031-70e0-67e9-fe0805e18fb3\"\n  },\n  {\n    \"username\": \"EveClark\",\n    \"teamId\": 5,\n    \"profilePictureUrl\": \"p5.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174005\"\n  },\n  {\n    \"username\": \"FrankWright\",\n    \"teamId\": 1,\n    \"profilePictureUrl\": \"p6.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174006\"\n  },\n  {\n    \"username\": \"GraceHall\",\n    \"teamId\": 2,\n    \"profilePictureUrl\": \"p7.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174007\"\n  },\n  {\n    \"username\": \"HenryAllen\",\n    \"teamId\": 3,\n    \"profilePictureUrl\": \"p8.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174008\"\n  },\n  {\n    \"username\": \"IdaMartin\",\n    \"teamId\": 4,\n    \"profilePictureUrl\": \"p9.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174009\"\n  },\n  {\n    \"username\": \"JohnDoe\",\n    \"teamId\": 5,\n    \"profilePictureUrl\": \"p10.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174010\"\n  },\n  {\n    \"username\": \"LauraAdams\",\n    \"teamId\": 1,\n    \"profilePictureUrl\": \"p11.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174011\"\n  },\n  {\n    \"username\": \"NormanBates\",\n    \"teamId\": 2,\n    \"profilePictureUrl\": \"p12.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174012\"\n  },\n  {\n    \"username\": \"OliviaPace\",\n    \"teamId\": 3,\n    \"profilePictureUrl\": \"p13.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174013\"\n  },\n  {\n    \"username\": \"PeterQuill\",\n    \"teamId\": 4,\n    \"profilePictureUrl\": \"p1.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174014\"\n  },\n  {\n    \"username\": \"QuincyAdams\",\n    \"teamId\": 5,\n    \"profilePictureUrl\": \"p2.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174015\"\n  },\n  {\n    \"username\": \"RachelGreen\",\n    \"teamId\": 1,\n    \"profilePictureUrl\": \"p3.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174016\"\n  },\n  {\n    \"username\": \"SteveJobs\",\n    \"teamId\": 2,\n    \"profilePictureUrl\": \"p4.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174017\"\n  },\n  {\n    \"username\": \"TinaFey\",\n    \"teamId\": 3,\n    \"profilePictureUrl\": \"p5.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174018\"\n  },\n  {\n    \"username\": \"UrsulaMonroe\",\n    \"teamId\": 4,\n    \"profilePictureUrl\": \"p6.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174019\"\n  },\n  {\n    \"username\": \"VictorHugo\",\n    \"teamId\": 5,\n    \"profilePictureUrl\": \"p7.jpeg\",\n    \"cognitoId\": \"123e4567-e89b-12d3-a456-426614174020\"\n  }\n]\n"
  },
  {
    "path": "server/src/controllers/projectControllers.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\nimport { Request, Response } from \"express\";\n\nconst prisma = new PrismaClient();\n\nexport const getProjects = async (\n  req: Request,\n  res: Response\n): Promise<void> => {\n  try {\n    const project = await prisma.project.findMany();\n    res.json(project);\n  } catch (error: any) {\n    res\n      .status(500)\n      .json({ error: `Failed to fetch projects ${error.message}` });\n  }\n};\n\nexport const createProject = async (\n  req: Request,\n  res: Response\n): Promise<void> => {\n  const { name, description, startDate, endDate } = req.body;\n\n  try {\n    const newProject = await prisma.project.create({\n      data: {\n        name,\n        description,\n        startDate,\n        endDate,\n      },\n    });\n\n    res.status(201).json(newProject);\n  } catch (error: any) {\n    res\n      .status(500)\n      .json({ error: `Failed to create project ${error.message}` });\n  }\n};\n"
  },
  {
    "path": "server/src/controllers/searchControllers.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\nimport { Request, Response } from \"express\";\n\nconst prisma = new PrismaClient();\n\nexport const search = async (req: Request, res: Response): Promise<void> => {\n  const { query } = req.query;\n\n  try {\n    const tasks = await prisma.task.findMany({\n      where: {\n        OR: [\n          { title: { contains: query as string } },\n          { description: { contains: query as string } },\n        ],\n      },\n    });\n\n    const projects = await prisma.project.findMany({\n      where: {\n        OR: [\n          { name: { contains: query as string } },\n          { description: { contains: query as string } },\n        ],\n      },\n    });\n\n    const users = await prisma.user.findMany({\n      where: {\n        OR: [{ username: { contains: query as string } }],\n      },\n    });\n\n    res.json({ tasks, projects, users });\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to search ${error.message}` });\n  }\n};\n"
  },
  {
    "path": "server/src/controllers/taskControllers.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\nimport { Request, Response } from \"express\";\n\nconst prisma = new PrismaClient();\n\nexport const getTasks = async (req: Request, res: Response): Promise<void> => {\n  const { projectId } = req.query;\n\n  try {\n    const tasks = await prisma.task.findMany({\n      where: {\n        projectId: Number(projectId),\n      },\n      include: {\n        author: true,\n        assignee: true,\n        comments: true,\n        attachments: true,\n      },\n    });\n    res.json(tasks);\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to fetch tasks ${error.message}` });\n  }\n};\n\nexport const createTasks = async (\n  req: Request,\n  res: Response\n): Promise<void> => {\n  const {\n    title,\n    description,\n    status,\n    priority,\n    tags,\n    startDate,\n    dueDate,\n    points,\n    projectId,\n    authorUserId,\n    assignedUserId,\n  } = req.body;\n\n  try {\n    const newTask = await prisma.task.create({\n      data: {\n        title,\n        description,\n        status,\n        priority,\n        tags,\n        startDate,\n        dueDate,\n        points,\n        projectId,\n        authorUserId,\n        assignedUserId,\n      },\n    });\n\n    res.status(201).json(newTask);\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to create task ${error.message}` });\n  }\n};\n\nexport const updateTasks = async (\n  req: Request,\n  res: Response\n): Promise<void> => {\n  const { taskId } = req.params;\n  const { status } = req.body;\n\n  try {\n    const updateTasks = await prisma.task.update({\n      where: {\n        id: Number(taskId),\n      },\n      data: {\n        status: status,\n      },\n    });\n    res.json(updateTasks);\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to update task ${error.message}` });\n  }\n};\n\nexport const getUserTasks = async (\n  req: Request,\n  res: Response\n): Promise<void> => {\n  const { userId } = req.params;\n  /*   console.log(\"🚀 ~ userId:\", userId); */\n\n  try {\n    const tasks = await prisma.task.findMany({\n      where: {\n        OR: [\n          { authorUserId: Number(userId) },\n          { assignedUserId: Number(userId) },\n        ],\n      },\n      include: {\n        author: true,\n        assignee: true,\n      },\n    });\n    res.json(tasks);\n  } catch (error: any) {\n    res\n      .status(500)\n      .json({ error: `Failed to get user tasks ${error.message}` });\n  }\n};\n"
  },
  {
    "path": "server/src/controllers/teamControllers.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\nimport { Request, Response } from \"express\";\n\nconst prisma = new PrismaClient();\n\nexport const getTeams = async (req: Request, res: Response): Promise<void> => {\n  try {\n    const teams = await prisma.team.findMany();\n\n    const teamWithUsernames = await Promise.all(\n      teams.map(async (team: any) => {\n        const productOwner = await prisma.user.findUnique({\n          where: { userId: team.productOwnerUserId! },\n          select: { username: true },\n        });\n        const projectManager = await prisma.user.findUnique({\n          where: { userId: team.projectManagerUserId! },\n          select: { username: true },\n        });\n\n        return {\n          ...team,\n          productOwnerUsername: productOwner?.username,\n          projectManagerUsername: projectManager?.username,\n        };\n      })\n    );\n\n    res.json(teamWithUsernames);\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to fetch teams ${error.message}` });\n  }\n};\n"
  },
  {
    "path": "server/src/controllers/usercontrollers.ts",
    "content": "import { PrismaClient } from \"@prisma/client\";\nimport { Request, Response } from \"express\";\n\nconst prisma = new PrismaClient();\n\nexport const getUsers = async (req: Request, res: Response): Promise<void> => {\n  try {\n    const users = await prisma.user.findMany();\n    res.json(users);\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to fetch users ${error.message}` });\n  }\n};\n\nexport const getUser = async (req: Request, res: Response): Promise<void> => {\n  const { cognitoId } = req.params;\n\n  try {\n    const users = await prisma.user.findUnique({\n      where: {\n        cognitoId: cognitoId,\n      },\n    });\n    res.json(users);\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to fetch user ${error.message}` });\n  }\n};\n\nexport const postUser = async (req: Request, res: Response) => {\n  try {\n    const {\n      username,\n      cognitoId,\n      profilePictureUrl = \"i1.jpg\",\n      teamId = 1,\n    } = req.body;\n\n    const newUsers = await prisma.user.create({\n      data: {\n        username,\n        cognitoId,\n        profilePictureUrl,\n        teamId,\n      },\n    });\n    res.json({ message: \"User created successfully\", newUsers });\n  } catch (error: any) {\n    res.status(500).json({ error: `Failed to fetch users ${error.message}` });\n  }\n};\n"
  },
  {
    "path": "server/src/index.ts",
    "content": "import bodyParser from \"body-parser\";\nimport cors from \"cors\";\nimport dotenv from \"dotenv\";\nimport express, { Request, Response } from \"express\";\nimport helmet from \"helmet\";\nimport morgan from \"morgan\";\nimport projectRoutes from \"./routes/projectRoutes\";\nimport searchRoutes from \"./routes/searchRoutes\";\nimport taskRoutes from \"./routes/taskRoute\";\nimport userRoutes from \"./routes/userRoutes\";\nimport teamRoutes from \"./routes/teamRoutes\";\nimport { PrismaClient } from \"@prisma/client/extension\";\n\ndotenv.config();\n\nconst app = express();\napp.use(express.json());\napp.use(helmet());\napp.use(helmet.crossOriginResourcePolicy({ policy: \"cross-origin\" }));\napp.use(morgan(\"common\"));\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: false }));\napp.use(cors());\n\napp.get(\"/\", (req, res) => {\n  res.send(\"This is Home Route\");\n});\n\napp.use(\"/projects\", projectRoutes);\napp.use(\"/tasks\", taskRoutes);\napp.use(\"/search\", searchRoutes);\napp.use(\"/users\", userRoutes);\napp.use(\"/teams\", teamRoutes);\n\nconst port = Number(process.env.PORT) || 3000;\napp.listen(port, \"0.0.0.0\", () => {\n  console.log(`Server running on port ${port}`);\n});\n"
  },
  {
    "path": "server/src/routes/projectRoutes.ts",
    "content": "import { Router } from \"express\";\nimport { createProject, getProjects } from \"../controllers/projectControllers\";\n\nconst router = Router();\n\nrouter.get(\"/\", getProjects);\nrouter.post(\"/\", createProject);\n\nexport default router;\n"
  },
  {
    "path": "server/src/routes/searchRoutes.ts",
    "content": "import { Router } from \"express\";\nimport { search } from \"../controllers/searchControllers\";\n\nconst router = Router();\n\nrouter.get(\"/\", search);\n\nexport default router;\n"
  },
  {
    "path": "server/src/routes/taskRoute.ts",
    "content": "import { Router } from \"express\";\nimport {\n  createTasks,\n  getTasks,\n  getUserTasks,\n  updateTasks,\n} from \"../controllers/taskControllers\";\n\nconst router = Router();\n\nrouter.get(\"/\", getTasks);\nrouter.post(\"/\", createTasks);\nrouter.patch(\"/:taskId/status\", updateTasks);\nrouter.get(\"/user/:userId\", getUserTasks);\n\nexport default router;\n"
  },
  {
    "path": "server/src/routes/teamRoutes.ts",
    "content": "import { Router } from \"express\";\nimport { getTeams } from \"../controllers/teamControllers\";\n\nconst router = Router();\n\nrouter.get(\"/\", getTeams);\n\nexport default router;\n"
  },
  {
    "path": "server/src/routes/userRoutes.ts",
    "content": "import { Router } from \"express\";\nimport { getUser, getUsers, postUser } from \"../controllers/usercontrollers\";\n\nconst router = Router();\n\nrouter.get(\"/\", getUsers);\nrouter.get(\"/:cognitoId\", getUser);\nrouter.post(\"/\", postUser);\n\nexport default router;\n"
  },
  {
    "path": "server/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig to read more about this file */\n\n    /* Projects */\n    // \"incremental\": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\n    // \"composite\": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */\n    // \"tsBuildInfoFile\": \"./.tsbuildinfo\",              /* Specify the path to .tsbuildinfo incremental compilation file. */\n    // \"disableSourceOfProjectReferenceRedirect\": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */\n    // \"disableSolutionSearching\": true,                 /* Opt a project out of multi-project reference checking when editing. */\n    // \"disableReferencedProjectLoad\": true,             /* Reduce the number of projects loaded automatically by TypeScript. */\n\n    /* Language and Environment */\n    \"target\": \"es2016\" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,\n    // \"lib\": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */\n    // \"jsx\": \"preserve\",                                /* Specify what JSX code is generated. */\n    // \"experimentalDecorators\": true,                   /* Enable experimental support for legacy experimental decorators. */\n    // \"emitDecoratorMetadata\": true,                    /* Emit design-type metadata for decorated declarations in source files. */\n    // \"jsxFactory\": \"\",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\n    // \"jsxFragmentFactory\": \"\",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\n    // \"jsxImportSource\": \"\",                            /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\n    // \"reactNamespace\": \"\",                             /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\n    // \"noLib\": true,                                    /* Disable including any library files, including the default lib.d.ts. */\n    // \"useDefineForClassFields\": true,                  /* Emit ECMAScript-standard-compliant class fields. */\n    // \"moduleDetection\": \"auto\",                        /* Control what method is used to detect module-format JS files. */\n\n    /* Modules */\n    \"module\": \"NodeNext\" /* Specify what module code is generated. */,\n    // \"rootDir\": \"./\",                                  /* Specify the root folder within your source files. */\n    \"moduleResolution\": \"nodenext\" /* Specify how TypeScript looks up a file from a given module specifier. */,\n    // \"baseUrl\": \"./\",                                  /* Specify the base directory to resolve non-relative module names. */\n    // \"paths\": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */\n    // \"rootDirs\": [],                                   /* Allow multiple folders to be treated as one when resolving modules. */\n    // \"typeRoots\": [],                                  /* Specify multiple folders that act like './node_modules/@types'. */\n    // \"types\": [],                                      /* Specify type package names to be included without being referenced in a source file. */\n    // \"allowUmdGlobalAccess\": true,                     /* Allow accessing UMD globals from modules. */\n    // \"moduleSuffixes\": [],                             /* List of file name suffixes to search when resolving a module. */\n    // \"allowImportingTsExtensions\": true,               /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */\n    // \"rewriteRelativeImportExtensions\": true,          /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */\n    // \"resolvePackageJsonExports\": true,                /* Use the package.json 'exports' field when resolving package imports. */\n    // \"resolvePackageJsonImports\": true,                /* Use the package.json 'imports' field when resolving imports. */\n    // \"customConditions\": [],                           /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */\n    // \"noUncheckedSideEffectImports\": true,             /* Check side effect imports. */\n    \"resolveJsonModule\": true /* Enable importing .json files. */,\n    // \"allowArbitraryExtensions\": true,                 /* Enable importing files with any extension, provided a declaration file is present. */\n    // \"noResolve\": true,                                /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\n\n    /* JavaScript Support */\n    // \"allowJs\": true,                                  /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\n    // \"checkJs\": true,                                  /* Enable error reporting in type-checked JavaScript files. */\n    // \"maxNodeModuleJsDepth\": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\n\n    /* Emit */\n    // \"declaration\": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */\n    // \"declarationMap\": true,                           /* Create sourcemaps for d.ts files. */\n    // \"emitDeclarationOnly\": true,                      /* Only output d.ts files and not JavaScript files. */\n    // \"sourceMap\": true,                                /* Create source map files for emitted JavaScript files. */\n    // \"inlineSourceMap\": true,                          /* Include sourcemap files inside the emitted JavaScript. */\n    // \"noEmit\": true,                                   /* Disable emitting files from a compilation. */\n    // \"outFile\": \"./\",                                  /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\n    \"outDir\": \"./dist\" /* Specify an output folder for all emitted files. */,\n    // \"removeComments\": true,                           /* Disable emitting comments. */\n    // \"importHelpers\": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\n    // \"downlevelIteration\": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */\n    // \"sourceRoot\": \"\",                                 /* Specify the root path for debuggers to find the reference source code. */\n    // \"mapRoot\": \"\",                                    /* Specify the location where debugger should locate map files instead of generated locations. */\n    // \"inlineSources\": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */\n    // \"emitBOM\": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\n    // \"newLine\": \"crlf\",                                /* Set the newline character for emitting files. */\n    // \"stripInternal\": true,                            /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\n    // \"noEmitHelpers\": true,                            /* Disable generating custom helper functions like '__extends' in compiled output. */\n    // \"noEmitOnError\": true,                            /* Disable emitting files if any type checking errors are reported. */\n    // \"preserveConstEnums\": true,                       /* Disable erasing 'const enum' declarations in generated code. */\n    // \"declarationDir\": \"./\",                           /* Specify the output directory for generated declaration files. */\n\n    /* Interop Constraints */\n    // \"isolatedModules\": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */\n    // \"verbatimModuleSyntax\": true,                     /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */\n    // \"isolatedDeclarations\": true,                     /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */\n    // \"allowSyntheticDefaultImports\": true,             /* Allow 'import x from y' when a module doesn't have a default export. */\n    \"esModuleInterop\": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,\n    // \"preserveSymlinks\": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\n    \"forceConsistentCasingInFileNames\": true /* Ensure that casing is correct in imports. */,\n\n    /* Type Checking */\n    \"strict\": true /* Enable all strict type-checking options. */,\n    // \"noImplicitAny\": true,                            /* Enable error reporting for expressions and declarations with an implied 'any' type. */\n    // \"strictNullChecks\": true,                         /* When type checking, take into account 'null' and 'undefined'. */\n    // \"strictFunctionTypes\": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\n    // \"strictBindCallApply\": true,                      /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\n    // \"strictPropertyInitialization\": true,             /* Check for class properties that are declared but not set in the constructor. */\n    // \"strictBuiltinIteratorReturn\": true,              /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */\n    // \"noImplicitThis\": true,                           /* Enable error reporting when 'this' is given the type 'any'. */\n    // \"useUnknownInCatchVariables\": true,               /* Default catch clause variables as 'unknown' instead of 'any'. */\n    // \"alwaysStrict\": true,                             /* Ensure 'use strict' is always emitted. */\n    // \"noUnusedLocals\": true,                           /* Enable error reporting when local variables aren't read. */\n    // \"noUnusedParameters\": true,                       /* Raise an error when a function parameter isn't read. */\n    // \"exactOptionalPropertyTypes\": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */\n    // \"noImplicitReturns\": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */\n    // \"noFallthroughCasesInSwitch\": true,               /* Enable error reporting for fallthrough cases in switch statements. */\n    // \"noUncheckedIndexedAccess\": true,                 /* Add 'undefined' to a type when accessed using an index. */\n    // \"noImplicitOverride\": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */\n    // \"noPropertyAccessFromIndexSignature\": true,       /* Enforces using indexed accessors for keys declared using an indexed type. */\n    // \"allowUnusedLabels\": true,                        /* Disable error reporting for unused labels. */\n    // \"allowUnreachableCode\": true,                     /* Disable error reporting for unreachable code. */\n\n    /* Completeness */\n    // \"skipDefaultLibCheck\": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */\n    \"skipLibCheck\": true /* Skip type checking all .d.ts files. */\n  },\n  \"include\": [\"src/**/*\", \"src/data/**/*.json\", \"prisma/**/*\"]\n}\n"
  }
]