Adding a real-time group chat to your site doesn’t need to be complicated or expensive.
Most live chat tools are bloated, hard to customize, or overpriced — especially for solo devs or small projects.
That’s why I built FireForChat — a simple, Firebase-based chat widget that you can integrate in minutes.
In this tutorial, I’ll show you how to add a social chat (like a public chatroom) to your site using FireForChat. No backend needed, full styling control, and real-time messaging out of the box.
✅ Prerequisites
- A Firebase account
- A license key from FireForChat
- A frontend app or website (React, Vue, plain JS, etc.)
- 5 minutes of your time
🛠 Step 1: Install FireForChat
Install the NPM package into your project:
npm install fireforchat
or with yarn:
yarn add fireforchat
This gives you access to the Fireforchat
component that you’ll use to render the chat UI.
🔥 Step 2: Set Up Firebase
Create and configure a Firebase project:
- Go to the Firebase Console
- Create a new project
- Enable Firestore Database
- Go to Project Settings > General and register a new Web App
- Copy the Firebase config object. It should look like this:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
};
This config allows FireForChat to connect to your Firestore instance to store and sync messages in real time.
💬 Step 3: Embed the Chat with a Shared Channel ID
Now you’re ready to drop the chat into your website.
For a social chat, use a shared channelId
like "general-room"
. All users with the same channelId
will see the same conversation.
import Fireforchat from "fireforchat";
const data = {
channelId: "general-room", // group chat for all users
user: {
email: "[email protected]",
username: "JaneDoe"
}
};
<Fireforchat
licenseKey="YOUR_LICENSE_KEY"
firebaseConfig={firebaseConfig}
data={data}
width="100%"
height="500px"
/>
📌 If you don't pass email
or username
, FireForChat will prompt the user to enter them before joining the chat.
🎨 Step 4: Customize the Look & Feel
FireForChat gives you two ways to customize the chat appearance:
1. From your own CSS
You can override default styles using these class names:
Class | Description |
---|---|
.ffc-main-container |
Wrapper around the chat widget |
.ffc-header |
Chat title bar |
.ffc-footer |
Input and button area |
.ffc-message-container |
Each message block |
.ffc-message-username |
Username text |
.ffc-message-text |
Message content |
.ffc-dialog |
Login/start chat modal |
.ffc-loading-backdrop |
Loading overlay |
Just add your own styles in your global stylesheet or component styles.
2. From FireForChat Dashboard Preferences
Go to your FireForChat dashboard and open the Preferences panel. There, you can customize:
- Colors (background, header, input)
- Input/button appearance
The dashboard generates default styles that are applied automatically when the chat loads.
🚀 Step 5: Deploy and Test
Once everything is working locally, it’s time to go live!
- Deploy your site to your hosting platform (Vercel, Netlify, Firebase Hosting, etc.)
- Make sure Firestore security rules are set if you move to production
- Open your site on multiple tabs/devices and confirm that the chat updates in real time
Test sending messages with multiple users and make sure your channelId
works like a shared public room.
💡 Bonus: Example Use Cases
- Public chatrooms on community pages
- Event/live stream chats
- In-app user discussions for SaaS products
- Course platforms with group discussions
- Real-time support rooms
🎯 Final Thoughts
FireForChat is perfect if you want:
- Firebase-based real-time chat without building backend logic
- Full UI control and quick setup
- Support for group, private, and support ticket chats
- Affordable pricing and easy licensing
👉 Get started: https://www.fireforchat.com
Let me know if you try it — or if you’d like to see new features added. I'm actively working on it and always open to feedback!