quick-chat-react 1.0.0 → 1.0.2
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/README.md +53 -15
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -1,13 +1,51 @@
|
|
|
1
1
|
# quick-chat-react
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
3
7
|
Drop-in real-time chat for React apps built on **[Supabase](https://supabase.com)**.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
[](https://quick-chat-react.vercel.app)
|
|
10
|
+
|
|
11
|
+
## Preview
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# npm
|
|
19
|
+
npm install quick-chat-react
|
|
20
|
+
|
|
21
|
+
# yarn
|
|
22
|
+
yarn add quick-chat-react
|
|
23
|
+
|
|
24
|
+
# pnpm
|
|
25
|
+
pnpm add quick-chat-react
|
|
26
|
+
|
|
27
|
+
**Requires Supabase.** If your project uses Firebase, Auth0, or a custom backend, this library is not the right fit.
|
|
6
28
|
|
|
7
29
|
**Features:** real-time messaging · group conversations · voice messages · file & photo uploads · emoji reactions · read receipts · online status · contact management
|
|
8
30
|
|
|
9
31
|
---
|
|
10
32
|
|
|
33
|
+
### Why quick-chat-react?
|
|
34
|
+
|
|
35
|
+
• ⚡ Add full chat to your app in minutes
|
|
36
|
+
• 🔐 Uses your existing Supabase Auth users
|
|
37
|
+
• 💬 Real-time messaging powered by Supabase Realtime
|
|
38
|
+
• 📁 File uploads, voice messages, reactions, and groups included
|
|
39
|
+
• 🎨 Works with any React UI layout
|
|
40
|
+
|
|
41
|
+
## Perfect for
|
|
42
|
+
|
|
43
|
+
- SaaS apps
|
|
44
|
+
- Startup MVPs
|
|
45
|
+
- Internal team tools
|
|
46
|
+
- Community platforms
|
|
47
|
+
- Lovable + Supabase projects
|
|
48
|
+
|
|
11
49
|
## Use as your startup's base
|
|
12
50
|
|
|
13
51
|
`authMode="built-in"` gives you a complete user infrastructure in minutes — auth, profiles, real-time chat, file storage, and a navbar avatar component with sign out and theme switching. All production-ready on day one.
|
|
@@ -24,7 +62,7 @@ ALTER TABLE public.profiles
|
|
|
24
62
|
|
|
25
63
|
Then read your custom fields with your own Supabase client alongside the library — no extra configuration needed. Gate library features by plan, drive onboarding flows from `onboarded`, restrict data by `team_id` via RLS — the library stays out of the way.
|
|
26
64
|
|
|
27
|
-
**→ Full guide: [Using quick-chat-react as a Startup Base](docs/startup-base.md)**
|
|
65
|
+
**→ Full guide: [Using quick-chat-react as a Startup Base](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/startup-base.md)**
|
|
28
66
|
|
|
29
67
|
---
|
|
30
68
|
|
|
@@ -43,8 +81,8 @@ Then read your custom fields with your own Supabase client alongside the library
|
|
|
43
81
|
| Supabase Auth (email/password) | ✅ Yes |
|
|
44
82
|
| Supabase OAuth (Google, GitHub) | ✅ Yes |
|
|
45
83
|
| Lovable + Supabase (no `profiles` table yet) | ✅ Yes |
|
|
46
|
-
| Lovable + Supabase (`profiles` table already exists) | ✅ Yes — [use the additive migration](docs/lovable-existing-schema.md) |
|
|
47
|
-
| Separate Supabase project for chat | ⚠️ Advanced — [see guide](docs/advanced-separate-project.md) |
|
|
84
|
+
| Lovable + Supabase (`profiles` table already exists) | ✅ Yes — [use the additive migration](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/lovable-existing-schema.md) |
|
|
85
|
+
| Separate Supabase project for chat | ⚠️ Advanced — [see guide](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/advanced-separate-project.md) |
|
|
48
86
|
| Firebase / Auth0 / custom auth backend | ❌ Not supported |
|
|
49
87
|
|
|
50
88
|
---
|
|
@@ -60,7 +98,7 @@ npm install quick-chat-react
|
|
|
60
98
|
import "quick-chat-react/style.css";
|
|
61
99
|
```
|
|
62
100
|
|
|
63
|
-
Run the migrations from [`/supabase/migrations/`](
|
|
101
|
+
Run the migrations from [`/supabase/migrations/`](https://github.com/AndreyKornyusko/quick-chat-react/tree/main/supabase/migrations) in filename order via Supabase SQL Editor, then:
|
|
64
102
|
|
|
65
103
|
```tsx
|
|
66
104
|
import { QuickChat } from "quick-chat-react";
|
|
@@ -75,9 +113,9 @@ export default function App() {
|
|
|
75
113
|
}
|
|
76
114
|
```
|
|
77
115
|
|
|
78
|
-
> **Already have a `profiles` table?** (Lovable-generated projects usually do.) Skip the standard migration files and run [`additive-for-existing-profiles.sql`](
|
|
116
|
+
> **Already have a `profiles` table?** (Lovable-generated projects usually do.) Skip the standard migration files and run [`additive-for-existing-profiles.sql`](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/supabase/migrations/additive-for-existing-profiles.sql) instead. See the [Lovable guide](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/lovable-existing-schema.md).
|
|
79
117
|
|
|
80
|
-
Full step-by-step: [docs/quick-start.md](docs/quick-start.md)
|
|
118
|
+
Full step-by-step: [docs/quick-start.md](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/quick-start.md)
|
|
81
119
|
|
|
82
120
|
---
|
|
83
121
|
|
|
@@ -120,7 +158,7 @@ const { data: { session } } = await supabase.auth.getSession();
|
|
|
120
158
|
/>
|
|
121
159
|
```
|
|
122
160
|
|
|
123
|
-
Full guide with token refresh, OAuth setup, and profile sync: [docs/external-auth.md](docs/external-auth.md)
|
|
161
|
+
Full guide with token refresh, OAuth setup, and profile sync: [docs/external-auth.md](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/external-auth.md)
|
|
124
162
|
|
|
125
163
|
---
|
|
126
164
|
|
|
@@ -128,11 +166,11 @@ Full guide with token refresh, OAuth setup, and profile sync: [docs/external-aut
|
|
|
128
166
|
|
|
129
167
|
| Guide | When to use |
|
|
130
168
|
|---|---|
|
|
131
|
-
| [Quick Start](docs/quick-start.md) | Fresh project, built-in auth, Lovable from scratch |
|
|
132
|
-
| [Startup Base](docs/startup-base.md) | Extending profiles, onboarding, plan gating, team isolation |
|
|
133
|
-
| [External Auth](docs/external-auth.md) | Already have Supabase Auth, want same-user chat |
|
|
134
|
-
| [Lovable Existing Schema](docs/lovable-existing-schema.md) | Lovable project with existing `profiles` table |
|
|
135
|
-
| [Separate Supabase Project](docs/advanced-separate-project.md) | Complete data isolation, separate billing |
|
|
169
|
+
| [Quick Start](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/quick-start.md) | Fresh project, built-in auth, Lovable from scratch |
|
|
170
|
+
| [Startup Base](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/startup-base.md) | Extending profiles, onboarding, plan gating, team isolation |
|
|
171
|
+
| [External Auth](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/external-auth.md) | Already have Supabase Auth, want same-user chat |
|
|
172
|
+
| [Lovable Existing Schema](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/lovable-existing-schema.md) | Lovable project with existing `profiles` table |
|
|
173
|
+
| [Separate Supabase Project](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/advanced-separate-project.md) | Complete data isolation, separate billing |
|
|
136
174
|
|
|
137
175
|
---
|
|
138
176
|
|
|
@@ -161,7 +199,7 @@ const { data: { session } } = await supabase.auth.getSession();
|
|
|
161
199
|
/>
|
|
162
200
|
```
|
|
163
201
|
|
|
164
|
-
Full usage and customization guide: [docs/ChatButton.md](docs/ChatButton.md)
|
|
202
|
+
Full usage and customization guide: [docs/ChatButton.md](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/ChatButton.md)
|
|
165
203
|
|
|
166
204
|
---
|
|
167
205
|
|
|
@@ -193,7 +231,7 @@ export default function App() {
|
|
|
193
231
|
}
|
|
194
232
|
```
|
|
195
233
|
|
|
196
|
-
Full usage and customization guide: [docs/UserAvatar.md](docs/UserAvatar.md)
|
|
234
|
+
Full usage and customization guide: [docs/UserAvatar.md](https://github.com/AndreyKornyusko/quick-chat-react/blob/main/docs/UserAvatar.md)
|
|
197
235
|
|
|
198
236
|
---
|
|
199
237
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quick-chat-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Drop-in React chat component backed by Supabase. Real-time messaging, group chats, voice messages, file uploads, emoji reactions, read receipts, and unread badge — all via props.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"dist",
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/AndreyKornyusko/quick-chat-react"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://quick-chat-react.vercel.app",
|
|
21
26
|
"keywords": [
|
|
22
27
|
"react",
|
|
23
28
|
"chat",
|
|
@@ -37,7 +42,9 @@
|
|
|
37
42
|
"typescript"
|
|
38
43
|
],
|
|
39
44
|
"license": "MIT",
|
|
40
|
-
"sideEffects": [
|
|
45
|
+
"sideEffects": [
|
|
46
|
+
"*.css"
|
|
47
|
+
],
|
|
41
48
|
"peerDependencies": {
|
|
42
49
|
"@emoji-mart/data": "^1.2.1",
|
|
43
50
|
"@emoji-mart/react": "^1.1.1",
|
|
@@ -60,6 +67,7 @@
|
|
|
60
67
|
"devDependencies": {
|
|
61
68
|
"@emoji-mart/data": "^1.2.1",
|
|
62
69
|
"@emoji-mart/react": "^1.1.1",
|
|
70
|
+
"@supabase/supabase-js": "^2.0.0",
|
|
63
71
|
"@eslint/js": "^9.32.0",
|
|
64
72
|
"@hookform/resolvers": "^3.10.0",
|
|
65
73
|
"@radix-ui/react-accordion": "^1.2.11",
|