Permalink
Browse files

First version

  • Loading branch information...
akazorg committed Oct 10, 2018
1 parent 8e38bfc commit e125c7a2a20944d25d00ef98253b87b4b5dee695
Showing with 98,898 additions and 6 deletions.
  1. +3 −0 CHANGELOG.md
  2. +26 −0 CONTRIBUTING.md
  3. +11 −0 ISSUE_TEMPLATE
  4. +21 −0 LICENSE.md
  5. +179 −1 README.md
  6. +17 −5 composer.json
  7. +3,636 −0 composer.lock
  8. BIN docs/logo-mercurius-bold.png
  9. BIN docs/logo-mercurius-bold_alt.png
  10. BIN docs/logo-mercurius.png
  11. BIN docs/logo-mercurius_alt.png
  12. BIN docs/mercurius_preview_2018-oct.gif
  13. +4 −0 mix-manifest.json
  14. +40 −0 package.json
  15. +33 −0 phpunit.xml
  16. +32 −0 publishable/config/mercurius.php
  17. +35 −0 publishable/database/migrations/add_mercurius_user_fields.php
  18. +37 −0 publishable/database/migrations/create_mercurius_messages_table.php
  19. +19 −0 publishable/database/seeds/MercuriusDatabaseSeeder.php
  20. +140 −0 publishable/database/seeds/MercuriusMessagesTableSeeder.php
  21. +45 −0 publishable/database/seeds/MercuriusUsersTableSeeder.php
  22. +36 −0 publishable/lang/en/mercurius.json
  23. +15 −0 publishable/lang/en/mercurius.php
  24. +7,855 −0 publishable/public/css/mercurius.css
  25. BIN publishable/public/favicon-32x32.png
  26. BIN publishable/public/favicon.ico
  27. BIN publishable/public/img/avatar/__avatar.png
  28. BIN publishable/public/img/avatar/avatar_ian.png
  29. BIN publishable/public/img/avatar/avatar_lua.png
  30. BIN publishable/public/img/avatar/avatar_noa.png
  31. BIN publishable/public/img/avatar/avatar_placeholder.png
  32. BIN publishable/public/img/globe.png
  33. BIN publishable/public/img/logo-mercurius-bold-alt-sm.png
  34. BIN publishable/public/img/logo-mercurius-bold-sm.png
  35. BIN publishable/public/img/logo-mercurius-bold.png
  36. BIN publishable/public/img/logo-mercurius-outline-alt-sm.png
  37. BIN publishable/public/img/logo-mercurius-outline-sm.png
  38. BIN publishable/public/img/logo-mercurius-outline.png
  39. BIN publishable/public/img/logo-mercurius-txt-bold.png
  40. BIN publishable/public/img/logo-mercurius-txt-outline.png
  41. +82,194 −0 publishable/public/js/mercurius.js
  42. +111 −0 publishable/views/example.blade.php
  43. +124 −0 publishable/views/inc/icons-svg.blade.php
  44. +52 −0 publishable/views/inc/modal-profile-settings.blade.php
  45. +28 −0 publishable/views/inc/profile-dropdown.blade.php
  46. +40 −0 publishable/views/master.blade.php
  47. +29 −0 publishable/views/mercurius.blade.php
  48. +28 −0 resources/js/bootstrap-mercurius.js
  49. +93 −0 resources/js/bootstrap.js
  50. +213 −0 resources/js/conversations/Conversations.vue
  51. +40 −0 resources/js/conversations/ConversationsFilter.vue
  52. +88 −0 resources/js/conversations/conversations-http.js
  53. +52 −0 resources/js/core/Avatar.vue
  54. +19 −0 resources/js/core/BtnCompose.vue
  55. +28 −0 resources/js/core/I18N.js
  56. +41 −0 resources/js/core/notifications.js
  57. +56 −0 resources/js/core/profile-settings.js
  58. +45 −0 resources/js/core/theming.js
  59. +127 −0 resources/js/mercurius.js
  60. +72 −0 resources/js/messages/Composer.vue
  61. +196 −0 resources/js/messages/Messages.vue
  62. +124 −0 resources/js/messages/Recipient.vue
  63. +36 −0 resources/js/messages/message-sending.js
  64. +137 −0 resources/js/messages/messages-http.js
  65. +30 −0 resources/js/mixins/desktop-notification.js
  66. +49 −0 resources/js/mixins/local-storage.js
  67. +45 −0 resources/js/sidebar/BtnSidebarToggle.vue
  68. +27 −0 resources/js/sidebar/Sidebar.vue
  69. +95 −0 resources/sass/_variables.scss
  70. +38 −0 resources/sass/bootstrap-custom.scss
  71. +21 −0 resources/sass/bootstrap-variables.scss
  72. +9 −0 resources/sass/components/avatar.scss
  73. +13 −0 resources/sass/components/btn-compose.scss
  74. +21 −0 resources/sass/components/btn-sidebar-toggle.scss
  75. +55 −0 resources/sass/components/composer.scss
  76. +29 −0 resources/sass/components/conversations-empty.scss
  77. +34 −0 resources/sass/components/conversations-filter.scss
  78. +99 −0 resources/sass/components/conversations.scss
  79. +101 −0 resources/sass/components/messages.scss
  80. +83 −0 resources/sass/components/recipient-search.scss
  81. +9 −0 resources/sass/core/base.scss
  82. +33 −0 resources/sass/core/icons.scss
  83. +18 −0 resources/sass/core/layout.scss
  84. +15 −0 resources/sass/core/loading.scss
  85. +23 −0 resources/sass/core/notification-bell.scss
  86. +11 −0 resources/sass/core/profile-dropdown.scss
  87. +54 −0 resources/sass/core/profile-modal.scss
  88. +20 −0 resources/sass/core/sidebar.scss
  89. +33 −0 resources/sass/mercurius.scss
  90. +45 −0 resources/sass/sweetalert/button-loader.scss
  91. +32 −0 resources/sass/sweetalert/buttons.scss
  92. +33 −0 resources/sass/sweetalert/icons.scss
  93. +65 −0 resources/sass/sweetalert/icons/error.scss
  94. +29 −0 resources/sass/sweetalert/icons/info.scss
  95. +149 −0 resources/sass/sweetalert/icons/success.scss
  96. +36 −0 resources/sass/sweetalert/icons/warning.scss
  97. +82 −0 resources/sass/sweetalert/layout.scss
  98. +17 −0 resources/sass/sweetalert/swal.scss
  99. +89 −0 resources/sass/theme_light.scss
  100. +8 −0 routes/api.php
  101. +16 −0 routes/channels.php
  102. +49 −0 routes/web.php
  103. +58 −0 src/Commands/InstallCommand.php
  104. +17 −0 src/EventMap.php
  105. +69 −0 src/Events/MessageSent.php
  106. +82 −0 src/Events/UserOnlineStatus.php
  107. +13 −0 src/Facades/Mercurius.php
  108. +13 −0 src/Http/Controllers/Controller.php
  109. +82 −0 src/Http/Controllers/ConversationsController.php
  110. +57 −0 src/Http/Controllers/MessagesController.php
  111. +92 −0 src/Http/Controllers/ProfileController.php
  112. +55 −0 src/Http/Controllers/ReceiversController.php
  113. +44 −0 src/Mercurius.php
  114. +127 −0 src/MercuriusServiceProvider.php
  115. +43 −0 src/Models/Message.php
  116. +238 −0 src/Repositories/ConversationRepository.php
  117. +78 −0 src/Repositories/MessageRepository.php
  118. +19 −0 tests/TestCase.php
  119. +14 −0 tests/Unit/ExampleTest.php
  120. +5 −0 tests/bootstrap.php
  121. +20 −0 webpack.mix.js
@@ -0,0 +1,3 @@
# CHANGELOG

0.1.0 - First Release beta
@@ -0,0 +1,26 @@
How to contribute
=================

Contributions in the form of **✍Issues** and **🛠Pull requests** are welcomed and encouraged.

This project adheres to:

* [Contributor Covenant]: A Code of Conduct for Open Source Projects
* [Keep a Changelog]: Good practices for changelog file
* [pds/skeleton]: Standard PHP package skeleton
* [Vincent Driessen's branching model]: A branching model for Git
* [Semantic Versioning]: Simple rules for version numbers

It's encouraged to use:

* [The seven rules of a great Git commit message]: How to Write a Git Commit Message
* [git-flow]: Git extensions to provide high-level repository operations for Vincent Driessen's branching model


[Contributor Covenant]: https://www.contributor-covenant.org/
[git-flow]: https://danielkummer.github.io/git-flow-cheatsheet/
[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/
[pds/skeleton]: https://github.com/php-pds/skeleton
[Semantic Versioning]: http://semver.org/
[The seven rules of a great Git commit message]: https://chris.beams.io/posts/git-commit/#seven-rules
[Vincent Driessen's branching model]: http://nvie.com/posts/a-successful-git-branching-model/
@@ -0,0 +1,11 @@
# Write a subject for the ISSUE


## Server environment
- PHP: v#.#.#
- Laravel: v#.#.#
- Database: [type] [version] (e.g. MySQL 8.0)


## Description
Write a clear description for the issue.
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Bruno Torrinha

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
180 README.md
@@ -1 +1,179 @@
# Mercurius is setting up...
<p align="center">
<a href="https://www.github.com/launcher-host/mercurius/" target="_blank">
<img width="400px" src="docs/logo-mercurius-bold_alt.png" title="mercurius logo">
</a>
</p>
<h2 align="center">Messenger for Laravel</h2>
<p align="center">
<a href="https://travis-ci.org/launcher-host/mercurius"><img src="https://travis-ci.org/launcher-host/mercurius.svg?branch=master" alt="Build Status"></a>
<a href="https://styleci.io/repos/147903408/shield?style=flat"><img src="https://styleci.io/repos/147903408/shield?style=flat" alt="Build Status"></a>
<a href="https://packagist.org/packages/launcher/mercurius"><img src="https://poser.pugx.org/launcher/mercurius/v/stable.svg?format=flat" alt="Latest Version"></a>
<a href="https://packagist.org/packages/launcher/mercurius"><img src="https://poser.pugx.org/launcher/mercurius/downloads.svg?format=flat" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/launcher/mercurius"><img src="https://poser.pugx.org/launcher/mercurius/license.svg?format=flat" alt="License"></a>
</p>
## About
Mercurius is a real-time messenger system developed with Laravel and Vue.js. It features a complete application, and you can easily install with any Laravel project.
## Features
- Real-time chat
- Browser notifications
- Multilingual
- Lazy load messages
- Remove conversations and messages
- Search recipients with auto-complete
- Unique design, with dark and light theme
## Preview
<p align="center">
<a href="docs/mercurius_preview_2018-oct.gif" target="_blank">
<img width="100%" src="docs/mercurius_preview_2018-oct.gif" title="mercurius preview">
</a>
</p>
Desktop version (left) and Mobile version (right)
## Requirements
- Laravel 5.6 or 5.7
- Pusher account
- Vue.js 2.0
- BS 4
## Setting up Pusher
If you don't have an account, create a free account on [pusher.com website](https://pusher.com/). Go to the dashboard, create a new app and take note of the API credentials.
Now, let's add the keys to the `.env` file.
```php
...
PUSHER_APP_ID="xxxxxx"
PUSHER_APP_KEY="xxxxxxxxxxxxxxxxxxxx"
PUSHER_APP_SECRET="xxxxxxxxxxxxxxxxxxxx"
PUSHER_APP_CLUSTER="xx"
```
## Installation
##### 1. Uncomment `BroadcastServiceProvider`
Open `config/app.php` and uncomment the line `App\Providers\BroadcastServiceProvider::class,`.
##### 2. Laravel Authentication
Skip this step if authentication is already setup.
```bash
php artisan make:auth
```
##### 3. Install using composer
```bash
composer require launcher/mercurius
```
##### 4. Publish the config file
```bash
php artisan vendor:publish --tag=mercurius-config
```
##### 5. Configuration
For changing the default configuration, open `/config/mercurius.php` and add your own.
```php
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
```bash
php artisan mercurius:install
```
##### 7. Install dummy data (for testing)
```bash
php artisan db:seed --class=MercuriusDatabaseSeeder
```
## Demo Accounts
If you seed the dummy data, you will get 3 demo accounts for test the system.
- Ian: `ian@launcher.host`
- Noa: `noa@launcher.host`
- Lua: `lua@launcher.host`
Password: `password`
## Roadmap
- Unit tests
- Typing indicator
- Broadcast user status (when he goes on/off)
- Conversation with multiple users
- Search messages content
- Upload photos and attach files
- Preview images and videos
- Emoji support
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for more information.
## Changelog
We keep a [CHANGELOG](CHANGELOG.md) with the information that has changed.
## Credits
- [Bruno Torrinha](https://torrinha.com)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
@@ -1,6 +1,6 @@
{
"name": "launcher/mercurius",
"description": "A Laravel package ..",
"description": "A Laravel package w/ real-time messenger system",
"type": "library",
"license": "MIT",
"homepage": "https://launcher.host/mercurius/",
@@ -9,6 +9,10 @@
"source": "https://github.com/launcher-host/mercurius"
},
"keywords": [
"messenger",
"chat",
"pusher",
"web-sockets",
"laravel",
"vue"
],
@@ -19,29 +23,37 @@
],
"require": {
"php": "^7.0 || ^7.1",
"laravel/framework": "~5.5.0|~5.6.0|~5.7.0"
"laravel/framework": "~5.5.0|~5.6.0|~5.7.0",
"pusher/pusher-php-server": "^3.2"
},
"require-dev": {
"phpunit/phpunit": "^7.3",
"orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0",
"orchestra/database": "~3.5.0|~3.6.0",
"orchestra/testbench-core": "~3.5.0|~3.6.0",
"codeclimate/php-test-reporter": "dev-master",
"mockery/mockery": "^1.0"
},
"autoload": {
"psr-4": {
"Launcher\\Mercurius\\": "src/"
"Launcher\\Mercurius\\": "src/",
"Launcher\\Mercurius\\Database\\Seeds\\": "publishable/database/seeds/"
}
},
"autoload-dev": {
"psr-4": {
"Launcher\\Mercurius\\Tests\\": "tests"
"Launcher\\Mercurius\\Tests\\": "tests/"
}
},
"minimum-stability": "stable",
"extra": {
"laravel": {
"providers": [
"Launcher\\Mercurius\\MercuriusServiceProvider"
]
],
"aliases": {
"Mercurius": "Launcher\\Mercurius\\Facades\\Mercurius"
}
}
}
}
Oops, something went wrong.

0 comments on commit e125c7a

Please sign in to comment.