Overview
React Live Messenger is a real-time chat web application that allows users to log in, add friends, and communicate with them in real-time. The application is built using React.js for the frontend and Node.js, Express.js, and Socket.io for the backend. Authentication is done using JWT, and the database used is PostgreSQL with Redis for caching.
Features
- Real-time chat: Users can communicate with their friends in real-time.
- User authentication: Secure user authentication is implemented using JWT.
- Friend management: Users can add friends and manage their friend list.
- Database integration: The application uses PostgreSQL for data storage and Redis for caching.
Installation
To run the React Live Messenger project, follow these steps:
- Clone the repository.
- CD into the repository and run
yarnto install dependencies. - Ensure you have a Redis instance listening on localhost:6379, or define an environment variable named
REDIS_URL. - Have a PostgreSQL database running and provide either
DATABASE_URLas an environment variable, or provide the following:DATABASE_NAMEDATABASE_HOSTDATABASE_USERDATABASE_PASSWORDDATABASE_PORTCOOKIE_SECRET
- Initialize the database by running the queries found in
packages/server/database.sql. - All environment variables must be defined in a file named
.env. - Run
yarn dev:serverto start the backend server. - Run
yarn dev:clientto start the frontend server.
Summary
React Live Messenger is a real-time chat web application built using React.js and Node.js. It allows users to log in, add friends, and communicate with them in real-time. The application uses PostgreSQL for data storage, Redis for caching, and JWT for user authentication. To run the project, clone the repository, install dependencies, configure the database and Redis, and start the backend and frontend servers.