Skip to content

Latest commit

 

History

History
133 lines (102 loc) · 2.45 KB

README.md

File metadata and controls

133 lines (102 loc) · 2.45 KB

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