2.3.3 • Published 3 months ago

fireforchat v2.3.3

Weekly downloads
-
License
Propietary
Repository
-
Last release
3 months ago

FireForChat - Installation & Setup Guide

FireForChat is a real-time chat tool based on Firebase and Firestore, allowing developers to easily integrate a messaging system into their web or mobile applications. Note that FireForChat is a paid package. For more information, visit https://www.fireforchat.com/.

Installation

To install FireForChat in your project, run the following command:

npm install fireforchat

Firebase Configuration

To use FireForChat, you need to configure Firebase. Follow these steps:

  1. Go to Firebase Console and create a new project.
  2. Once the project is created, navigate to the Firestore Database section and enable it.
  3. Go to Project settings > General, and under "Your apps", register a new web app.
  4. Copy the Firebase configuration object from the settings and use it in your project:
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",
    measurementId: "YOUR_MEASUREMENT_ID"
};

FireForChat Integration

  1. Go to the FireForChat Dashboard and copy your License Key.
  2. Pass the Firebase config, license key, and user data to FireForChat.
  3. Inside the data object, you must set up the channelId, which can be any string to identify the conversation.
    • The channelId is a unique identifier for a chat conversation. It helps FireForChat distinguish between different chats. You can use any string, but it should be unique to avoid mixing conversations.
    • Examples:
      • For customer support chat, use a ticket ID: "support-ticket-12345".
      • For private chat between two users, use a combination of their user IDs: "user-123-user-456".
      • For group chats, use a room name or group ID: "team-discussion-789".
  4. Inside the data object, if you already have the user information, you can pass it as a prop to prevent the chat from asking for a username and email.
    • If the email and username is null, FireForChat may ask the user for their email and username before they start chatting. However, if you already have this information (e.g., from your app's authentication system), you can provide it inside the user object. This allows the chat to start immediately without asking the user to enter their details.
const data = {
    channelId: "support-ticket-12345", // Unique identifier for this chat
    user: {
        email: "user@example.com", // Pre-fill user email to avoid asking
        username: "JohnDoe" // Pre-fill username so chat starts immediately
    }
};

<FireForChat 
    licenseKey="YOUR_LICENSE_KEY"
    firebaseConfig={firebaseConfig}
    data={data}
    width="300px"  // Defaults to 300px if no width is provided, similar to the CSS `width` property.
    height="450px" // Defaults to 450px if no height is provided, similar to the CSS `height` property.
/>;

Important Notes

  • If handling multiple conversations, dynamically update the channelId.
  • channelId can be any unique string, such as a user ID, support ticket ID, or room name.
  • If the user already has an account, they can start chatting without entering additional details.
  • Ensure Firestore security rules are properly configured.

With this guide, you'll be ready to integrate FireForChat into your application. 🚀

2.1.9

3 months ago

2.3.0

3 months ago

2.3.2

3 months ago

2.3.1

3 months ago

2.3.3

3 months ago

2.2.1

3 months ago

2.2.0

3 months ago

2.2.3

3 months ago

2.2.2

3 months ago

2.2.5

3 months ago

2.2.4

3 months ago

2.2.7

3 months ago

2.2.6

3 months ago

2.1.8

3 months ago

2.1.7

3 months ago

2.2.9

3 months ago

2.2.8

3 months ago

2.1.6

3 months ago

2.1.5

3 months ago

2.1.4

3 months ago

2.1.3

3 months ago

2.1.2

3 months ago

2.1.1

3 months ago

2.1.0

3 months ago

2.0.9

3 months ago

2.0.8

3 months ago

2.0.7

3 months ago

2.0.6

3 months ago

2.0.5

3 months ago

2.0.4

3 months ago

2.0.2

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.9.9

3 months ago

1.9.8

3 months ago

1.9.7

3 months ago

1.9.6

3 months ago

1.9.5

3 months ago

1.9.4

3 months ago

1.9.3

3 months ago

1.9.2

3 months ago

1.9.1

3 months ago

1.9.0

3 months ago

1.8.9

3 months ago

1.8.8

3 months ago

1.8.7

3 months ago

1.8.6

3 months ago

1.8.5

3 months ago

1.8.4

3 months ago

1.8.3

3 months ago

1.8.2

3 months ago

1.8.1

3 months ago

1.8.0

3 months ago

1.7.9

3 months ago

1.7.8

3 months ago

1.7.7

3 months ago

1.7.6

3 months ago

1.7.5

3 months ago

1.7.4

3 months ago

1.7.3

3 months ago

1.7.2

3 months ago

1.7.1

3 months ago

1.7.0

3 months ago

1.6.9

3 months ago

1.6.8

3 months ago

1.6.7

3 months ago

1.6.6

3 months ago

1.6.5

3 months ago

1.6.4

3 months ago

1.6.3

3 months ago

1.6.2

3 months ago

1.6.1

3 months ago

1.6.0

3 months ago

1.5.9

3 months ago

1.5.8

3 months ago

1.5.7

3 months ago

1.5.6

3 months ago

1.5.5

3 months ago

1.5.4

3 months ago

1.5.3

3 months ago

1.5.2

3 months ago

1.5.1

3 months ago

1.5.0

3 months ago

1.4.9

3 months ago

1.4.8

3 months ago

1.4.7

3 months ago

1.4.6

3 months ago

1.4.5

3 months ago

1.4.4

3 months ago

1.4.3

3 months ago

1.4.2

3 months ago

1.4.1

3 months ago

1.4.0

3 months ago

1.3.9

3 months ago

1.3.8

3 months ago

1.3.7

3 months ago

1.3.6

3 months ago

1.3.5

3 months ago

1.3.3

3 months ago

1.3.2

3 months ago

1.3.1

3 months ago

1.3.0

3 months ago

1.2.9

3 months ago

1.2.8

3 months ago

1.2.7

3 months ago

1.2.6

3 months ago

1.2.5

3 months ago

1.2.4

3 months ago

1.2.3

3 months ago

1.2.2

3 months ago

1.2.1

3 months ago

1.2.0

3 months ago

1.1.9

3 months ago

1.1.8

3 months ago

1.1.7

3 months ago

1.1.6

3 months ago

1.1.5

3 months ago

1.1.4

3 months ago

1.1.3

3 months ago

1.1.2

3 months ago

1.1.1

3 months ago

1.1.0

3 months ago

1.0.9

3 months ago

1.0.8

3 months ago

1.0.7

3 months ago

1.0.6

3 months ago

1.0.5

3 months ago

1.0.4

3 months ago

1.0.3

3 months ago

1.0.2

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago