A website-based chat application, inspired by Discord, created for my A-Level (2019-2020 Exam) Computer Science coursework. Its focus was on being privacy-friendly, by letting people host their own chat servers (which would store all the data) for their own communities, be it family, friends, group activities, etc. It was also very accessible, as all it required was a Javascript-enabled web browser with an active internet connection.
Note: The program is missing useful, key features since it was my first Javascript project, created for my A-Level coursework, which was cancelled in March 2020 due to COVID-19 and I haven't worked on it since.
Click to watch the Youtube Video Demo
- Socket.io Chat Example
- Login/register page tutorial, which I used as a basis for mine
- When a user joins their first chat server, the client will mistakenly think it's offline unless you reload the webpage
- Various aspects of the code aren't optimised, since I was prioritising features over polish
- Multiple active chat servers can break the UI at times
Make sure you have the following installed:
- Node.js (tested with v14)
- Python (tested with 3.8, needed for
sqlite3
, make sure its accessible via yourPATH
/environment variables)
Note: Only been actively tested on x64 Windows and occasionally on x64 Debian-based Linux.
Steps to install and run the project:
- Clone the repo
- In the root folder of the project, type the following command to install the dependencies:
$ npm install
- Run each command in a separate process/window/tab:
$ npm run web_server
$ npm run chat_server
- Go to the address, http://localhost:8000 in your browser and on the login page, use the following details (for test purposes):
Username: testuser1, testuser2 or testuser3
Password: password123*
- Once successfully logged in, you can join the chat server you're running by accessing the server selector in the top right, with the following icon:
To enable account registration, you need to create a Gmail account by following these steps to allow Nodemailer to send emails from that account.
Then update the two constants, EMAILADDRESS
and EMAILPASSWORD
in client/server.js
with the Gmail account details for email verification to work.