Skip to content

vodatvan01/flutter_chat

Repository files navigation

chatbot_app

Features

  • The app enables users to communicate through text messages, fostering interaction and easy information exchange.
  • This feature condenses lengthy text into concise and understandable summaries, saving users time and aiding quick comprehension.
  • The app boasts an intuitive interface that facilitates seamless navigation and efficient utilization of its features.

Screenshots

Home Chat History
image image image
Chat Summarize Summarize
image image image

Installation

Step 1: Download the Source Code from GitHub

  1. Access the GitHub repository containing the Flutter application source code you want to download.
  2. Click on the "Code" (or "Clone") button and copy the repository URL. `

Step 2: Install Dependencies and Run the Application

  1. Open Terminal or Command Prompt on your computer.
  2. Navigate to the directory where you want to store the source code using the cd path_to_directory command.
  3. Clone the repository using the following command (replace URL_repository with the URL you copied):
git clone https://github.com/vodatvan01/flutter_chat.git
  1. Install the Flutter dependencies by running:
flutter pub get

Installing Firebase CLI

Firebase Command Line Interface (CLI) is a powerful tool for managing your Firebase projects through the command line. Below is a guide on how to install the Firebase CLI on your computer.

Step 1: Install Node.js and npm

Firebase CLI is built on the Node.js platform and uses npm (Node Package Manager) to manage software packages. If you haven't installed Node.js and npm, you can follow these steps:

  1. Visit the official Node.js website at https://nodejs.org/.

  2. Download and install the appropriate version of Node.js for your operating system.

  3. Once the installation is complete, open a terminal window or command prompt and run the following commands to check the installed version of Node.js and npm:

    node -v
    npm -v

Step 2: Install Firebase CLI

After you have installed Node.js and npm, you can proceed to install the Firebase CLI with the following steps:

  1. Open a terminal window or command prompt on your computer.
  2. Run the following command to install Firebase CLI:
    npm install -g firebase-tools
    This command will globally install Firebase CLI on your system, allowing you to use the firebase command from anywhere on your computer.
  3. Wait for the installation process to complete.

Step 3: Verify the Installation

To verify if Firebase CLI has been successfully installed, you can run the following command:

firebase --version

If you see the current version of Firebase CLI, it indicates that the installation was successful.


Log in and test the Firebase CLI

  1. Log into Firebase using your Google account by running the following command:
firebase login

This command connects your local machine to Firebase and grants you access to your Firebase projects. 2. Install the FlutterFire CLI by running the following command from any directory:

dart pub global activate flutterfire_cli
  1. Config your app to use flutter:
flutterfire configure

Creating a Project and Connecting to Firebase:

  1. Log in to the Firebase Console.
  2. Create a new project or select an existing project.

Adding Data to Firestore:

  1. In the Firebase Console, select "Build" from the left sidebar and then choose "Firestore Database."
  2. Click on the "Create database" button.
  3. Select "Start in production mode."
  4. Choose a region that is close to your location.
  5. Once the database is created, you can add data to Firestore by clicking on the "Start collection" button and adding documents to each collection you create.

Below is a guide on how to change Firestore rules in the Firebase Console:

  1. Select Rules:

    • In the top menu, choose the "Rules" tab.
  2. Edit Rules:

    • On the Rules page, you will see a text editor where you can edit your rules.
  3. Enter New Rules:

    • Replace the current rules with the rules you want to apply. For example, to apply the rules you provided:
    rules_version = '2';
    service cloud.firestore {
      match /databases/{database}/documents {
        match /{document=**} {
          allow read, write: if false;
        }
      }
    }
  4. Save Rules:

    • After making changes to the rules, make sure to click the "Save" button to save and deploy the new rules.

Create the following value variables in Cloud Firestore for use in the app.

API Key History History
image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published