-
-
Save burakorkmez/55f3ba08a85388db4758ae0848072ccf to your computer and use it in GitHub Desktop.
| const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | |
| if (!emailRegex.test(email)) { | |
| return res.status(400).json({ message: "Invalid email format" }); | |
| } |
| export const THEMES = [ | |
| { | |
| name: "light", | |
| label: "Light", | |
| colors: ["#ffffff", "#5a67d8", "#8b5cf6", "#1a202c"], | |
| }, | |
| { | |
| name: "dark", | |
| label: "Dark", | |
| colors: ["#1f2937", "#8b5cf6", "#ec4899", "#1a202c"], | |
| }, | |
| { | |
| name: "cupcake", | |
| label: "Cupcake", | |
| colors: ["#f5f5f4", "#65c3c8", "#ef9fbc", "#291334"], | |
| }, | |
| { | |
| name: "forest", | |
| label: "Forest", | |
| colors: ["#1f1d1d", "#3ebc96", "#70c217", "#e2e8f0"], | |
| }, | |
| { | |
| name: "bumblebee", | |
| label: "Bumblebee", | |
| colors: ["#ffffff", "#f8e36f", "#f0d50c", "#1c1917"], | |
| }, | |
| { | |
| name: "emerald", | |
| label: "Emerald", | |
| colors: ["#ffffff", "#66cc8a", "#3b82f6", "#1e3a8a"], | |
| }, | |
| { | |
| name: "corporate", | |
| label: "Corporate", | |
| colors: ["#ffffff", "#4b6bfb", "#7b92b2", "#1d232a"], | |
| }, | |
| { | |
| name: "synthwave", | |
| label: "Synthwave", | |
| colors: ["#2d1b69", "#e779c1", "#58c7f3", "#f8f8f2"], | |
| }, | |
| { | |
| name: "retro", | |
| label: "Retro", | |
| colors: ["#e4d8b4", "#ea6962", "#6aaa64", "#282425"], | |
| }, | |
| { | |
| name: "cyberpunk", | |
| label: "Cyberpunk", | |
| colors: ["#ffee00", "#ff7598", "#75d1f0", "#1a103d"], | |
| }, | |
| { | |
| name: "valentine", | |
| label: "Valentine", | |
| colors: ["#f0d6e8", "#e96d7b", "#a991f7", "#37243c"], | |
| }, | |
| { | |
| name: "halloween", | |
| label: "Halloween", | |
| colors: ["#0d0d0d", "#ff7800", "#006400", "#ffffff"], | |
| }, | |
| { | |
| name: "garden", | |
| label: "Garden", | |
| colors: ["#e9e7e7", "#ec4899", "#16a34a", "#374151"], | |
| }, | |
| { | |
| name: "aqua", | |
| label: "Aqua", | |
| colors: ["#193549", "#4cd4e3", "#9059ff", "#f8d766"], | |
| }, | |
| { | |
| name: "lofi", | |
| label: "Lofi", | |
| colors: ["#0f0f0f", "#1a1919", "#232323", "#2c2c2c"], | |
| }, | |
| { | |
| name: "pastel", | |
| label: "Pastel", | |
| colors: ["#f7f3f5", "#d1c1d7", "#a1e3d8", "#4a98f1"], | |
| }, | |
| { | |
| name: "fantasy", | |
| label: "Fantasy", | |
| colors: ["#ffe7d6", "#a21caf", "#3b82f6", "#f59e0b"], | |
| }, | |
| { | |
| name: "wireframe", | |
| label: "Wireframe", | |
| colors: ["#e6e6e6", "#b3b3b3", "#b3b3b3", "#888888"], | |
| }, | |
| { | |
| name: "black", | |
| label: "Black", | |
| colors: ["#000000", "#191919", "#313131", "#4a4a4a"], | |
| }, | |
| { | |
| name: "luxury", | |
| label: "Luxury", | |
| colors: ["#171618", "#1e293b", "#94589c", "#d4a85a"], | |
| }, | |
| { | |
| name: "dracula", | |
| label: "Dracula", | |
| colors: ["#282a36", "#ff79c6", "#bd93f9", "#f8f8f2"], | |
| }, | |
| { | |
| name: "cmyk", | |
| label: "CMYK", | |
| colors: ["#f0f0f0", "#0891b2", "#ec4899", "#facc15"], | |
| }, | |
| { | |
| name: "autumn", | |
| label: "Autumn", | |
| colors: ["#f2f2f2", "#8c1f11", "#f28c18", "#6f4930"], | |
| }, | |
| { | |
| name: "business", | |
| label: "Business", | |
| colors: ["#f5f5f5", "#1e40af", "#3b82f6", "#f97316"], | |
| }, | |
| { | |
| name: "acid", | |
| label: "Acid", | |
| colors: ["#110e0e", "#ff00f2", "#ff7a00", "#99ff01"], | |
| }, | |
| { | |
| name: "lemonade", | |
| label: "Lemonade", | |
| colors: ["#ffffff", "#67e8f9", "#f5d742", "#2c3333"], | |
| }, | |
| { | |
| name: "night", | |
| label: "Night", | |
| colors: ["#0f172a", "#38bdf8", "#818cf8", "#e2e8f0"], | |
| }, | |
| { | |
| name: "coffee", | |
| label: "Coffee", | |
| colors: ["#20161f", "#dd9866", "#497174", "#eeeeee"], | |
| }, | |
| { | |
| name: "winter", | |
| label: "Winter", | |
| colors: ["#ffffff", "#0284c7", "#d946ef", "#0f172a"], | |
| }, | |
| { | |
| name: "dim", | |
| label: "Dim", | |
| colors: ["#1c1c27", "#10b981", "#ff5a5f", "#0f172a"], | |
| }, | |
| { | |
| name: "nord", | |
| label: "Nord", | |
| colors: ["#eceff4", "#5e81ac", "#81a1c1", "#3b4252"], | |
| }, | |
| { | |
| name: "sunset", | |
| label: "Sunset", | |
| colors: ["#1e293b", "#f5734c", "#ec4899", "#ffffff"], | |
| }, | |
| ]; | |
| export const LANGUAGES = [ | |
| "English", | |
| "Spanish", | |
| "French", | |
| "German", | |
| "Mandarin", | |
| "Japanese", | |
| "Korean", | |
| "Hindi", | |
| "Russian", | |
| "Portuguese", | |
| "Arabic", | |
| "Italian", | |
| "Turkish", | |
| "Dutch", | |
| ]; | |
| export const LANGUAGE_TO_FLAG = { | |
| english: "gb", | |
| spanish: "es", | |
| french: "fr", | |
| german: "de", | |
| mandarin: "cn", | |
| japanese: "jp", | |
| korean: "kr", | |
| hindi: "in", | |
| russian: "ru", | |
| portuguese: "pt", | |
| arabic: "sa", | |
| italian: "it", | |
| turkish: "tr", | |
| dutch: "nl", | |
| }; |
| import mongoose from "mongoose"; | |
| const friendRequestSchema = new mongoose.Schema( | |
| { | |
| sender: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "User", | |
| required: true, | |
| }, | |
| recipient: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "User", | |
| required: true, | |
| }, | |
| status: { | |
| type: String, | |
| enum: ["pending", "accepted"], | |
| default: "pending", | |
| }, | |
| }, | |
| { | |
| timestamps: true, | |
| } | |
| ); | |
| const FriendRequest = mongoose.model("FriendRequest", friendRequestSchema); | |
| export default FriendRequest; |
| @tailwind base; | |
| @tailwind components; | |
| @tailwind utilities; | |
| .str-chat__channel { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| background: linear-gradient(to bottom, #c9e8c9, #b7e7bb); | |
| height: 100%; | |
| } | |
| .str-chat__container { | |
| max-width: 1200px; | |
| width: 100%; | |
| height: 80% !important; | |
| margin: 0 auto !important; | |
| border-radius: 8px; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); | |
| overflow: hidden; | |
| } | |
| .str-chat__list { | |
| background-color: #ffffff; | |
| padding: 12px; | |
| } | |
| .str-chat__list-notifications { | |
| display: none; | |
| } | |
| .str-chat__message-input { | |
| border-top: 1px solid #ddd; | |
| } |
| "dependencies": { | |
| "bcryptjs": "^3.0.2", | |
| "cookie-parser": "^1.4.7", | |
| "cors": "^2.8.5", | |
| "dotenv": "^16.5.0", | |
| "express": "^4.21.0", | |
| "jsonwebtoken": "^9.0.2", | |
| "mongoose": "^8.13.2", | |
| "stream-chat": "^8.60.0", | |
| }, | |
| "devDependencies": { | |
| "nodemon": "^3.1.9" | |
| } |
just now starting in web development, I enjoy your videos. Thanks!
All time best tutorial for begginers and advanced,thanks you friend
thanks alot bro this project gonna help us alot
thanks a lot bro I have learned many thinks from your video thanks for supporting
Thank you so much! You're doing a great job truly, thank you from the bottom of my heart.
thanku so much . Sir can you make one project which include kafka,redis and system design part with mern stack ?
Thank you so much! I respect you!
tailwind css not working
tailwind css not working
maybe the library not installed
chat folder not supported please help
Nice one , you team like a master. Thanks
chat folder not supported please help
Mern Stack project Video calling Realtime Chat App & SOcial App 5:29:00 hrs please check in your video Brother its not Working .
There is problem in your Chat component
Uncaught TypeError: Cannot read properties of undefined (reading 'registerSubscriptions')
stream-chat.js?v=656d80dc:13077 Consecutive calls to connectUser is detected, ideally you should only call this function once in your app.
Can you explain brother and send it to [email protected]
burakorkmez
Mern Stack Project: Video Calling Realtime ChatApp & Social App .In this project there is aproblem in Chat Component Can you please correct it Brother.
onsecutive calls to connectUser is detected, ideally you should only call this function once in your app.
This error hits in console
_callee$ @ stream-chat.js?v=656d80dc:13077Understand this warning
stream-chat-react.js?v=656d80dc:75627 Uncaught TypeError: Cannot read properties of undefined (reading 'registerSubscriptions')
hello Guys ! First of all , thank you for this project , but I am doing the this project and i am facing this isssue of chat , Can't open the chat even video call, Could you send a solution for this emaiol , please : [email protected]
Nice one burakorkmez, I have been following your page and I have learnt alot, thanks.