├── .eslintrc.json ├── .gitignore ├── .prettierignore ├── README.md ├── actions ├── getConversationById.ts ├── getConversations.ts ├── getCurrentUser.ts ├── getMessages.ts ├── getSession.ts └── getUsers.ts ├── app ├── (site) │ ├── components │ │ ├── AuthForm.tsx │ │ └── AuthSocialButton.tsx │ └── page.tsx ├── api │ ├── auth │ │ └── [...nextauth] │ │ │ └── route.ts │ ├── conversations │ │ ├── [conversationId] │ │ │ ├── route.ts │ │ │ └── seen │ │ │ │ └── route.ts │ │ └── route.ts │ ├── messages │ │ └── route.ts │ ├── register │ │ └── route.ts │ └── settings │ │ └── route.ts ├── conversations │ ├── [conversationId] │ │ └── page.tsx │ ├── layout.tsx │ ├── loading.tsx │ └── page.tsx ├── layout.tsx └── users │ ├── layout.tsx │ ├── loading.tsx │ └── page.tsx ├── components ├── ActiveStatus.tsx ├── Avatar.tsx ├── AvatarGroup.tsx ├── Button.tsx ├── ClientOnly.tsx ├── ConversationBox.tsx ├── ConversationList.tsx ├── EmptyState.tsx ├── UserBox.tsx ├── UserList.tsx ├── conversations │ ├── Body.tsx │ ├── Form.tsx │ ├── Header.tsx │ ├── MessageBox.tsx │ ├── MessageInput.tsx │ └── ProfileDrawer.tsx ├── input │ ├── Input.tsx │ └── Select.tsx ├── model │ ├── ConfirmModal.tsx │ ├── GroupChatModal.tsx │ ├── ImageModel.tsx │ ├── LoadingModal.tsx │ ├── Modal.tsx │ └── SettingsModal.tsx └── sidebar │ ├── DesktopItem.tsx │ ├── DesktopSidebar.tsx │ ├── MobileFooter.tsx │ ├── MobileItem.tsx │ └── Sidebar.tsx ├── context ├── AuthContext.tsx ├── ThemeProvider.tsx └── ToastContainerBar.tsx ├── hooks ├── useActiveChannel.ts ├── useActiveList.ts ├── useConversation.ts ├── useOtherUser.ts └── useRoutes.ts ├── libs ├── prismadb.ts └── pusher.ts ├── middleware.ts ├── next.config.js ├── package.json ├── pages └── api │ └── pusher │ └── auth.ts ├── postcss.config.js ├── prisma └── schema.prisma ├── public ├── assets │ └── placeholder.jpg ├── next.svg └── vercel.svg ├── styles └── globals.css ├── tailwind.config.js ├── tsconfig.json └── type.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/.prettierignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/README.md -------------------------------------------------------------------------------- /actions/getConversationById.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/actions/getConversationById.ts -------------------------------------------------------------------------------- /actions/getConversations.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/actions/getConversations.ts -------------------------------------------------------------------------------- /actions/getCurrentUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/actions/getCurrentUser.ts -------------------------------------------------------------------------------- /actions/getMessages.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/actions/getMessages.ts -------------------------------------------------------------------------------- /actions/getSession.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/actions/getSession.ts -------------------------------------------------------------------------------- /actions/getUsers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/actions/getUsers.ts -------------------------------------------------------------------------------- /app/(site)/components/AuthForm.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/(site)/components/AuthForm.tsx -------------------------------------------------------------------------------- /app/(site)/components/AuthSocialButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/(site)/components/AuthSocialButton.tsx -------------------------------------------------------------------------------- /app/(site)/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/(site)/page.tsx -------------------------------------------------------------------------------- /app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/auth/[...nextauth]/route.ts -------------------------------------------------------------------------------- /app/api/conversations/[conversationId]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/conversations/[conversationId]/route.ts -------------------------------------------------------------------------------- /app/api/conversations/[conversationId]/seen/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/conversations/[conversationId]/seen/route.ts -------------------------------------------------------------------------------- /app/api/conversations/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/conversations/route.ts -------------------------------------------------------------------------------- /app/api/messages/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/messages/route.ts -------------------------------------------------------------------------------- /app/api/register/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/register/route.ts -------------------------------------------------------------------------------- /app/api/settings/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/api/settings/route.ts -------------------------------------------------------------------------------- /app/conversations/[conversationId]/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/conversations/[conversationId]/page.tsx -------------------------------------------------------------------------------- /app/conversations/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/conversations/layout.tsx -------------------------------------------------------------------------------- /app/conversations/loading.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/conversations/loading.tsx -------------------------------------------------------------------------------- /app/conversations/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/conversations/page.tsx -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/layout.tsx -------------------------------------------------------------------------------- /app/users/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/users/layout.tsx -------------------------------------------------------------------------------- /app/users/loading.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/users/loading.tsx -------------------------------------------------------------------------------- /app/users/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/app/users/page.tsx -------------------------------------------------------------------------------- /components/ActiveStatus.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/ActiveStatus.tsx -------------------------------------------------------------------------------- /components/Avatar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/Avatar.tsx -------------------------------------------------------------------------------- /components/AvatarGroup.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/AvatarGroup.tsx -------------------------------------------------------------------------------- /components/Button.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/Button.tsx -------------------------------------------------------------------------------- /components/ClientOnly.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/ClientOnly.tsx -------------------------------------------------------------------------------- /components/ConversationBox.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/ConversationBox.tsx -------------------------------------------------------------------------------- /components/ConversationList.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/ConversationList.tsx -------------------------------------------------------------------------------- /components/EmptyState.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/EmptyState.tsx -------------------------------------------------------------------------------- /components/UserBox.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/UserBox.tsx -------------------------------------------------------------------------------- /components/UserList.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/UserList.tsx -------------------------------------------------------------------------------- /components/conversations/Body.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/conversations/Body.tsx -------------------------------------------------------------------------------- /components/conversations/Form.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/conversations/Form.tsx -------------------------------------------------------------------------------- /components/conversations/Header.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/conversations/Header.tsx -------------------------------------------------------------------------------- /components/conversations/MessageBox.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/conversations/MessageBox.tsx -------------------------------------------------------------------------------- /components/conversations/MessageInput.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/conversations/MessageInput.tsx -------------------------------------------------------------------------------- /components/conversations/ProfileDrawer.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/conversations/ProfileDrawer.tsx -------------------------------------------------------------------------------- /components/input/Input.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/input/Input.tsx -------------------------------------------------------------------------------- /components/input/Select.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/input/Select.tsx -------------------------------------------------------------------------------- /components/model/ConfirmModal.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/model/ConfirmModal.tsx -------------------------------------------------------------------------------- /components/model/GroupChatModal.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/model/GroupChatModal.tsx -------------------------------------------------------------------------------- /components/model/ImageModel.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/model/ImageModel.tsx -------------------------------------------------------------------------------- /components/model/LoadingModal.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/model/LoadingModal.tsx -------------------------------------------------------------------------------- /components/model/Modal.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/model/Modal.tsx -------------------------------------------------------------------------------- /components/model/SettingsModal.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/model/SettingsModal.tsx -------------------------------------------------------------------------------- /components/sidebar/DesktopItem.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/sidebar/DesktopItem.tsx -------------------------------------------------------------------------------- /components/sidebar/DesktopSidebar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/sidebar/DesktopSidebar.tsx -------------------------------------------------------------------------------- /components/sidebar/MobileFooter.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/sidebar/MobileFooter.tsx -------------------------------------------------------------------------------- /components/sidebar/MobileItem.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/sidebar/MobileItem.tsx -------------------------------------------------------------------------------- /components/sidebar/Sidebar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/components/sidebar/Sidebar.tsx -------------------------------------------------------------------------------- /context/AuthContext.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/context/AuthContext.tsx -------------------------------------------------------------------------------- /context/ThemeProvider.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/context/ThemeProvider.tsx -------------------------------------------------------------------------------- /context/ToastContainerBar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/context/ToastContainerBar.tsx -------------------------------------------------------------------------------- /hooks/useActiveChannel.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/hooks/useActiveChannel.ts -------------------------------------------------------------------------------- /hooks/useActiveList.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/hooks/useActiveList.ts -------------------------------------------------------------------------------- /hooks/useConversation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/hooks/useConversation.ts -------------------------------------------------------------------------------- /hooks/useOtherUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/hooks/useOtherUser.ts -------------------------------------------------------------------------------- /hooks/useRoutes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/hooks/useRoutes.ts -------------------------------------------------------------------------------- /libs/prismadb.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/libs/prismadb.ts -------------------------------------------------------------------------------- /libs/pusher.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/libs/pusher.ts -------------------------------------------------------------------------------- /middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/middleware.ts -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/next.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/package.json -------------------------------------------------------------------------------- /pages/api/pusher/auth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/pages/api/pusher/auth.ts -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/postcss.config.js -------------------------------------------------------------------------------- /prisma/schema.prisma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/prisma/schema.prisma -------------------------------------------------------------------------------- /public/assets/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/public/assets/placeholder.jpg -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/public/next.svg -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/public/vercel.svg -------------------------------------------------------------------------------- /styles/globals.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/styles/globals.css -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/tailwind.config.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/tsconfig.json -------------------------------------------------------------------------------- /type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SashenJayathilaka/Messenger-Clone/HEAD/type.ts --------------------------------------------------------------------------------