A full-stack web application that allows users to seamlessly connect, and chat with their friends.
Built using MongoDB, Express.js, Vite (React + TypeScript), Node.js
and TailwindCSS for a clean, responsive UI.
- User authentication with JWT + refresh tokens
- Protected routes for secure navigation
- Add and manage friends with user search functionality
- Create private chat rooms and invite friends to join
- Real-time messaging with WebSocket (Socket.IO)
- Persistent chat history using MongoDB
- Mobile-responsive UI with TailwindCSS
Node.js and a preferred code editor of choice like VS Code are required for this installation.
First, clone the repository.
git clone https://github.com/JDhillon24/ChatHaven.git
Open a terminal in your preferred editor of choice and run
# Start the backend
cd backend
npm install
npm run dev
## In a separate terminal, start the frontend
cd frontend
npm install
npm run dev
The backend and frontend should now be running locally on your machine at localhost:5000 and localhost:5173, respectively.
NOTE: Some environment variables are required on the frontend and backend.
VITE_API_URL=URL_OF_YOUR_BACKEND_API
VITE_SOCKET_URL=SAME_AS_ABOVE_URL
ACCESS_TOKEN_SECRET=YOUR_ACCESS_TOKEN_SECRET
MONGODB_URI=YOUR_MONGODB_CONNECION_STRING
REFRESH_TOKEN_SECRET=YOUR_REFRESH_TOKEN_SECRET
EMAIL_USER=EMAIL_FOR_SENDING_VERIFY_OR_RESET_EMAILS
EMAIL_PASS=PASSKEY_FOR_ABOVE_EMAIL
- Typing indicators to show when a user is composing a message
- Message reactions (e.g., emojis) to enhance interaction
- Online/offline presence status
- Message read receipts for more detailed message tracking
If you'd like to connect or have any questions about the project, feel free to reach out:

