Both Backend and Frontend should be considered as separated projects each one with its dependencies. if you are about to contribute to this project or just to play around with the code I suggest cloning each master branch in different folders
the Core concept here revolves around WebSocket, instead of the classic server polling architecture, using an event-based communication allows for (almost) real-time communication between the server and our clients, who will listen and react to the changes
this image explains dead simple how the backend works
For handling Web Socket connections and event emitting and listening I'm using Socket.io, creating a server instance inside the express app. For authentication I've opted for a JWT strategy, at the project's current state it does not include a refreshToken functionality, logging you out once your access token is rejected by the server.
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 ⭐!
-
Fork the project
-
Clone the repository
git clone -b master-backend https://github.com/AlejoTorres2001/chat.io.git
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request