Skip to content

aseerkt/mchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

46105c3 · Aug 9, 2024
Aug 9, 2024
Jul 2, 2024
Jul 1, 2024
Jul 2, 2024
Jul 14, 2024
Aug 9, 2024
Aug 6, 2024
Aug 6, 2024
Jun 22, 2024
Jun 21, 2024
Aug 6, 2024
Aug 9, 2024
Aug 6, 2024
Jun 21, 2024
Jun 27, 2024
Aug 8, 2024
Aug 9, 2024
Jul 15, 2024
Aug 8, 2024
Aug 6, 2024
Aug 6, 2024
Jun 30, 2024

Repository files navigation

mChat

Real-time messenger powered by Socket.IO

Chat Interface

Pre requisites

  • Node.js v20
  • PNPM
  • Docker (dragonflydb - 3.5GB memory / 4 cores)

Tech Stacks

  • Frontend - React.js, TailwindCSS, React-Query
  • Backend - Express, socket.io, PostgreSQL, DragonflyDB

Get Started

Run final build using docker compose

  • Spin up the entire stack (DragonflyDB, PostgreSQL, React.js, Node.js)
pnpm docker:up

Make sure the ports 6379,5432 and 5000 are not occupied

  • Seed database
pnpm docker:db:seed
pnpm docker:down

Development

  • Spin up PostgreSQL and DragonflyDB
docker compose up -d

Make sure the ports (postgres: 5432, dragonfly: 6379) are open for connection

  • Install dependencies
pnpm i
  • Run migrations
pnpm --filter server migration:run
  • (Optional) Seed database
pnpm --filter server seed
  • Run development server (web & server)
pnpm dev

E2E testing

  • Run playwright e2e tests
pnpm e2e:test
  • Run playwright e2e tests in UI mode
pnpm --filter e2e test:ui
  • Run playwright e2e test generator
pnpm --filter e2e test:codegen

Unit testing

  • Run web unit tests
pnpm --filter web test

Features Roadmap

primary goals

  • sign up, login and logout
  • jwt user authentication/authorization
  • create group
  • join groups
  • realtime messaging
  • typing indicators
  • socket.io cluster adapter integration
  • dragonflydb implementation (typing users, online users)
  • member online status
  • realtime member list update
  • infinite scroll cursor pagination (messages/groups/members)
  • tanstack react-query integration
  • add members
  • realtime unread count
  • leave group, transfer ownership, delete group
  • delete group
  • alert component
  • direct message
  • delete message
  • reply to message
  • date separator
  • confirm dialog
  • message receipts
  • e2e encryption

extras

  • playwright e2e tests for chat
  • switch to postgresql (support transaction)
  • minimal swagger ui
  • keploy api test generation
  • private groups - invite/add/delete members
  • notifications

Authors