/SeventyTwo

Test Application

Primary LanguagePHP

Laravel Chat Application

This project is a learning exercise in PHP Laravel and VueJS, focusing on building a chat application with various features and integrations.

This application allows users to interact with an AI-powered staff member. It includes features such as a simple user logging, message handling, feedback collection, and data visualization.

Getting Started

Upon loading the initial page you will be presented with a chat panel.

  • You enter your name, the AI will call the Register tool.
  • You may ask questions about the company such as:
    • Who is SeventyTwo?
    • What clients do you have?
    • Do you have any jobs available?
    • What staff do you have?
  • The AI will call the Scrape tool and scrape the site for answers, and is 70% accurate.

To end the conversation

Type and send:

  • Bye

Rating the conversation

You will now see the rating panel to rate your conversation.

  • Choose a rating, add a comment and submit.

Statistics page

This page requests data from the API, which responds with data from the MySQL database. Data is represented in tables and a graph.

Key Features

  1. Chat Interface: A Vue.js-based frontend with Vue Routing for user interactions.
  2. AI Integration: Uses Ollama API for generating AI responses.
  3. User Management: Simple user logging and tracking.
  4. Conversation Handling: Stores and manages chat conversations.
  5. Feedback System: Allows users to rate their chat experience.
  6. Statistics Page: Displays user engagement and conversation metrics.
  7. Web Scraping: Integrated functionality to scrape content from a specified website.

Technical Stack

  • Backend: PHP with Laravel framework
  • Frontend: Vue.js
  • Database: MySQL
  • API: RESTful API endpoints for chat, user management, and statistics
  • Styling: Tailwind CSS and various plugins

Key Components

  1. ChatController: Handles the main chat logic, including message processing and user interactions.
  2. OllamaController: Integrates with the Ollama API for AI-powered responses.
  3. ScraperController: Implements web scraping functionality.
  4. User, Message, and Feedback Models: Define the data structure for the application.
  5. User, Message, and Feedback Migrations: To provision the database tables.
  6. Vue Components: HomePage.vue, StatsPage.vue, and others for the frontend interface.
  7. API Routes: Defined in routes/api.php for various functionalities.