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.
- 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.
Follow these steps to run the project locally.
git clone https://github.com/your-username/your-chat-project.git
cd your-chat-projectFor 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/.envUpdate the variables in each .env file as needed.
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.pemRun the following command in each directory to install dependencies:
npm installTo start all services in development mode, run the following in each directory:
npm run devor you can run in production mode.
npm startMake sure all services are running simultaneously for full functionality.
- 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!