Skip to content

A real-time chat application built with React.js, Node.js, and TypeScript. It uses WebSockets for instant messaging and has a modular architecture with separate client, server, and socket services.

License

Notifications You must be signed in to change notification settings

armanmartirosyan/real-time-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Chat Application

A full-stack real-time chat application built with React.js, Node.js, and TypeScript. It supports user registration, login, chat creation, and real-time messaging using WebSockets.

Table of Contents

Project Structure

  • client/ – Frontend in React.js for user registration, login, and chatting interface.
  • server/ – Backend in Node.js/TypeScript handling REST operations like chat creation, message handling, data fetching, and user authentication.
  • socket/ – WebSocket server enabling real-time chat functionality.

Getting Started

Follow these steps to run the project locally.

1. Clone the Repository

git clone https://github.com/your-username/your-chat-project.git
cd your-chat-project

2. Create Environment Files

For each directory (client/, server/, and socket/), create a .env file based on the provided .env-example template.

cp client/.env-example client/.env
cp server/.env-example server/.env
cp socket/.env-example socket/.env

Update the variables in each .env file as needed.

3. Create private and public keys

For each directory (server/, and socket/), create a certificates using this command.

openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private.pem -out public.pem

4. Install Dependencies

Run the following command in each directory to install dependencies:

npm install

5. Run the Application

To start all services in development mode, run the following in each directory:

npm run dev

or you can run in production mode.

npm start

Make sure all services are running simultaneously for full functionality.

Features

  • User registration and login
  • Create and join chats
  • Send and receive messages in real-time
  • RESTful APIs for chat and message management
  • WebSocket communication for real-time interaction

Feel free to contribute or raise issues if you encounter any problems!

About

A real-time chat application built with React.js, Node.js, and TypeScript. It uses WebSockets for instant messaging and has a modular architecture with separate client, server, and socket services.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors