Overview
The Basement Chat package is designed to enhance user engagement, boost collaboration, and improve communication within Laravel applications through a real-time chat widget. Inspired by Aech’s private chat room from Ready Player One, this package offers features such as real-time messaging, online status indicators, and customizable push notifications.
Features
- Real-time messages: Instant communication between users.
- User’s online status: Visibility of users currently online.
- User’s typing indicator: Shows when a user is typing a message.
- Messages read status: Indicates when messages have been read.
- Configurable push notifications: Customizable push notifications from the client side.
- Searchable contacts and messages: Easily find contacts and past messages.
- Extendable actions behavior: Ability to extend and customize chat actions.
- Lazy loading with infinite scroll: Efficiently loads messages with infinite scroll.
- Intuitive design with TailwindCSS and Alpine.js: Attractive design using popular frontend frameworks.
Installation
- Ensure server-side requirements are met with php ^8.0 and laravel/framework ^9.0.0 | ^10.0.0.
- Verify client-side compatibility with chrome >= 80, edge >= 80, firefox >= 74, or equivalent browsers.
- Open a terminal in your Laravel project directory.
- Install the package with the command: composer require basement/chat.
- Publish configuration, assets, and migration files with: php artisan vendor:publish –tag=basement-config.
- Run database migrations: php artisan migrate.
- Enable BroadcastServiceProvider::class in config/app.php.
- Choose a broadcast driver: Pusher, Ably, Soketi, or Laravel Websockets.
- For Pusher, configure .env with Pusher credentials.
- For Ably, set Ably credentials in .env.
- For Soketi, configure .env with relevant settings and run the Soketi server.
- For Laravel Websockets, configure .env with necessary details and run the server.
- Configure Sanctum stateful domains in .env for authentication.
Summary
The Basement Chat package offers a comprehensive solution for integrating real-time chat functionality into Laravel applications. With features like real-time messaging, customizable notifications, and an intuitive design, this package provides a seamless communication experience. By following the installation guide and configuring the appropriate broadcast driver, users can enhance collaboration and engagement within their Laravel projects.