Chat system for any Node.js server
Type-safe, plug-and-play — presence, typing indicators, and reactions included
01. Install the package
pnpm add @ravex/server
npm install @ravex/server
yarn add @ravex/server
02. Use it with any server
  import express from 'express'  import { createServer } from 'http'  import { ChatEngine } from '@ravex/server'  const app = express()  const httpServer = createServer(app)  const engine = new ChatEngine(httpServer)  httpServer.listen(3000, () => {    console.log('Express + Ravex running on port 3000')  })
  import Koa from 'koa'  import { createServer } from 'http'  import { ChatEngine } from '@ravex/server'  const app = new Koa()  const httpServer = createServer(app.callback())  const engine = new ChatEngine(httpServer)  httpServer.listen(3000, () => {    console.log('Koa + Ravex running on port 3000')  })
  import { createServer } from 'http'  import { ChatEngine } from '@ravex/server'  const httpServer = createServer()  // 2. Initialize the ChatEngine  const engine = new ChatEngine(httpServer)  // 3. Listen on a port  httpServer.listen(3000, () => {    console.log('Chat server running on port 3000')  })
  import { serve } from '@hono/node-server'  import { Hono } from 'hono'  import { ChatEngine } from '@ravex/server'  import type { Server } from 'http'  const app = new Hono()  const server = serve({    fetch: app.fetch,    port: 3000  }, (info) => {    console.log("Hono + Ravex running on port " + info.port)  })  // Pass the returned server instance to ChatEngine  const engine = new ChatEngine(server as Server)
  import Fastify from 'fastify'  import { ChatEngine } from '@ravex/server'  const fastify = Fastify()  // Fastify exposes its underlying Node.js HTTP server natively  const engine = new ChatEngine(fastify.server)  fastify.listen({ port: 3000 }, () => {    console.log('Fastify + Ravex running on port 3000')  })
  import { NestFactory } from '@nestjs/core'  import { AppModule } from './app.module'  import { ChatEngine } from '@ravex/server'  async function bootstrap() {    const app = await NestFactory.create(AppModule)    // Extract the underlying HTTP server from the Nest application    const httpServer = app.getHttpServer()    const engine = new ChatEngine(httpServer)    await app.listen(3000)    console.log('NestJS + Ravex running on port 3000')  }  bootstrap()
Type-Safe
Built on SocketIO
Minimal Setup
Works on Any Framework
Frontend Client Package
Presence Tracking
Typing Indicator
Direct Messaging
Message Reactions
Rate Limiting
Message Replies
Group Chat
Type-Safe
Built on SocketIO
Minimal Setup
Works on Any Framework
Frontend Client Package
Presence Tracking
Typing Indicator
Direct Messaging
Message Reactions
Rate Limiting
Message Replies
Group Chat
Type-Safe
Built on SocketIO
Minimal Setup
Works on Any Framework
Frontend Client Package
Presence Tracking
Typing Indicator
Direct Messaging
Message Reactions
Rate Limiting
Message Replies
Group Chat
Type-Safe
Built on SocketIO
Minimal Setup
Works on Any Framework
Frontend Client Package
Presence Tracking
Typing Indicator
Direct Messaging
Message Reactions
Rate Limiting
Message Replies
Group Chat