Relay is a real-time chat application built using the MERN stack, Socket.io, TailwindCSS, and Daisy UI. It enables seamless real-time communication with modern features for user interaction and management.
- Authentication & Authorization with JWT
- Real-time Messaging using Socket.io
- Online User Status
- Global State Management with Zustand
- Responsive UI using TailwindCSS & Daisy UI
- Error Handling on both client and server sides
- Frontend: React, TailwindCSS, Daisy UI, Socket.io client, Zustand (for state management), React Router.
- Backend: Node.js, Express.js (for API routes, authentication), Socket.io server.
- Database: MongoDB (for storing user data and messages).
- Authentication: JWT (JSON Web Token) for secure login.
- Deployment: Render.com for live deployment.
To get started with the development environment, clone the repository and install dependencies:
git clone https://github.com/asha-saini06/relay-chat-app.git
cd relay-chat-app
npm install
Before running the app, you need to configure the backend by setting up the necessary environment variables in a .env
file:
MONGODB_URI
: The connection string to your MongoDB database (e.g., MongoDB Atlas).PORT
: The port on which the server will run (default is5000
).JWT_SECRET
: A secret key used for JWT authentication to ensure security in token generation and verification.CLOUDINARY_CLOUD_NAME
: Your Cloudinary cloud name for media file uploads.CLOUDINARY_API_KEY
: The API key provided by Cloudinary for authentication.CLOUDINARY_API_SECRET
: The API secret used by Cloudinary for secure file upload requests.
MONGODB_URI=mongodb+srv://username:password@cluster0.mongodb.net/your-database-name?retryWrites=true&w=majority
PORT=5000
JWT_SECRET=your-very-secure-secret-key
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
Make sure to replace the placeholders with your actual credentials and settings. Once the environment variables are set up, you're ready to proceed with running the backend server.
To run the app locally, execute the following command:
npm run dev
This will start the app at http://localhost:3000
.
This app is deployed on Render.com for public access. The live app can be accessed here:
Contributions are welcome! If you'd like to contribute to the project, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.