Skip to content

DokChat is fully fledged instant web messaging application 💬

Notifications You must be signed in to change notification settings

MrBartusek/DokChat

Repository files navigation

DokChat | Live Demo

GitHub Workflow Status (with event) Website Docker Image Version (tag latest semver) Dynamic JSON Badge

hero

DokChat is complete, fully fledged instant messaging application. It has everything you need: groups, attachment, GIFs, emojis, customization and desktop app.

Quick Start

If you want to start using DokChat, I host fully fledged live demo. For simplicity sake you can also create a demo account and skip registration process.

Features

  • Groups for multiple participants as well as private conversations between two people.
  • Custom authentication system based on JWT Tokens and discord-like user tags MrBartusek#0001
  • Social authentication with Google and Facebook.
  • Two-Factor Authentication with QR codes that works with all major authenticator apps.
  • Instant messaging with socket.io.
  • Username, tag and avatar customization as well as user preferences.
  • Chat color, name and avatar customization.
  • Link-based group invites.
  • Blocking or hiding other users.
  • GIFs (gif-picker-react), Emojis (Twemoji), videos, images and Markdown support for messages.
  • Current online status with green dots.
  • reCAPTCHA and ratelimit protections against bots.
  • Fully functional Electron Desktop App with browser login handoff.

Deploy own DokChat instance

DokChat is an extensive project that uses a multitude of tools and cloud services. It's also well suited to be deployed on your own. We have configured multiple tools such as Terraform, Docker and NGINX so you can easily deploy your own DokChat server and infrastructure.

See SETUP.md for detailed setup guide.

Tech Stack

  • PostgreSQL - Postgress is used as database without any ORM. You can see database visualization in Database Design section.
  • Express - Node.js express is used as primary backend framework
  • React - React.js alongside with react-bootstrap and other client-side libraries is used as frontend library.
  • Typescript - Typescript is used both on backend and frontend code to ensure type safety in whole project.
  • Socket.io - Websockets are used for instant communication
  • Amazon AWS- AWS is used as the primary hosting provider, handling server and attachments hosting, as well as emails.
  • Terraform - Whole infrastructure is provisioned using Terraform

Hosting

This project is designed to run on AWS using following services:

  • EC2 - for hosting server
  • S3 - for attachments and profile pictures
  • SES - for email sending
  • SQS, SNS - for email bounces and complaints
  • IAM, for access management

Database Design

Database design is loosely based on yoosuf/Messenger. It features full user authentication and support for group chats. You can see the visualization on DB Designer or directly in server/db/structure.ts

db design

API

DokChat uses Rest API and Websocket API for communication, both are authenticated using JWT tokens. You can check internal API structure in Postman or directly in server/routes

Run in Postman

Contributing

Want to contribute to the project?

First of all, thanks! If you find and problems with the project or want to suggest a feature don't hesitate to create an issue. If you want to contribute code changes please check SETUP.md for detailed setup guide. We accept code changes via Pull Requests.