@relaya-chat/react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +215 -0
- package/dist/AdminPanel-CBs17LkG.js +3159 -0
- package/dist/AdminPanel-DqI4RFt9.cjs +1 -0
- package/dist/admin.cjs +1 -0
- package/dist/admin.js +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +3224 -0
- package/dist/relaya.css +2 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JAB Ventures, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# @relaya/react
|
|
2
|
+
|
|
3
|
+
**Community chat for creators and platforms. Embed a fully moderated, real-time chat box on any website or app — no backend required.**
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { RelayaChat } from '@relaya/react';
|
|
7
|
+
import '@relaya/react/styles';
|
|
8
|
+
|
|
9
|
+
export default function CommunityPage() {
|
|
10
|
+
return (
|
|
11
|
+
<RelayaChat
|
|
12
|
+
spaceSlug="your-space-slug"
|
|
13
|
+
serverUrl="https://api.relaya.chat"
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That's it. Auth, real-time messaging, moderation, stickers, themes, and history — all handled inside the component. Ship in 2 hours, not 2 months.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## What is Relaya?
|
|
24
|
+
|
|
25
|
+
Relaya started as a problem: when [Balearic FM](https://balearic-fm.com) tried to embed Cbox into its iOS app, Apple rejected it — Cbox couldn't meet Apple's UGC content moderation requirements. So the founder built Relaya: the community chat infrastructure that ticked every box, at a price indie developers can actually afford.
|
|
26
|
+
|
|
27
|
+
Stop scattering your audience across Discord or WhatsApp groups you don't control. Relaya chat lives on your domain, with your branding, under your rules — keeping fans engaged where you want them.
|
|
28
|
+
|
|
29
|
+
**Three integration paths — one backend:**
|
|
30
|
+
|
|
31
|
+
| Path | Who it's for |
|
|
32
|
+
|---|---|
|
|
33
|
+
| **iframe embed** | Creators on Wix, Squarespace, WordPress — copy, paste, done |
|
|
34
|
+
| **`@relaya/react`** | Web developers who want a React component, not an iframe |
|
|
35
|
+
| **`@relaya/react-native`** | Mobile developers who need App Store-compliant UGC |
|
|
36
|
+
|
|
37
|
+
One subscription covers all three. Pick your path, start in minutes.
|
|
38
|
+
|
|
39
|
+
**Live demo:** [relaya.chat](https://relaya.chat) — try it in your browser right now.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
### 🔑 Known members, zero friction
|
|
46
|
+
|
|
47
|
+
Real members, not anonymous guests — everyone has a verified email identity. Bans stick, regulars recognize each other, and your audience is yours to keep.
|
|
48
|
+
|
|
49
|
+
Sign-in is effortless: a one-time code to their inbox, no password needed. Sessions last 33 days. No OAuth dance, no password resets, no account lockouts.
|
|
50
|
+
|
|
51
|
+
### 🛡️ Moderation built in — not bolted on
|
|
52
|
+
|
|
53
|
+
Report, ban, and delete tools on every plan, from day one. No upgrade required for moderation. Server-side enforcement only — no client-side trust shortcuts. Built to satisfy Apple's UGC guidelines from the start.
|
|
54
|
+
|
|
55
|
+
### 🧩 From iframe to SDK. One product.
|
|
56
|
+
|
|
57
|
+
Copy-paste an iframe onto your Wix site. Drop `@relaya/react` into your Next.js app. Ship a React Native mobile app with App Store–compliant chat. One subscription, every integration path.
|
|
58
|
+
|
|
59
|
+
### 🎨 Custom branding
|
|
60
|
+
|
|
61
|
+
Match your site's colors with the visual theme editor. Custom fonts, colors, and layout options. The "Powered by Relaya" badge is present on the Embed plan and removed on Community and Developer plans.
|
|
62
|
+
|
|
63
|
+
### 🖼️ Custom sticker sets
|
|
64
|
+
|
|
65
|
+
Upload your own sticker sets to give your community a unique, on-brand way to express themselves. Up to 20 on Embed, 100 on Community, unlimited on Developer.
|
|
66
|
+
|
|
67
|
+
### ⚡ Real-time, always
|
|
68
|
+
|
|
69
|
+
WebSocket-based. Messages appear instantly. Auto-reconnects on network drops. No polling, no delays.
|
|
70
|
+
|
|
71
|
+
### 🌍 Country & IP controls
|
|
72
|
+
|
|
73
|
+
Country allowlist/blocklist and IP ban tools for spaces with compliance needs or persistent bad actors.
|
|
74
|
+
|
|
75
|
+
### 📊 Chat history & export
|
|
76
|
+
|
|
77
|
+
Configurable message archive up to 180 days. Export your full chat history as CSV — your data stays yours, always. Searchable from the admin panel.
|
|
78
|
+
|
|
79
|
+
### 🔒 No-cookie architecture
|
|
80
|
+
|
|
81
|
+
Auth uses short-lived tokens in memory + rotating refresh tokens in `sessionStorage`. No third-party cookies. No cookie-consent banner required. Works in cross-origin iframes (Wix, Squarespace) without issue.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Installation
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm install @relaya/react
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Peer dependencies:** React 18+
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"react": ">=18.0.0",
|
|
96
|
+
"react-dom": ">=18.0.0"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Quick Start
|
|
103
|
+
|
|
104
|
+
### 1. Get your space slug
|
|
105
|
+
|
|
106
|
+
Create a free account at [relaya.chat](https://relaya.chat) and set up your first space. Your `spaceSlug` is the only required config. Relaya issues auth tokens directly to your users — your app never handles credentials.
|
|
107
|
+
|
|
108
|
+
### 2. Drop in the component
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { RelayaChat } from '@relaya/react';
|
|
112
|
+
import '@relaya/react/styles';
|
|
113
|
+
|
|
114
|
+
export default function CommunityPage() {
|
|
115
|
+
return (
|
|
116
|
+
<RelayaChat
|
|
117
|
+
spaceSlug="your-space-slug"
|
|
118
|
+
serverUrl="https://api.relaya.chat"
|
|
119
|
+
/>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`<RelayaChat />` renders the complete chat UI: sign-in flow, message list, input, sticker picker, and moderation controls — all wired to the Relaya backend.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Custom Assembly
|
|
129
|
+
|
|
130
|
+
If the default UI doesn't fit your design, import the pieces you need:
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
import {
|
|
134
|
+
AuthModal,
|
|
135
|
+
MessageList,
|
|
136
|
+
MessageInput,
|
|
137
|
+
useRelayaAuth,
|
|
138
|
+
useRelayaChat
|
|
139
|
+
} from '@relaya/react';
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The hooks handle all state, connection management, and auth token refresh. The components accept `className` overrides for custom styling. See the [component reference](https://relaya.chat/docs/react) for the full API.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Pricing
|
|
147
|
+
|
|
148
|
+
All features above are available across three subscription tiers — from a simple embed for content creators to a full developer tier with React Native SDK and REST API access. Moderation tools (ban, delete, report) are included on **every tier**.
|
|
149
|
+
|
|
150
|
+
15-day free trial, no credit card required.
|
|
151
|
+
|
|
152
|
+
[See plans and pricing at relaya.chat →](https://relaya.chat)
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## How Relaya Compares
|
|
157
|
+
|
|
158
|
+
| | Tawk.to | Stream | Cbox | Discord | **Relaya** |
|
|
159
|
+
|---|---|---|---|---|---|
|
|
160
|
+
| **Use case** | Customer support | Platform chat | Community widget | Community | **Community** |
|
|
161
|
+
| **No-code embed** | ✓ | ✗ | ✓ | ✓ | **✓** |
|
|
162
|
+
| **React SDK** | ✗ | ✓ | ✗ | ✗ | **✓** |
|
|
163
|
+
| **React Native SDK** | ✗ | ✓ | ✗ | ✗ | **✓** |
|
|
164
|
+
| **Moderation on every tier** | N/A | Medium | Partial (Pro+) | ✗ | **✓** |
|
|
165
|
+
| **App Store compliance path** | N/A | ✓ | ✗ | ✗ | **✓** |
|
|
166
|
+
| **Entry paid price** | Free | $99+/mo | $1.67/mo | Free | **$9/mo** |
|
|
167
|
+
| **Data ownership** | ✓ | ✓ | ⚠️ | ✗ | **✓** |
|
|
168
|
+
|
|
169
|
+
**Relaya's unique position:** The only product with community focus, no-code embed, React SDK, React Native SDK, moderation on every tier, and affordable pricing — all in one.
|
|
170
|
+
|
|
171
|
+
- **vs. Stream:** Same infrastructure quality, a fraction of the price. Stream is enterprise pricing for enterprise teams. Relaya is priced for indie developers from day one.
|
|
172
|
+
- **vs. Cbox:** Cbox is great for a simple chat box. Relaya is for when you need an API, a React component, a mobile app, or a path to the App Store. Like Stripe vs. a PayPal button.
|
|
173
|
+
- **vs. Discord embed:** Keep your community on your platform, not Discord's. Your moderation, your data, your brand.
|
|
174
|
+
- **vs. building from scratch:** 2 hours vs. 2-6 months. Moderation built in. App Store compliance included.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Authentication Details
|
|
179
|
+
|
|
180
|
+
Relaya uses a short-lived access token + rotating refresh token model with no third-party cookies:
|
|
181
|
+
|
|
182
|
+
- Tokens live in memory and `sessionStorage` — no `localStorage`, no cookies
|
|
183
|
+
- No cookie-consent banner required
|
|
184
|
+
- Works in cross-origin iframes (Wix, Squarespace)
|
|
185
|
+
- Sessions last 33 days with active refresh; expire when the user closes the tab on fresh sign-in
|
|
186
|
+
|
|
187
|
+
See [README-AUTH.md](./README-AUTH.md) for the full token lifecycle, session behavior, and sign-out details.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Getting Help
|
|
192
|
+
|
|
193
|
+
- **Documentation:** [relaya.chat/docs](https://relaya.chat/docs)
|
|
194
|
+
- **Dashboard + space setup:** [relaya.chat](https://relaya.chat)
|
|
195
|
+
- **GitHub Issues:** [github.com/relaya-chat/sdk/issues](https://github.com/relaya-chat/sdk/issues)
|
|
196
|
+
- **Discussions:** [github.com/relaya-chat/sdk/discussions](https://github.com/relaya-chat/sdk/discussions)
|
|
197
|
+
- **Email:** [hello@relaya.chat](mailto:hello@relaya.chat)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Who Builds This
|
|
202
|
+
|
|
203
|
+
Relaya is built by [Jay Batson](https://github.com/batsonjay) — co-founder of [Acquia](https://acquia.com), operator of [Balearic FM](https://balearic-fm.com), and the developer who built Relaya when Apple rejected Cbox in the Balearic FM iOS app.
|
|
204
|
+
|
|
205
|
+
**The origin story in one sentence:** Got kicked off a radio platform, built Balearic FM, tried to embed a community chat in the iOS app, Apple said no, built Relaya.
|
|
206
|
+
|
|
207
|
+
Contributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for the contributor license agreement and how to get started.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
MIT — see [LICENSE](./LICENSE).
|
|
214
|
+
|
|
215
|
+
> Commercial use is welcome and encouraged. A Contributor License Agreement (CLA) in `CONTRIBUTING.md` preserves the ability to maintain long-term project sustainability. By contributing, you agree to assign copyright to the project maintainer.
|