An open API service indexing awesome lists of open source software.

https://github.com/timilehinn/softchatjs

Build scalable chat apps with Javascript, React and React Native using ready-to-use components for real-time messaging.
https://github.com/timilehinn/softchatjs

chat expo javascript messaging react react-native sdk websockets

Last synced: 7 months ago
JSON representation

Build scalable chat apps with Javascript, React and React Native using ready-to-use components for real-time messaging.

Awesome Lists containing this project

README

          

# SoftchatJS

SoftchatJS is a flexible, full-featured text/voice messaging platform designed for businesses and developers. It enables real-time chat experiences across web and mobile platforms, with customizable UIs and a backend-agnostic architecture.

This monorepo contains all the packages and demo apps that make up the SoftchatJS ecosystem.

---

## πŸ—‚ Monorepo Structure

```bash
softchatjs/
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ expo-app-demo # React Native + Expo demo for mobile
β”‚ └── react-app-demo # Web app demo using softchatjs-react
└── packages/
β”œβ”€β”€ softchatjs-core # Core JS SDK: event system, client logic
β”œβ”€β”€ softchatjs-react # React bindings and components
└── softchatjs-react-native # React Native bindings and components
```

---

## πŸš€ Getting Started

### 1. Install Dependencies

From the root of the monorepo:

```bash
npm install
```

> You can also use yarn or npm, but pnpm is recommended for workspace support.

### 2. Start Demo Apps

To run the web demo:

```bash
cd apps/react-app-demo && npm run dev
```

To run the Expo mobile demo:

```bash
cd apps/expo-app-demo && npm run dev
```

> Make sure you have Expo CLI installed globally:
>
> ```bash
> npm install -g expo-cli
> ```

---

## ✨ Features

- πŸ’¬ Real-time messaging
- ✍️ Typing indicators (with debounced start/stop events)
- πŸ‘οΈ Read receipts
- 😍 Emoji reactions
- πŸ”‰ Voice messaging
- 🧡 Conversation threading (coming soon)
- πŸ“‚ File and media attachments
- πŸ›ŽοΈ Push notifications via FCM (Android) & APNs (iOS)
- 🧠 AI-assisted message summarization (planned)
- πŸ§ͺ Fully customizable UI via components and hooks
- πŸ’‘ Platform-agnostic logic for React and React Native
- 🧩 Broadcast lists

---

## 🧩 How the Chat Works

SoftchatJS is designed to be backend-agnostic and event-driven. Here's how the pieces fit together:

- πŸ”§ `softchatjs-core`
Contains the core logic: ChatClient, MessageClient, event system, and utilities for sending/receiving messages, typing indicators, and presence.

- 🌐 `softchatjs-react`
A package of React UI components (like `MessageList`, `Voice messages`, `ChatBubble`, `InputBox`) and hooks (like `useChatClient`) to help build chat interfaces on the web.

- πŸ“± `softchatjs-react-native`
The React Native counterpart to `softchatjs-react`. It provides mobile-ready components and hooks tailored for native environments via Expo.

> A a prebuild mobile/web app coming soon.

---

## πŸ— Architecture Overview

- πŸ”„ Event-driven architecture (pub/sub)
- πŸ”Œ Pluggable transport layer (WebSocket, polling, etc.)
- πŸ’‘ Platform-agnostic core (logic shared across web and mobile)
- πŸ“¦ Modular design for scalability and flexibility
- ☁️ Backend-agnostic and designed for easy integration with custom infrastructures
- πŸ“² Push notifications supported via FCM (Firebase Cloud Messaging) and APNs (Apple Push Notification Service)

---

## πŸ“¦ Package Overview

| Package | Description |
|-----------------------------|--------------------------------------------------------------|
| `softchatjs-core` | Core chat logic, clients, and event system |
| `softchatjs-react` | React-specific components and hooks |
| `softchatjs-react-native` | React Native (Expo-compatible) components and mobile hooks |

---

## πŸ§ͺ Development Tips

- Use pnpm workspaces for local development.
- You can directly modify packages and see updates reflected in the demo apps.
- Prefer using the workspace protocol (e.g. "workspace:*") when linking internal packages.

---

## πŸ“š Future Plans

- 🌐 Chat widget
- 🧠 AI features (summarization, sentiment)
- πŸ’¬ Mentions, polls, video/audio calls
- πŸ”Œ Backend SDKs for Node and Python

---

## 🀝 Contributing

We’d love to have your help! Whether it's improving docs, fixing bugs, or building new featuresβ€”contributions are welcome.

1. Fork the repo
2. Create your feature branch
3. Submit a pull request

---

## πŸ“¬ Questions?

Feel free to open an issue or start a discussion. We're happy to help!

---

Made with ❀️ by the SoftchatJS team.