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
yarn
to 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_URL
as an environment variable, or provide the following:DATABASE_NAME
DATABASE_HOST
DATABASE_USER
DATABASE_PASSWORD
DATABASE_PORT
COOKIE_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:server
to start the backend server. - Run
yarn dev:client
to 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.