/chat

💬 Chat application written in TypeScript with a Vue frontend

Primary LanguageTypeScriptMIT LicenseMIT

Chat Application

GitHub last commit Top language Lines of code

Highly customizable chat server/application that is easy to deploy, and can be integrated with any sort of website. Host your own chat server on your own terms.

May be used by Twitch streamers who want to host their own chat server away from Twitch infrastructure and moderation.

Live demo

Playground for developers showing things you can do using HTTP/Websocket API.

A more real-world example showing chat embedded alongside a live stream.

Imgur

⚠️ Work in progress...

This project is still in its beta stage. Nothing is guaranteed until v1.0.0.

🔥 Features

  • First-class TypeScript support - IDE should be doing half the work for you
  • Single repository (why monorepo? https://monorepo.tools/)
  • 🐳 Dockerized
  • Not tied to any particular infrastructure or service - we are in a world where AWS, Firebase and Twitch do not exist
  • Infinitely scalable with minimal changes
  • Minimal dependencies

Repository Structure

Entire application is self-contained within this single repository which has many advantages during development.

  • /apps folder contains "launchable" apps that can be started by calling npm run start within that application's directory. Neither application can depend on another. Apps can only depend on packages.
  • /packages folder contains "shared" code used by apps and by other packages too.

🐋 Local Development using Docker

Two things you need installed first:

Now run these commands:

git clone https://github.com/Athlon1600/chat
cd chat
npm run docker:dev

This will take a while, but once up and running you will be able to access the following services on your local computer:

  • localhost:8080 = frontend
  • localhost:3000 = server/backend
  • localhost:9000 = adminer (for browsing/editing db contents)
  • localhost:8001 = Redis Insight

🚀 One-click install

Rent a server from Linode or such (preferably of Ubuntu variety), and paste the following command into your terminal:

curl -s https://raw.githubusercontent.com/Athlon1600/chat/master/scripts/install.sh | bash

Everything will be installed all at once without needing any further input from you.

If install was a success, you can then access the application via the IP address that was assigned to your server. See the demo links above of what that would look like.

Caddy Server

One-click install:

curl -sS https://raw.githubusercontent.com/Athlon1600/chat/master/scripts/caddy.sh | sh

Once Caddy is installed, you need to modify these files:

  • .env.production - rename to .env and change values inside
  • docker-compose-prod.yml - adjust values there accordingly too
  • etc/Caddyfile
caddy run --config ./etc/Caddyfile

🚧 To-do list