How pankajjoshi-05/multi-threaded-chat-app works
Project type and purpose
• This is a full-stack MERN (MongoDB, Express, React, Node) real-time chat application.
• It supports JWT authentication, WebSocket-based messaging (Socket.IO), media/file sharing (Multer + Cloudinary), AES-256 encryption (Node Crypto + worker threads), presence indicators, email notifications, and a responsive UI (Tailwind + DaisyUI).
File structure
• Top-level split: frontend/ (React SPA) and backend/ (Node/Express API + WebSocket server).
• Backend subfolders follow an MVC-style pattern:
• config/ – database connection
• controllers/ – business logic for auth, chat, user
• routes/ – REST & WebSocket endpoints
• models/ – Mongoose schemas
• middleware/ – token verification, file uploads
• utils/ – email templates, token generation, event emitter, cors setup
• workers/ – encryption/decryption via Node Worker Threads
• Frontend is component-driven:
• components/ by feature (auth, chat, core UI, panels, skeletons, ui)
• pages/ – route targets (Login, Chat, Settings, etc.)
• store/ – Zustand state slices (auth, chat, socket, theme, user)
• hooks/, constants/, App.jsx & routing
README for additional insights
• Confirms tech stack, architectural highlights (real-time via Socket.IO, worker threads for background encryption, Cloudinary for media, Nodemailer for email).
• Emphasizes modular structure and environment variable requirements.