├── components ├── modals │ ├── index.js │ └── newchat │ │ └── index.jsx ├── index.js ├── loader │ └── index.jsx ├── message │ └── index.jsx ├── chat │ └── index.jsx ├── userinfo │ └── index.jsx ├── sidebar │ └── index.jsx └── chatscreen │ └── index.jsx ├── public ├── favicon.ico ├── WhatsApp_Logo.webp └── vercel.svg ├── styles └── global.css ├── utils └── getRecipientEmail.js ├── postcss.config.js ├── .gitignore ├── firebase.js ├── package.json ├── pages ├── _app.js ├── index.jsx ├── chat │ └── [id].jsx └── login.jsx ├── README.md ├── tailwind.config.js └── yarn.lock /components/modals/index.js: -------------------------------------------------------------------------------- 1 | export { NewChat } from "./newchat"; 2 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/passionate-dev219/next-whatsapp-project/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/WhatsApp_Logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/passionate-dev219/next-whatsapp-project/HEAD/public/WhatsApp_Logo.webp -------------------------------------------------------------------------------- /styles/global.css: -------------------------------------------------------------------------------- 1 | @import "https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap"; 2 | -------------------------------------------------------------------------------- /utils/getRecipientEmail.js: -------------------------------------------------------------------------------- 1 | const getRecipientEmail = (users, userLoggedIn) => { 2 | return users?.filter( 3 | (userToFilter) => userToFilter !== userLoggedIn?.email 4 | )[0]; 5 | }; 6 | 7 | export default getRecipientEmail; 8 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | // If you want to use other PostCSS plugins, see the following: 2 | // https://tailwindcss.com/docs/using-with-preprocessors 3 | module.exports = { 4 | plugins: { 5 | tailwindcss: {}, 6 | autoprefixer: {}, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /components/index.js: -------------------------------------------------------------------------------- 1 | export { Sidebar } from "./sidebar"; 2 | export { Loader } from "./loader"; 3 | export { Chat } from "./chat"; 4 | export { ChatScreen } from "./chatscreen"; 5 | export { Message } from "./message"; 6 | export { UserInfo } from "./userinfo"; 7 | export * from "./modals"; 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /components/loader/index.jsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | 3 | import { FoldingCube } from "better-react-spinkit"; 4 | 5 | const Loader = () => { 6 | return ( 7 |
Please type the email of the user you'd like to chat with...
6 | 11 |You are connected
60 |61 | Feel free to chat with anyone you wish! 62 |
63 |{message?.message}
73 |74 | {message?.timestamp 75 | ? dayjs(message.timestamp.toDate()).format("LT") 76 | : "..."} 77 |
78 |This chat is encrypted.
84 |45 | Updates & Acknowledgements 46 |
47 |96 | © {new Date().getFullYear()} - Aktindo Inc. | v0.0.1-alpha 97 |
98 |Contact Information
43 |65 | {recipient ? recipient.username : recipientEmail} 66 |
67 |68 | {recipientSnapshot ? ( 69 | recipient?.lastSeen?.toDate() ? ( 70 |
71 | Last active:
75 | Last active: Unavailable 76 |
77 | ) 78 | ) : ( 79 | "..." 80 | )} 81 | 82 | {recipient ? ( 83 | recipient.email === "akshit.singla.dps@gmail.com" ? ( 84 |107 | Developer Notes 108 |
109 |
110 | Version: v0.0.1-alpha
111 |
112 | Build: 1000
113 |
114 | {new Date().toLocaleDateString()}
115 |
119 | Made with
130 | Last active:
134 | Last active: Unavailable 135 |
136 | ) 137 | ) : ( 138 | "..." 139 | )} 140 |162 | Messages are end-to-end encrypted. No one outside of this chat, 163 | not even WhatsApp, can read or listen to them. Click to learn 164 | more. 165 |
166 |