Skip to content

ChatBot that helps the user recieve policy advice and find help near them.

Notifications You must be signed in to change notification settings

Hrios05/EquiBot

Repository files navigation

EquiBotFinal

Overview

EquiBotFinal is an iOS application designed to simplify navigating California law. It provides a user-friendly interface for interacting with a chatbot that can answer legal questions and provide relevant information. The app integrates with Firebase for user authentication and data storage, and uses a local Python server to process chatbot requests.

Screenshot 2025-04-06 at 4 43 50 AMScreenshot 2025-04-06 at 4 45 47 AMScreenshot 2025-04-06 at 4 46 55 AM

Features

  • Chat History: View a history of your conversations with EquiBot.
  • Saved Websites: Save and access useful legal resources.
  • User Authentication: Secure user accounts managed with Firebase.
  • Interactive Chatbot: Get answers to your legal questions through an interactive chatbot interface.
  • Link Formatting: Automatically format and save links provided by the chatbot.
  • Dynamic Scrolling: The chat interface automatically scrolls to the bottom as new messages are received.

Technologies Used

  • SwiftUI: For building the user interface.
  • Firebase: For user authentication and data storage (Firestore).
  • Python (Flask): For the backend chatbot server.
  • URLSession: For making network requests to the chatbot server.

Requirements

  • Xcode 15+
  • iOS 15.0+
  • Firebase account and project
  • Python 3.6+

Setup Instructions

  1. Clone the repository:

    git clone [repository URL]
    cd EquiBotFinal
  2. Firebase Setup:

    • Create a new project in the Firebase Console.
    • Enable Firestore and Authentication.
    • Download the GoogleService-Info.plist file and add it to your Xcode project.
  3. Configure Xcode Project:

    • Open the EquiBotFinal.xcodeproj in Xcode.
    • Add the GoogleService-Info.plist file to your project.
    • Install Firebase SDK using Swift Package Manager.
  4. Backend Setup (Python Chatbot Server):

    • Navigate to the chatbot server directory.

    • Install the required Python packages:

      pip install flask
    • Run the Flask server:

      python app.py
  5. Run the iOS App:

    • Build and run the EquiBotFinal project in Xcode on a simulator or physical device.

Architecture

The app follows a Model-View-ViewModel (MVVM) architecture.

  • Views: SwiftUI views for the user interface (HomePageView, TabsView, ChatHistoryView, SavedWebsitesView, etc.).
  • Models: Data models for messages (ChatMessage), user data (User).
  • ViewModels: (Implicit) Logic within the views to manage state and interact with Firebase and the chatbot server.

Code Structure

  • ContentView.swift: Initial view displaying the app's logo and name.
  • HomePageView.swift: Main chat interface with message display and input.
  • TabsView.swift: Tabbed interface for accessing chat history and saved websites.
  • ChatHistoryView.swift: Displays the chat history.
  • SavedWebsitesView.swift: Manages and displays saved websites.
  • AuthController.swift: Handles user authentication and data saving.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

License

[Choose a license, e.g., MIT License]

About

ChatBot that helps the user recieve policy advice and find help near them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •