25

GitHub - launcher-host/mercurius: Real-time Messenger package for Laravel

 5 years ago
source link: https://github.com/launcher-host/mercurius
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

README.md

logo-mercurius-bold.png

Build Status Build Status Latest Version Total Downloads License

Table of Contents

About

Mercurius is a real-time messenger system using Laravel and Vue.js, featuring a complete application that you can easily install with any Laravel project.

Preview

mercurius_preview_2018-oct.gif

Features

  • Real-time Messenger
  • Responsive
  • Multilingual
  • Browser notifications
  • Unique UX, with dark and light theme
  • Lazy load messages
  • Remove conversations and messages
  • Search recipients with auto-complete

Screenshots

mercurius_01_home_tb.png mercurius_02_view_conversation_tb.png mercurius_03_messages_hover_tb.png
mercurius_04_compose_message_tb.png mercurius_05_find_recipient_results_tb.png mercurius_06_user_settings_tb.png
Click thumbs to enlarge image

Demo

You can try a demo of Mercurius. Authenticate using any of the following credentials:

Password: password

Tip: Open 2 different browsers and login with different usernames, so you can test send/receiving messages.


Requirements

  • Laravel 5.6 or 5.7
  • Pusher account
  • Vue.js 2.0
  • Bootstrap 4

Installation

1. Setup Pusher

If you don't have an account, create a free one on pusher.com website. Go to the dashboard, create a new app and take note of the API credentials.

Now, let's add the API keys to the .env file. Also, change the BROADCAST_DRIVER to pusher (default is log).

...
BROADCAST_DRIVER=pusher
...
PUSHER_APP_ID="xxxxxx"
PUSHER_APP_KEY="xxxxxxxxxxxxxxxxxxxx"
PUSHER_APP_SECRET="xxxxxxxxxxxxxxxxxxxx"
PUSHER_APP_CLUSTER="xx"
2. Register BroadcastServiceProvider

Open config/app.php and uncomment the line App\Providers\BroadcastServiceProvider::class,.

3. Laravel Authentication

Skip this step if authentication is already setup, otherwise type:

php artisan make:auth
4. Install Mercurius
composer require launcher/mercurius
5. Configuration (optional)

If you want to change the default configuration, publish the config file, by typing the command:

php artisan vendor:publish --tag=mercurius-config

For editing the config, open /config/mercurius.php and add your own values.

return [

    /*
    |--------------------------------------------------------------------------
    | Mercurius Models
    |--------------------------------------------------------------------------
    |
    | Defines the models used with Mercurius, use it to extend Mercurius and
    | create your own implementation.
    |
    */

    'models' => [
        'user' => App\User::class,
        'messages' => Launcher\Mercurius\Models\Message::class,
    ],
];
6. Install Mercurius
php artisan mercurius:install
composer dump-autoload
7. Install dummy data (for testing)
php artisan db:seed --class=MercuriusDatabaseSeeder

Demo Accounts

If you seed the dummy data, you will get 3 demo accounts for test the system.

Password: password


Customizing Mercurius

Please see Customizing-Mercurius for more information.


Roadmap

Check the roadmap for more information.

  • Unit Tests
  • Typing indicator
  • Broadcast user status (when he goes on/off)
  • Conversation with multiple users
  • Search in messages content
  • Upload photos and attach files
  • Preview images and videos
  • Emoji support
  • Video Chat
  • Support socket.io
  • Web Hooks

Support


Contributing

Please see CONTRIBUTING for more information.


Changelog

We keep a CHANGELOG with the information that has changed.


Credits


Copyright and license

Copyright 2018 Bruno Torrinha. Mercurius is released under the MIT License.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK