ChatRoom is my personal project, focusing on real-time communication. The application allows users to create and join rooms to engage in conversations with others in real-time. In ChatRoom, you can manage various aspects of communication and provide users with a space to share their thoughts and discuss different topics.
In this personal project of mine, it's important to acknowledge that there may be bugs and areas where improvements are needed. In the world of programming, as in any creative endeavour, the pursuit of flawless perfection can be a highly demanding endeavour.
- Implement JWT-authentication
- Understand how Socket.io works
- Learn more React, CSS, Node.js, Express.js and SQL
Before you can get started, you should have Node.js and PostgreSQL installed.
- Clone the repository
git clone https://github.com/sambbaahh/chatroom.git
- Navigate to the project's root directory
cd chatroom
-
Navigate to the project's server directory
cd server
-
Install project dependencies
npm install
-
Create .env file
PGUSER="YOUR_POSTGRESQL_USER" PGPASSWORD="YOUR_POSTGRESQL_PASSWORD" PGHOST="YOUR_POSTGRESQL_HOST_NAME" PGPORT=YOUR_POSTGRESQL_PORT PGDATABASE="YOUR_POSTGRESQL_DATABASE" ADMINPASSWORD="PASSWORD_FOR_ADMIN_USER"
-
Generate public and private keypair for authentication
node generateKeyPair.js
-
Start in development mode (nodemon)
npm run dev
OR
Start in production mode
npm start
At startup, the server will automatically create the database if it does not exist.
-
Open a new terminal window/tab
-
Navigate to the project's client directory
cd client
-
Install project dependencies
npm install
-
Start the development server
npm run dev
After following the installation steps, open your web browser and go to http://localhost:5173 to view the React project. Additionally, there is possibility to create a build of the React code and deploy it alongside the backend on the server.
With these steps, you have set up the server and client parts of the ChatRoom application. The server should be running on one terminal window/tab, and the client should be running on another.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Sami Kukkonen - LinkedIn - samikukkonen00@hotmail.com
Project Link: https://github.com/sambbaahh/chatroom