Aller au contenu principal

Chat platform

· 2 minutes de lecture
Damien Arrachequesne

Hello everyone!

A new sample project is available: the Chat platform.

The source code can be found here.

for newcomers

Socket.IO is a library that enables low-latency, bidirectional and event-based communication between a client and a server.

To achieve this, it automatically selects the best available low-level transport between WebTransport, WebSocket and HTTP long-polling, based on the capabilities of the client platform and the network.

Goal

The goal of this project is to provide a full-blown project based on Socket.IO with:

  • authentication/user registration
  • public and private messaging
  • proper reconnection management
  • presence management

The source code is provided with a permissive MIT license, so that you can use it/extend it to your will.

How to use

Check out the code here and follow the instructions in the README.

Features

Channel-based messages

Screenshot of a public channel

Private messages

Screenshot of a private channel

Tools

Server

The server is written in plain JavaScript, with the express, express-session and passport packages. The database is PostgreSQL.

Client

The client is a Vue.js single-page application, with the vue-router and pinia packages. It uses Bootstrap v5 for the styles.

Roadmap

  • React client (link)
  • MongoDB server (link)

Any additional suggestion is welcome!