├── client_labs ├── static │ ├── .gitkeep │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── .eslintignore ├── src │ ├── assets │ │ ├── css │ │ │ ├── variables.scss │ │ │ └── global.scss │ │ ├── logo.png │ │ └── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ ├── env.example.js │ ├── pages │ │ ├── DashboardPage.vue │ │ ├── ChatPage.vue │ │ ├── ForgotPassword.vue │ │ ├── ResetPassword.vue │ │ └── LoginPage.vue │ ├── components │ │ ├── Hello.vue │ │ ├── private-message │ │ │ ├── PrivateMessageSidebar.vue │ │ │ ├── PrivateMessageView.vue │ │ │ ├── PrivateMessageSent.vue │ │ │ ├── PrivateMessageInbox.vue │ │ │ ├── PrivateMessageCompose.vue │ │ │ ├── PrivateMessageNotificationDropdown.vue │ │ │ └── privateMessageStore.js │ │ ├── user │ │ │ └── userStore.js │ │ ├── chat │ │ │ ├── ChatWidget.vue │ │ │ ├── ChatUserList.vue │ │ │ ├── chatStore.js │ │ │ └── ChatAddWidget.vue │ │ └── TopMenu.vue │ ├── store.js │ ├── plugins │ │ └── Logger.js │ ├── App.vue │ ├── config.js │ └── main.js ├── config │ ├── prod.env.js │ ├── dev.env.js │ └── index.js ├── .gitignore ├── .babelrc ├── .editorconfig ├── build │ ├── dev-client.js │ ├── build.js │ ├── webpack.dev.conf.js │ ├── utils.js │ ├── dev-server.js │ ├── webpack.base.conf.js │ └── webpack.prod.conf.js ├── index.html ├── .eslintrc.js ├── README.md └── package.json ├── server_labs ├── public │ ├── favicon.ico │ ├── robots.txt │ ├── .htaccess │ ├── web.config │ └── index.php ├── database │ ├── seeds │ │ ├── .gitkeep │ │ ├── DatabaseSeeder.php │ │ └── UsersTableSeeder.php │ ├── .gitignore │ ├── migrations │ │ ├── .gitkeep │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ ├── 2017_03_22_152303_create_tokens_table.php │ │ ├── 2014_10_12_000000_create_users_table.php │ │ ├── 2016_10_20_172729_create_chats_table.php │ │ └── 2016_12_24_124836_create_private_messages_table.php │ └── factories │ │ └── ModelFactory.php ├── resources │ ├── views │ │ ├── vendor │ │ │ └── .gitkeep │ │ ├── mails │ │ │ └── forgot-password.blade.php │ │ ├── errors │ │ │ └── 503.blade.php │ │ └── welcome.blade.php │ ├── assets │ │ ├── sass │ │ │ ├── app.scss │ │ │ └── _variables.scss │ │ └── js │ │ │ ├── app.js │ │ │ ├── components │ │ │ └── Example.vue │ │ │ └── bootstrap.js │ └── lang │ │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ ├── passwords.php │ │ └── validation.php ├── storage │ ├── logs │ │ └── .gitignore │ ├── app │ │ ├── public │ │ │ └── .gitignore │ │ └── .gitignore │ ├── framework │ │ ├── cache │ │ │ └── .gitignore │ │ ├── views │ │ │ └── .gitignore │ │ ├── sessions │ │ │ └── .gitignore │ │ └── .gitignore │ ├── oauth-public.key │ └── oauth-private.key ├── bootstrap │ ├── cache │ │ └── .gitignore │ ├── autoload.php │ └── app.php ├── .gitattributes ├── routes │ ├── web.php │ ├── console.php │ └── api.php ├── .gitignore ├── app │ ├── Token.php │ ├── Http │ │ ├── Middleware │ │ │ ├── EncryptCookies.php │ │ │ ├── VerifyCsrfToken.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ └── Cors.php │ │ ├── Controllers │ │ │ ├── Controller.php │ │ │ ├── Auth │ │ │ │ ├── ResetPasswordController.php │ │ │ │ ├── ForgotPasswordController.php │ │ │ │ ├── LoginController.php │ │ │ │ └── RegisterController.php │ │ │ ├── ChatController.php │ │ │ ├── UserController.php │ │ │ └── PrivateMessageController.php │ │ └── Kernel.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── BroadcastServiceProvider.php │ │ ├── EventServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ └── RouteServiceProvider.php │ ├── Chat.php │ ├── User.php │ ├── PrivateMessage.php │ ├── Console │ │ └── Kernel.php │ ├── Mail │ │ └── ForgotPassword.php │ └── Exceptions │ │ └── Handler.php ├── package.json ├── tests │ ├── ExampleTest.php │ └── TestCase.php ├── .env.example ├── gulpfile.js ├── server.php ├── phpunit.xml ├── config │ ├── compile.php │ ├── services.php │ ├── view.php │ ├── broadcasting.php │ ├── pusher.php │ ├── filesystems.php │ ├── queue.php │ ├── cache.php │ ├── auth.php │ ├── database.php │ ├── mail.php │ ├── session.php │ └── app.php ├── composer.json ├── artisan └── readme.md └── node_server ├── .gitignore ├── package.json ├── server.js └── yarn.lock /client_labs/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server_labs/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /node_server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /server_labs/database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /server_labs/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /server_labs/database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /server_labs/resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /client_labs/.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | -------------------------------------------------------------------------------- /server_labs/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /server_labs/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /server_labs/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /server_labs/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /server_labs/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /server_labs/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /client_labs/src/assets/css/variables.scss: -------------------------------------------------------------------------------- 1 | $border-color: #e7e7e7; 2 | -------------------------------------------------------------------------------- /server_labs/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /server_labs/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /client_labs/config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /client_labs/src/env.example.js: -------------------------------------------------------------------------------- 1 | export const clientId = '' 2 | export const clientSecret = '' 3 | -------------------------------------------------------------------------------- /server_labs/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | -------------------------------------------------------------------------------- /client_labs/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | src/env.js 6 | .idea/ 7 | -------------------------------------------------------------------------------- /client_labs/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitavroy/vuespa/HEAD/client_labs/src/assets/logo.png -------------------------------------------------------------------------------- /server_labs/routes/web.php: -------------------------------------------------------------------------------- 1 | Forgot password 2 |

We have rec. a request from you to reset your password.

3 |

Click here to reset your password.

4 | -------------------------------------------------------------------------------- /server_labs/app/Token.php: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 4 | } 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /server_labs/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /server_labs/app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

{{ msg }}

4 |
5 | 6 | 7 | 16 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /node_server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodeapp", 3 | "version": "1.0.0", 4 | "description": "Node socket based app", 5 | "main": "server.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Amitav Roy", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.14.0", 13 | "redis": "^3.1.1", 14 | "socket.io": "^2.4.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /server_labs/app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 4 | } 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /server_labs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "prod": "gulp --production", 5 | "dev": "gulp watch" 6 | }, 7 | "devDependencies": { 8 | "bootstrap-sass": "^3.3.7", 9 | "gulp": "^3.9.1", 10 | "jquery": "^3.1.0", 11 | "laravel-elixir": "^6.0.0-9", 12 | "laravel-elixir-vue": "^0.1.4", 13 | "laravel-elixir-webpack-official": "^1.0.2", 14 | "lodash": "^4.14.0", 15 | "vue": "^1.0.26", 16 | "vue-resource": "^0.9.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /client_labs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Labs 6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /client_labs/src/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | import userStore from './components/user/userStore' 5 | import chatStore from './components/chat/chatStore' 6 | import privateMessageStore from './components/private-message/privateMessageStore' 7 | 8 | Vue.use(Vuex) 9 | const debug = process.env.NODE_ENV !== 'production' 10 | 11 | export default new Vuex.Store({ 12 | modules: { 13 | userStore, chatStore, privateMessageStore 14 | }, 15 | strict: debug 16 | }) 17 | -------------------------------------------------------------------------------- /server_labs/tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | visit('/') 17 | ->see('Laravel'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /server_labs/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | { 17 | mix.sass('app.scss') 18 | .webpack('app.js'); 19 | }); 20 | -------------------------------------------------------------------------------- /server_labs/resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /server_labs/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /server_labs/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /server_labs/server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /client_labs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | parserOptions: { 5 | sourceType: 'module' 6 | }, 7 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 8 | extends: 'standard', 9 | // required to lint *.vue files 10 | plugins: [ 11 | 'html' 12 | ], 13 | // add your custom rules here 14 | 'rules': { 15 | // allow paren-less arrow functions 16 | 'arrow-parens': 0, 17 | // allow async-await 18 | 'generator-star-spacing': 0, 19 | // allow debugger during development 20 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /server_labs/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /server_labs/app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /server_labs/resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * include Vue and Vue Resource. This gives a great starting point for 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | /** 11 | * Next, we will create a fresh Vue application instance and attach it to 12 | * the body of the page. From here, you may begin adding components to 13 | * the application, or feel free to tweak this setup for your needs. 14 | */ 15 | 16 | Vue.component('example', require('./components/Example.vue')); 17 | 18 | const app = new Vue({ 19 | el: 'body' 20 | }); 21 | -------------------------------------------------------------------------------- /server_labs/app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | id === (int) $userId; 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /server_labs/resources/assets/js/components/Example.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /server_labs/resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /server_labs/app/Chat.php: -------------------------------------------------------------------------------- 1 | sender_id)->first(); 26 | } 27 | 28 | public function getReceiverAttribute() 29 | { 30 | return User::where('id', $this->receiver_id)->first(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server_labs/app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server_labs/app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 18 | ]; 19 | 20 | /** 21 | * Register any authentication / authorization services. 22 | * 23 | * @return void 24 | */ 25 | public function boot() 26 | { 27 | $this->registerPolicies(); 28 | 29 | Passport::routes(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client_labs/src/plugins/Logger.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | function Logger (Vue, options) { 3 | Vue.prototype.$logger = function (level, ...message) { 4 | var levelDef = { 5 | info: 'info', 6 | error: 'error', 7 | warn: 'warn', 8 | log: 'log' 9 | } 10 | level = level || levelDef.info 11 | if (options.loggin) { 12 | console[level](message) 13 | } 14 | } 15 | Vue.$logger = function (level, ...message) { 16 | var levelDef = { 17 | info: 'info', 18 | error: 'error', 19 | warn: 'warn', 20 | log: 'log' 21 | } 22 | level = level || levelDef.info 23 | if (options.loggin) { 24 | console[level](message) 25 | } 26 | } 27 | } 28 | module.exports = Logger 29 | })() 30 | -------------------------------------------------------------------------------- /client_labs/README.md: -------------------------------------------------------------------------------- 1 | # Vue 2.0 Single page application 2 | 3 | This is a RND application built with Vue.js 2.0 as frotn end. The back end for 4 | now is developed using Laravel 5.3. The releases are developed as per the 5 | tutorials that I have created on Youtube. 6 | 7 | The authentication mechanism is OAuth available with Passport along with Laravel. 8 | Currently, the password grant type is used to validate the **User** and assign the 9 | **Access token** and **Refresh token**. 10 | 11 | ## Authorization token 12 | After authenticating the **User** at the following url /oauth/token, all subsequent 13 | urls will require the Authorization header. Below is the format in which the **access_token** 14 | needs to be supplied in order for the oauth authentication. 15 | 16 | Authorization: Bearer [access_token] 17 | 18 | -------------------------------------------------------------------------------- /client_labs/src/assets/css/global.scss: -------------------------------------------------------------------------------- 1 | @import './variables.scss'; 2 | .pointer { 3 | cursor: pointer; 4 | } 5 | .navbar-default .navbar-nav a.router-link-active { 6 | color: #333333; 7 | background-color: transparent; 8 | } 9 | .nav-pills>li>a.router-link-active { 10 | color: #fff; 11 | background-color: #337ab7; 12 | } 13 | .col-with-right-border { 14 | border-right: 1px solid $border-color; 15 | } 16 | /*Label*/ 17 | .label { 18 | position: absolute; 19 | top: 12px; 20 | right: 9px; 21 | text-align: center; 22 | font-size: 9px; 23 | padding: 2px 3px; 24 | line-height: .9; 25 | &.label-success { 26 | background-color: #00a65a !important; 27 | } 28 | } 29 | /*End Label*/ 30 | 31 | .PrivateMessage { 32 | .message-table { 33 | tr.unread { 34 | font-weight: bold; 35 | } 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /server_labs/database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | static $password; 16 | 17 | return [ 18 | 'name' => $faker->name, 19 | 'email' => $faker->unique()->safeEmail, 20 | 'password' => $password ?: $password = bcrypt('secret'), 21 | 'remember_token' => str_random(10), 22 | ]; 23 | }); 24 | -------------------------------------------------------------------------------- /node_server/server.js: -------------------------------------------------------------------------------- 1 | var app = require('express')(); 2 | var server = require('http').Server(app); 3 | var io = require('socket.io')(server); 4 | var redis = require('redis'); 5 | 6 | server.listen(8890); 7 | io.on('connection', function (socket) { 8 | 9 | console.log("new client connected"); 10 | var redisClient = redis.createClient(); 11 | 12 | redisClient.subscribe('message'); 13 | redisClient.on("message", function(channel, message) { 14 | console.log("new message in queue "+ channel); 15 | socket.emit(channel, message); 16 | }); 17 | 18 | redisClient.subscribe('messageRead'); 19 | redisClient.on("messageRead", function(channel, message) { 20 | console.log("message was read"); 21 | socket.emit(channel, message); 22 | }); 23 | 24 | socket.on('disconnect', function() { 25 | redisClient.quit(); 26 | }); 27 | 28 | }); -------------------------------------------------------------------------------- /client_labs/src/App.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 32 | 33 | 37 | -------------------------------------------------------------------------------- /server_labs/storage/oauth-public.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApl/sgVBsq+3LehLRaX+J 3 | mm7b3yP8XvzNQcXq9UpEt0qi/AZiebGxljRJMzcwpg3rpWef00Z/9GnYcO/lG5n1 4 | dVopzCdqgupJfv0aa5qugst6WL+fU1J3LUB0e86ISG2sBmY41DKXmFV5ehqlqqAL 5 | C73iEvCjdOb6c/ioNQh3jVhq4r2adnyXP3xyg2jQvae3mieHg/FubMmAKunTjLVK 6 | yjb13LWJfeIhzg7dB1oysEETpVErtDXgRoMj9F67Mxc+HZ6n9q2R2bRXaULu0NTh 7 | /E6j4vQP0LLvCKOhW8dIZSLRwvmFKqn68+i883OKfYapeP5HMDLturXCs/OL5dDQ 8 | WsjGum2CCqZWON4Kiw/ivVKICxfJ5NC/tAesGCfAeYM8dJTjnlMYiJ3nBfcE0Eo8 9 | dNb+B2TyYfPM+vbXI1UlqR0kMOSAlgViy8aLoHfAQWU0eiIqMrKi53nha0r4o5Vd 10 | Gf3PSootGIyU9QNdRJF0b7WDiSUEvaYNtRW3/OIeGLgkj5EDR/hHQpkHmkCHaqbH 11 | 126F5KsJYOceu9Hsdw2tSTNINK97KpTKAFBCuIqhniLpTLHy1insrvArWSMnCSx/ 12 | NxQXtjgCjh1iADVGfeN5iNQQFQw0x5tuGsPIz8yWvB6mJrTbxdPMcYN3CtzMD9RR 13 | sbZ4rBN+R8Y7O8X1Ljn3AlsCAwEAAQ== 14 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /server_labs/app/Http/Middleware/Cors.php: -------------------------------------------------------------------------------- 1 | server()['HTTP_ORIGIN'])) { 21 | $origin = $request->server()['HTTP_ORIGIN']; 22 | if (in_array($origin, $domains)) { 23 | header('Access-Control-Allow-Origin: ' . $origin); 24 | header('Access-Control-Allow-Headers: Origin, Content-Type, Authorization'); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /server_labs/app/User.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Token'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /server_labs/database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server_labs/database/migrations/2017_03_22_152303_create_tokens_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id')->unsigned(); 19 | $table->string('token'); 20 | $table->timestamp('expire_at'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('tokens'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /server_labs/app/PrivateMessage.php: -------------------------------------------------------------------------------- 1 | diffForHumans(); 23 | } 24 | 25 | public function getSenderAttribute() 26 | { 27 | return User::where('id', $this->sender_id)->first(); 28 | } 29 | 30 | public function getReceiverAttribute() 31 | { 32 | return User::where('id', $this->receiver_id)->first(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /server_labs/resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /server_labs/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::drop('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /server_labs/database/migrations/2016_10_20_172729_create_chats_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('sender_id')->unsigned(); 19 | $table->integer('receiver_id')->unsigned(); 20 | $table->text('chat'); 21 | $table->boolean('read'); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('chats'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server_labs/resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $font-family-sans-serif: "Raleway", sans-serif; 21 | $font-size-base: 14px; 22 | $line-height-base: 1.6; 23 | $text-color: #636b6f; 24 | 25 | // Navbar 26 | $navbar-default-bg: #fff; 27 | 28 | // Buttons 29 | $btn-default-color: $text-color; 30 | 31 | // Inputs 32 | $input-border: lighten($text-color, 40%); 33 | $input-border-focus: lighten($brand-primary, 25%); 34 | $input-color-placeholder: lighten($text-color, 30%); 35 | 36 | // Panels 37 | $panel-default-heading-bg: #fff; 38 | -------------------------------------------------------------------------------- /server_labs/app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the Closure based commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | require base_path('routes/console.php'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server_labs/public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /client_labs/build/build.js: -------------------------------------------------------------------------------- 1 | // https://github.com/shelljs/shelljs 2 | require('shelljs/global') 3 | env.NODE_ENV = 'production' 4 | 5 | var path = require('path') 6 | var config = require('../config') 7 | var ora = require('ora') 8 | var webpack = require('webpack') 9 | var webpackConfig = require('./webpack.prod.conf') 10 | 11 | console.log( 12 | ' Tip:\n' + 13 | ' Built files are meant to be served over an HTTP server.\n' + 14 | ' Opening index.html over file:// won\'t work.\n' 15 | ) 16 | 17 | var spinner = ora('building for production...') 18 | spinner.start() 19 | 20 | var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory) 21 | rm('-rf', assetsPath) 22 | mkdir('-p', assetsPath) 23 | cp('-R', 'static/*', assetsPath) 24 | 25 | webpack(webpackConfig, function (err, stats) { 26 | spinner.stop() 27 | if (err) throw err 28 | process.stdout.write(stats.toString({ 29 | colors: true, 30 | modules: false, 31 | children: false, 32 | chunks: false, 33 | chunkModules: false 34 | }) + '\n') 35 | }) 36 | -------------------------------------------------------------------------------- /server_labs/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /server_labs/database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 17 | 18 | $user1 = [ 19 | 'name' => 'Amitav Roy', 20 | 'email' => 'amitavroy@gmail.com', 21 | 'password' => Hash::make('password'), 22 | ]; 23 | 24 | User::create($user1); 25 | 26 | $user2 = [ 27 | 'name' => 'Foo', 28 | 'email' => 'foo@gmail.com', 29 | 'password' => Hash::make('password'), 30 | ]; 31 | 32 | User::create($user2); 33 | 34 | $user3 = [ 35 | 'name' => 'Bar', 36 | 'email' => 'bar@gmail.com', 37 | 'password' => Hash::make('password'), 38 | ]; 39 | 40 | User::create($user3); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /client_labs/src/components/user/userStore.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { 3 | getHeader, 4 | userListUrl 5 | } from './../../config' 6 | const state = { 7 | authUser: null, 8 | users: [] 9 | } 10 | 11 | const mutations = { 12 | SET_AUTH_USER (state, userObj) { 13 | state.authUser = userObj 14 | }, 15 | CLEAR_AUTH_USER (state) { 16 | state.authUser = null 17 | }, 18 | SET_USER_LIST (state, users) { 19 | state.users = users 20 | } 21 | } 22 | 23 | const actions = { 24 | setUserObject: ({commit}, userObj) => { 25 | commit('SET_AUTH_USER', userObj) 26 | }, 27 | clearAuthUser: ({commit}) => { 28 | commit('CLEAR_AUTH_USER') 29 | }, 30 | getUserList: ({commit}) => { 31 | return Vue.http.get(userListUrl, {headers: getHeader()}) 32 | .then(response => { 33 | Vue.$logger('info', 'userListUrl response', response) 34 | if (response.status === 200) { 35 | commit('SET_USER_LIST', response.body.data) 36 | return response.body.data 37 | } 38 | }) 39 | } 40 | } 41 | 42 | export default { 43 | state, mutations, actions 44 | } 45 | -------------------------------------------------------------------------------- /server_labs/config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'logout']); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /server_labs/config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /server_labs/config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /server_labs/app/Mail/ForgotPassword.php: -------------------------------------------------------------------------------- 1 | user = $token->user; 26 | $this->token = $token; 27 | $this->request = $request; 28 | } 29 | 30 | /** 31 | * Build the message. 32 | * 33 | * @return $this 34 | */ 35 | public function build() 36 | { 37 | $url = $this->request->input('url'); 38 | 39 | return $this->from('admin@admin.com') 40 | ->view('mails.forgot-password') 41 | ->with('token', $this->token) 42 | ->with('url', $url) 43 | ->with('user', $this->user); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /server_labs/routes/api.php: -------------------------------------------------------------------------------- 1 | user(); 10 | })->middleware('auth:api'); 11 | 12 | Route::group(['prefix' => 'v1', 'middleware' => 'auth:api'], function () { 13 | Route::get('user-list', 'UserController@getUserList'); 14 | 15 | /*Chat urls*/ 16 | Route::post('get-user-conversation', 'ChatController@getUserConversationById'); 17 | Route::post('save-chat', 'ChatController@saveUserChat'); 18 | 19 | /*Private Message urls*/ 20 | Route::post('get-private-message-notifications', 'PrivateMessageController@getUserNotifications'); 21 | Route::post('get-private-messages', 'PrivateMessageController@getPrimateMessages'); 22 | Route::post('get-private-message', 'PrivateMessageController@getPrivateMessageById'); 23 | Route::post('get-private-messages-sent', 'PrivateMessageController@getPrivateMessageSent'); 24 | Route::post('send-private-message', 'PrivateMessageController@sendPrivateMessage'); 25 | }); 26 | -------------------------------------------------------------------------------- /server_labs/database/migrations/2016_12_24_124836_create_private_messages_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('sender_id')->unsigned(); 19 | $table->integer('receiver_id')->unsigned(); 20 | $table->string('subject'); 21 | $table->text('message'); 22 | $table->boolean('read'); 23 | $table->timestamps(); 24 | 25 | $table->index('sender_id'); 26 | $table->index(['sender_id', 'read']); 27 | $table->index('receiver_id'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('private_messages'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /client_labs/src/config.js: -------------------------------------------------------------------------------- 1 | export const apiDomain = 'http://localhost:8000/' 2 | export const loginUrl = apiDomain + 'oauth/token' 3 | export const userUrl = apiDomain + 'api/user' 4 | export const forgotPassword = apiDomain + 'api/forgot-password' 5 | export const resetPassword = apiDomain + 'api/reset-password' 6 | 7 | export const userListUrl = apiDomain + 'api/v1/user-list' 8 | export const getUserConversationUrl = apiDomain + 'api/v1/get-user-conversation' 9 | export const saveChatMessageUrl = apiDomain + 'api/v1/save-chat' 10 | 11 | export const getUserPMNotifications = apiDomain + 'api/v1/get-private-message-notifications' 12 | export const getUserPrivateMessages = apiDomain + 'api/v1/get-private-messages' 13 | export const getUserPrivateMessagesSent = apiDomain + 'api/v1/get-private-messages-sent' 14 | export const getPrivateMessageById = apiDomain + 'api/v1/get-private-message' 15 | export const sendPrivateMessage = apiDomain + 'api/v1/send-private-message' 16 | 17 | export const getHeader = function () { 18 | const tokenData = JSON.parse(window.localStorage.getItem('authUser')) 19 | const headers = { 20 | 'Accept': 'application/json', 21 | 'Authorization': 'Bearer ' + tokenData.access_token 22 | } 23 | return headers 24 | } 25 | -------------------------------------------------------------------------------- /server_labs/bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Be right back. 5 | 6 | 7 | 8 | 39 | 40 | 41 |
42 |
43 |
Be right back.
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /client_labs/src/components/chat/ChatWidget.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 29 | 30 | 53 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/ChatController.php: -------------------------------------------------------------------------------- 1 | input('id'); 15 | $authUserId = $request->user()->id; 16 | $chats = Chat::whereIn('sender_id', [$authUserId,$userId]) 17 | ->whereIn('receiver_id', [$authUserId,$userId]) 18 | ->orderBy('created_at', 'desc') 19 | ->get(); 20 | 21 | return response(['data' => $chats], 200); 22 | } 23 | 24 | public function saveUserChat (Request $request) 25 | { 26 | $sender_id = $request->user()->id; 27 | $receiver_id = $request->input('receiver_id'); 28 | $chatText = $request->input('chat'); 29 | 30 | $data = [ 31 | 'sender_id' => $sender_id, 32 | 'receiver_id' => $receiver_id, 33 | 'chat' => $chatText, 34 | 'read' => 1 35 | ]; 36 | $chat = Chat::create($data); 37 | $finalData = Chat::where('id', $chat->id)->first(); 38 | LaravelPusher::trigger('chat_channel', 'chat_saved', ['message' => $finalData]); 39 | 40 | return response(['data' => $finalData], 201); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /client_labs/src/components/private-message/PrivateMessageView.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 46 | -------------------------------------------------------------------------------- /server_labs/resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | window.$ = window.jQuery = require('jquery'); 11 | require('bootstrap-sass'); 12 | 13 | /** 14 | * Vue is a modern JavaScript library for building interactive web interfaces 15 | * using reactive data binding and reusable components. Vue's API is clean 16 | * and simple, leaving you to focus on building your next great project. 17 | */ 18 | 19 | window.Vue = require('vue'); 20 | require('vue-resource'); 21 | 22 | /** 23 | * We'll register a HTTP interceptor to attach the "CSRF" header to each of 24 | * the outgoing requests issued by this application. The CSRF middleware 25 | * included with Laravel will automatically verify the header's value. 26 | */ 27 | 28 | Vue.http.interceptors.push((request, next) => { 29 | request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken; 30 | 31 | next(); 32 | }); 33 | 34 | /** 35 | * Echo exposes an expressive API for subscribing to channels and listening 36 | * for events that are broadcast by Laravel. Echo and event broadcasting 37 | * allows your team to easily build robust real-time web applications. 38 | */ 39 | 40 | // import Echo from "laravel-echo" 41 | 42 | // window.Echo = new Echo({ 43 | // broadcaster: 'pusher', 44 | // key: 'your-pusher-key' 45 | // }); 46 | -------------------------------------------------------------------------------- /client_labs/src/components/chat/ChatUserList.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 51 | -------------------------------------------------------------------------------- /server_labs/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=5.6.4", 9 | "laravel/framework": "5.3.*", 10 | "laravel/passport": "^1.0", 11 | "vinkla/pusher": "^2.4", 12 | "predis/predis": "^1.1" 13 | }, 14 | "require-dev": { 15 | "fzaninotto/faker": "~1.4", 16 | "mockery/mockery": "0.9.*", 17 | "phpunit/phpunit": "~5.0", 18 | "symfony/css-selector": "3.1.*", 19 | "symfony/dom-crawler": "3.1.*" 20 | }, 21 | "autoload": { 22 | "classmap": [ 23 | "database" 24 | ], 25 | "psr-4": { 26 | "App\\": "app/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "classmap": [ 31 | "tests/TestCase.php" 32 | ] 33 | }, 34 | "scripts": { 35 | "post-root-package-install": [ 36 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 37 | ], 38 | "post-create-project-cmd": [ 39 | "php artisan key:generate" 40 | ], 41 | "post-install-cmd": [ 42 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 43 | "php artisan optimize" 44 | ], 45 | "post-update-cmd": [ 46 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 47 | "php artisan optimize" 48 | ] 49 | }, 50 | "config": { 51 | "preferred-install": "dist" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /client_labs/src/pages/ChatPage.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 48 | 49 | 58 | -------------------------------------------------------------------------------- /client_labs/src/components/private-message/PrivateMessageSent.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 51 | -------------------------------------------------------------------------------- /server_labs/config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_KEY'), 36 | 'secret' => env('PUSHER_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /client_labs/src/pages/ForgotPassword.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 54 | 55 | 59 | -------------------------------------------------------------------------------- /server_labs/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /server_labs/artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /server_labs/config/pusher.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | return [ 13 | 14 | /* 15 | |-------------------------------------------------------------------------- 16 | | Default Connection Name 17 | |-------------------------------------------------------------------------- 18 | | 19 | | Here you may specify which of the connections below you wish to use as 20 | | your default connection for all work. Of course, you may use many 21 | | connections at once using the manager class. 22 | | 23 | */ 24 | 25 | 'default' => 'main', 26 | 27 | /* 28 | |-------------------------------------------------------------------------- 29 | | Pusher Connections 30 | |-------------------------------------------------------------------------- 31 | | 32 | | Here are each of the connections setup for your application. Example 33 | | configuration has been included, but you may add as many connections as 34 | | you would like. 35 | | 36 | */ 37 | 38 | 'connections' => [ 39 | 40 | 'main' => [ 41 | 'auth_key' => env('PUSHER_KEY'), 42 | 'secret' => env('PUSHER_SECRET'), 43 | 'app_id' => env('PUSHER_APP_ID'), 44 | 'options' => [], 45 | 'host' => null, 46 | 'port' => null, 47 | 'timeout' => null, 48 | ], 49 | 50 | 'alternative' => [ 51 | 'auth_key' => 'your-auth-key', 52 | 'secret' => 'your-secret', 53 | 'app_id' => 'your-app-id', 54 | 'options' => [], 55 | 'host' => null, 56 | 'port' => null, 57 | 'timeout' => null, 58 | ], 59 | 60 | ], 61 | 62 | ]; 63 | -------------------------------------------------------------------------------- /client_labs/src/components/private-message/PrivateMessageInbox.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 57 | -------------------------------------------------------------------------------- /server_labs/readme.md: -------------------------------------------------------------------------------- 1 | # Laravel PHP Framework 2 | 3 | [![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) 4 | [![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.svg)](https://packagist.org/packages/laravel/framework) 5 | [![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework) 6 | [![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework) 7 | [![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework) 8 | 9 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching. 10 | 11 | Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. 12 | 13 | ## Official Documentation 14 | 15 | Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs). 16 | 17 | ## Contributing 18 | 19 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). 20 | 21 | ## Security Vulnerabilities 22 | 23 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. 24 | 25 | ## License 26 | 27 | The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). 28 | -------------------------------------------------------------------------------- /server_labs/public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels nice to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /client_labs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client_labs", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "Amitav Roy", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "build": "node build/build.js", 10 | "lint": "eslint --ext .js,.vue src" 11 | }, 12 | "dependencies": { 13 | "lodash": "^4.17.21", 14 | "node-sass": "^4.13.1", 15 | "pusher-js": "^3.2.3", 16 | "sass-loader": "^4.0.2", 17 | "vue": "^2.0.1", 18 | "vue-multiselect": "^2.0.0-beta.12", 19 | "vue-resource": "^1.0.3", 20 | "vue-router": "^2.0.0", 21 | "vue-socket.io": "^2.0.1", 22 | "vuex": "^2.0.0" 23 | }, 24 | "devDependencies": { 25 | "autoprefixer": "^6.4.0", 26 | "babel-core": "^6.0.0", 27 | "babel-eslint": "^7.0.0", 28 | "babel-loader": "^6.0.0", 29 | "babel-plugin-transform-runtime": "^6.0.0", 30 | "babel-preset-es2015": "^6.0.0", 31 | "babel-preset-stage-2": "^6.0.0", 32 | "babel-register": "^6.0.0", 33 | "connect-history-api-fallback": "^1.1.0", 34 | "css-loader": "^0.25.0", 35 | "eslint": "^4.18.2", 36 | "eslint-friendly-formatter": "^2.0.5", 37 | "eslint-loader": "^1.5.0", 38 | "eslint-plugin-html": "^1.3.0", 39 | "eslint-config-standard": "^6.1.0", 40 | "eslint-plugin-promise": "^2.0.1", 41 | "eslint-plugin-standard": "^2.0.1", 42 | "eventsource-polyfill": "^0.9.6", 43 | "express": "^4.13.3", 44 | "extract-text-webpack-plugin": "^1.0.1", 45 | "file-loader": "^0.9.0", 46 | "function-bind": "^1.0.2", 47 | "html-webpack-plugin": "^2.8.1", 48 | "http-proxy-middleware": "^0.17.2", 49 | "json-loader": "^0.5.4", 50 | "opn": "^4.0.2", 51 | "ora": "^0.3.0", 52 | "shelljs": "^0.8.5", 53 | "url-loader": "^0.5.7", 54 | "vue-loader": "^9.4.0", 55 | "vue-style-loader": "^1.0.0", 56 | "webpack": "^1.13.2", 57 | "webpack-dev-middleware": "^1.8.3", 58 | "webpack-hot-middleware": "^2.12.2", 59 | "webpack-merge": "^0.14.1" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /client_labs/src/components/chat/chatStore.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { 3 | userListUrl, 4 | getHeader, 5 | getUserConversationUrl, 6 | saveChatMessageUrl 7 | } from './../../config' 8 | const state = { 9 | userList: {}, 10 | currentChatUser: null, 11 | conversation: null 12 | } 13 | 14 | const mutations = { 15 | SET_USER_LIST (state, userList) { 16 | state.userList = userList 17 | }, 18 | SET_CURRENT_CHAT_USER (state, user) { 19 | state.currentChatUser = user 20 | }, 21 | SET_CONVERSATION (state, conversation) { 22 | state.conversation = conversation 23 | }, 24 | ADD_CHAT_TO_CONVERSATION (state, chat) { 25 | state.conversation.push(chat) 26 | } 27 | } 28 | 29 | const actions = { 30 | setUserList: ({commit}, userList) => { 31 | return Vue.http.get(userListUrl, {headers: getHeader()}) 32 | .then(response => { 33 | Vue.$logger('info', 'userListUrl response', response) 34 | if (response.status === 200) { 35 | commit('SET_USER_LIST', response.body.data) 36 | return response.body.data 37 | } 38 | }) 39 | }, 40 | setCurrentChatUser: ({commit}, user) => { 41 | let postData = {id: user.id} 42 | return Vue.http.post(getUserConversationUrl, postData, {headers: getHeader()}) 43 | .then(response => { 44 | Vue.$logger('info', 'getUserConversationUrl response', response) 45 | commit('SET_CURRENT_CHAT_USER', user) 46 | commit('SET_CONVERSATION', response.body.data) 47 | }) 48 | }, 49 | addNewChatToConversation: ({commit}, postData) => { 50 | return Vue.http.post(saveChatMessageUrl, postData, {headers: getHeader()}) 51 | .then(response => { 52 | Vue.$logger('info', 'addNewChatToConversation response', response) 53 | commit('ADD_CHAT_TO_CONVERSATION', response.body.data) 54 | }) 55 | }, 56 | newIncomingChat: ({commit}, chatMessage) => { 57 | commit('ADD_CHAT_TO_CONVERSATION', chatMessage) 58 | } 59 | } 60 | 61 | export default { 62 | state, mutations, actions 63 | } 64 | -------------------------------------------------------------------------------- /server_labs/app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::group([ 55 | 'middleware' => 'web', 56 | 'namespace' => $this->namespace, 57 | ], function ($router) { 58 | require base_path('routes/web.php'); 59 | }); 60 | } 61 | 62 | /** 63 | * Define the "api" routes for the application. 64 | * 65 | * These routes are typically stateless. 66 | * 67 | * @return void 68 | */ 69 | protected function mapApiRoutes() 70 | { 71 | Route::group([ 72 | 'middleware' => 'api', 73 | 'namespace' => $this->namespace, 74 | 'prefix' => 'api', 75 | ], function ($router) { 76 | require base_path('routes/api.php'); 77 | }); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /server_labs/app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 28 | \App\Http\Middleware\EncryptCookies::class, 29 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 30 | \Illuminate\Session\Middleware\StartSession::class, 31 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 32 | \App\Http\Middleware\VerifyCsrfToken::class, 33 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 34 | \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class, 35 | ], 36 | 37 | 'api' => [ 38 | 'throttle:60,1', 39 | 'bindings', 40 | ], 41 | ]; 42 | 43 | /** 44 | * The application's route middleware. 45 | * 46 | * These middleware may be assigned to groups or used individually. 47 | * 48 | * @var array 49 | */ 50 | protected $routeMiddleware = [ 51 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 52 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 53 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 54 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 55 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 56 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 57 | ]; 58 | } 59 | -------------------------------------------------------------------------------- /client_labs/build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | // generate loader string to be used with extract text plugin 15 | function generateLoaders (loaders) { 16 | var sourceLoader = loaders.map(function (loader) { 17 | var extraParamChar 18 | if (/\?/.test(loader)) { 19 | loader = loader.replace(/\?/, '-loader?') 20 | extraParamChar = '&' 21 | } else { 22 | loader = loader + '-loader' 23 | extraParamChar = '?' 24 | } 25 | return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '') 26 | }).join('!') 27 | 28 | if (options.extract) { 29 | return ExtractTextPlugin.extract('vue-style-loader', sourceLoader) 30 | } else { 31 | return ['vue-style-loader', sourceLoader].join('!') 32 | } 33 | } 34 | 35 | // http://vuejs.github.io/vue-loader/configurations/extract-css.html 36 | return { 37 | css: generateLoaders(['css']), 38 | postcss: generateLoaders(['css']), 39 | less: generateLoaders(['css', 'less']), 40 | sass: generateLoaders(['css', 'sass?indentedSyntax']), 41 | scss: generateLoaders(['css', 'sass']), 42 | stylus: generateLoaders(['css', 'stylus']), 43 | styl: generateLoaders(['css', 'stylus']) 44 | } 45 | } 46 | 47 | // Generate loaders for standalone style files (outside of .vue) 48 | exports.styleLoaders = function (options) { 49 | var output = [] 50 | var loaders = exports.cssLoaders(options) 51 | for (var extension in loaders) { 52 | var loader = loaders[extension] 53 | output.push({ 54 | test: new RegExp('\\.' + extension + '$'), 55 | loader: loader 56 | }) 57 | } 58 | return output 59 | } 60 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|max:255', 52 | 'email' => 'required|email|max:255|unique:users', 53 | 'password' => 'required|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /server_labs/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 60 | return response()->json(['error' => 'Unauthenticated.'], 401); 61 | } 62 | 63 | return redirect()->guest('login'); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /client_labs/build/dev-server.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var express = require('express') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var opn = require('opn') 6 | var proxyMiddleware = require('http-proxy-middleware') 7 | var webpackConfig = require('./webpack.dev.conf') 8 | 9 | // default port where dev server listens for incoming traffic 10 | var port = process.env.PORT || config.dev.port 11 | // Define HTTP proxies to your custom API backend 12 | // https://github.com/chimurai/http-proxy-middleware 13 | var proxyTable = config.dev.proxyTable 14 | 15 | var app = express() 16 | var compiler = webpack(webpackConfig) 17 | 18 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 19 | publicPath: webpackConfig.output.publicPath, 20 | stats: { 21 | colors: true, 22 | chunks: false 23 | } 24 | }) 25 | 26 | var hotMiddleware = require('webpack-hot-middleware')(compiler) 27 | // force page reload when html-webpack-plugin template changes 28 | compiler.plugin('compilation', function (compilation) { 29 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 30 | hotMiddleware.publish({ action: 'reload' }) 31 | cb() 32 | }) 33 | }) 34 | 35 | // proxy api requests 36 | Object.keys(proxyTable).forEach(function (context) { 37 | var options = proxyTable[context] 38 | if (typeof options === 'string') { 39 | options = { target: options } 40 | } 41 | app.use(proxyMiddleware(context, options)) 42 | }) 43 | 44 | // handle fallback for HTML5 history API 45 | app.use(require('connect-history-api-fallback')()) 46 | 47 | // serve webpack bundle output 48 | app.use(devMiddleware) 49 | 50 | // enable hot-reload and state-preserving 51 | // compilation error display 52 | app.use(hotMiddleware) 53 | 54 | // serve pure static assets 55 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 56 | app.use(staticPath, express.static('./static')) 57 | 58 | module.exports = app.listen(port, function (err) { 59 | if (err) { 60 | console.log(err) 61 | return 62 | } 63 | var uri = 'http://localhost:' + port 64 | console.log('Listening at ' + uri + '\n') 65 | opn(uri) 66 | }) 67 | -------------------------------------------------------------------------------- /server_labs/config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /client_labs/src/pages/ResetPassword.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 67 | 68 | 72 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | User::all()], 200); 20 | } 21 | 22 | /** 23 | * Handling the forgot password email request 24 | */ 25 | public function forgotPassword(Request $request) 26 | { 27 | $user = User::where('email', $request->input('email'))->first(); 28 | 29 | if (!$user) { 30 | return response(['data' => 'Check if the email is correct'], 403); 31 | } 32 | 33 | $token = Token::create([ 34 | 'user_id' => $user->id, 35 | 'token' => uniqid(), 36 | 'expire_at' => Carbon::now()->addHour(), 37 | ]); 38 | 39 | Mail::to($user)->send(new ForgotPassword($token, $request)); 40 | 41 | return response(['data' => 'Email sent.'], 200); 42 | } 43 | 44 | /** 45 | * Hanlding the request to reset the password 46 | */ 47 | public function resetPassword(Request $request) 48 | { 49 | $validator = Validator::make($request->all(), [ 50 | 'password' => 'required|min:6', 51 | 'confirm_password' => 'required|same:password', 52 | ]); 53 | 54 | if ($validator->fails()) { 55 | return response(['data' => $validator->errors()], 433); 56 | } 57 | 58 | $token = $request->input('token'); 59 | $dBToken = DB::table('tokens') 60 | ->where('token', $token) 61 | ->where('expire_at', '>', Carbon::now()) 62 | ->first(); 63 | 64 | if (!$dBToken) { 65 | return response(['data' => 'Wrong token.'], 403); 66 | } 67 | 68 | $user = User::where('id', $dBToken->user_id)->first(); 69 | $user->password = bcrypt($request->input('password')); 70 | $user->save(); 71 | 72 | DB::table('tokens')->where('id', $dBToken->id)->delete(); 73 | 74 | return response(['data' => 'Password changed.'], 200); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /client_labs/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var utils = require('./utils') 4 | var projectRoot = path.resolve(__dirname, '../') 5 | 6 | module.exports = { 7 | entry: { 8 | app: './src/main.js' 9 | }, 10 | output: { 11 | path: config.build.assetsRoot, 12 | publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath, 13 | filename: '[name].js' 14 | }, 15 | resolve: { 16 | extensions: ['', '.js', '.vue'], 17 | fallback: [path.join(__dirname, '../node_modules')], 18 | alias: { 19 | 'vue': 'vue/dist/vue', 20 | 'src': path.resolve(__dirname, '../src'), 21 | 'assets': path.resolve(__dirname, '../src/assets'), 22 | 'components': path.resolve(__dirname, '../src/components') 23 | } 24 | }, 25 | resolveLoader: { 26 | fallback: [path.join(__dirname, '../node_modules')] 27 | }, 28 | module: { 29 | preLoaders: [ 30 | { 31 | test: /\.vue$/, 32 | loader: 'eslint', 33 | include: projectRoot, 34 | exclude: /node_modules/ 35 | }, 36 | { 37 | test: /\.js$/, 38 | loader: 'eslint', 39 | include: projectRoot, 40 | exclude: /node_modules/ 41 | } 42 | ], 43 | loaders: [ 44 | { 45 | test: /\.vue$/, 46 | loader: 'vue' 47 | }, 48 | { 49 | test: /\.js$/, 50 | loader: 'babel', 51 | include: projectRoot, 52 | exclude: /node_modules/ 53 | }, 54 | { 55 | test: /\.json$/, 56 | loader: 'json' 57 | }, 58 | { 59 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 60 | loader: 'url', 61 | query: { 62 | limit: 10000, 63 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 64 | } 65 | }, 66 | { 67 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 68 | loader: 'url', 69 | query: { 70 | limit: 10000, 71 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 72 | } 73 | } 74 | ] 75 | }, 76 | eslint: { 77 | formatter: require('eslint-friendly-formatter') 78 | }, 79 | vue: { 80 | loaders: utils.cssLoaders(), 81 | postcss: [ 82 | require('autoprefixer')({ 83 | browsers: ['last 2 versions'] 84 | }) 85 | ] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /server_labs/app/Http/Controllers/PrivateMessageController.php: -------------------------------------------------------------------------------- 1 | redis = LRedis::connection(); 17 | } 18 | 19 | public function getUserNotifications(Request $request) 20 | { 21 | $notifications = PrivateMessage::where('read', 0) 22 | ->where('receiver_id', $request->user()->id) 23 | ->orderBy('created_at', 'desc') 24 | ->get(); 25 | return response(['data' => $notifications], 200); 26 | } 27 | 28 | public function getPrimateMessages(Request $request) 29 | { 30 | $pms = PrivateMessage::where('receiver_id', $request->user()->id)->orderBy('created_at', 'desc')->get(); 31 | return response(['data' => $pms], 200); 32 | } 33 | 34 | public function getPrivateMessageById(Request $request) 35 | { 36 | $pm = PrivateMessage::where('id', $request->input('id'))->first(); 37 | 38 | // if the message is not read, changing the status 39 | if ($pm->read == 0) { 40 | $pm->read = 1; 41 | $pm->save(); 42 | 43 | $redis = LRedis::connection(); 44 | $redis->publish('messageRead', $pm); 45 | \Log::info('123'); 46 | } 47 | 48 | return response(['data' => $pm], 200); 49 | } 50 | 51 | public function sendPrivateMessage(Request $request) 52 | { 53 | $attributes = [ 54 | 'sender_id' => $request->user()->id, 55 | 'receiver_id' => $request->input('receiver_id'), 56 | 'message' => $request->input('message'), 57 | 'subject' => $request->input('subject'), 58 | 'read' => 0, 59 | ]; 60 | 61 | $pm = PrivateMessage::create($attributes); 62 | $data = PrivateMessage::where('id', $pm->id)->first(); 63 | 64 | $redis = LRedis::connection(); 65 | $redis->publish('message', $data); 66 | 67 | return response(['data' => $data], 201); 68 | } 69 | 70 | public function getPrivateMessageSent(Request $request) 71 | { 72 | $pms = PrivateMessage::where('sender_id', $request->user()->id)->orderBy('created_at', 'desc')->get(); 73 | return response(['data' => $pms], 200); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /client_labs/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import VueResource from 'vue-resource' 4 | import store from './store' 5 | import Multiselect from 'vue-multiselect' 6 | import VueSocketio from 'vue-socket.io' 7 | 8 | import App from './App' 9 | 10 | import LoginPage from './pages/LoginPage' 11 | import DashboardPage from './pages/DashboardPage' 12 | import ChatPage from './pages/ChatPage' 13 | import ForgotPassword from './pages/ForgotPassword' 14 | import ResetPassword from './pages/ResetPassword' 15 | 16 | import PrivateMessageInbox from './components/private-message/PrivateMessageInbox' 17 | import PrivateMessageSent from './components/private-message/PrivateMessageSent' 18 | import PrivateMessageView from './components/private-message/PrivateMessageView' 19 | import PrivateMessageCompose from './components/private-message/PrivateMessageCompose' 20 | 21 | import Logger from './plugins/Logger' 22 | 23 | Vue.use(VueRouter) 24 | Vue.use(VueResource) 25 | Vue.use(Logger, {loggin: true}) 26 | Vue.use(VueSocketio, 'http://localhost:8890') 27 | 28 | Vue.component('multiselect', Multiselect) 29 | Vue.component('app', App) 30 | 31 | const routes = [ 32 | {path: '/', component: LoginPage, name: 'home'}, 33 | {path: '/forgot-password', component: ForgotPassword, name: 'forgot-password'}, 34 | {path: '/reset-password/:token', component: ResetPassword, name: 'reset-password'}, 35 | {path: '/dashboard', component: DashboardPage, name: 'dashboard', meta: { requiresAuth: true }}, 36 | {path: '/chat', component: ChatPage, name: 'chat', meta: { requiresAuth: true }}, 37 | {path: '/new-pm', component: PrivateMessageCompose, name: 'new-pm', meta: { requiresAuth: true }}, 38 | {path: '/inbox-pms', component: PrivateMessageInbox, name: 'my-pms', meta: { requiresAuth: true }}, 39 | {path: '/pms/:pmId', component: PrivateMessageView, name: 'pm-view', meta: { requiresAuth: true }}, 40 | {path: '/sent-pms', component: PrivateMessageSent, name: 'my-pms-sent', meta: { requiresAuth: true }} 41 | ] 42 | 43 | const router = new VueRouter({ 44 | mode: 'history', 45 | routes 46 | }) 47 | 48 | router.beforeEach((to, from, next) => { 49 | if (to.meta.requiresAuth) { 50 | const authUser = JSON.parse(window.localStorage.getItem('authUser')) 51 | if (authUser && authUser.access_token) { 52 | next() 53 | } else { 54 | next({name: 'home'}) 55 | } 56 | } 57 | next() 58 | }) 59 | 60 | Vue.http.interceptors.push((request, next) => { 61 | next((response) => { 62 | if (response.status === 401) { 63 | console.log('Need to login again') 64 | } 65 | }) 66 | }) 67 | 68 | new Vue({ 69 | router, store 70 | }).$mount('#app') 71 | -------------------------------------------------------------------------------- /server_labs/config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /client_labs/src/components/chat/ChatAddWidget.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 81 | 82 | 89 | -------------------------------------------------------------------------------- /server_labs/resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 12 | 13 | 14 | 66 | 67 | 68 |
69 | @if (Route::has('login')) 70 | 74 | @endif 75 | 76 |
77 |
78 | Laravel 79 |
80 | 81 | 88 |
89 |
90 | 91 | 92 | -------------------------------------------------------------------------------- /client_labs/src/components/private-message/PrivateMessageCompose.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 93 | -------------------------------------------------------------------------------- /server_labs/config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /client_labs/src/components/private-message/PrivateMessageNotificationDropdown.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 58 | 59 | 97 | -------------------------------------------------------------------------------- /client_labs/src/pages/LoginPage.vue: -------------------------------------------------------------------------------- 1 | 52 | 53 | 92 | 93 | 97 | -------------------------------------------------------------------------------- /server_labs/storage/oauth-private.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIJKwIBAAKCAgEApl/sgVBsq+3LehLRaX+Jmm7b3yP8XvzNQcXq9UpEt0qi/AZi 3 | ebGxljRJMzcwpg3rpWef00Z/9GnYcO/lG5n1dVopzCdqgupJfv0aa5qugst6WL+f 4 | U1J3LUB0e86ISG2sBmY41DKXmFV5ehqlqqALC73iEvCjdOb6c/ioNQh3jVhq4r2a 5 | dnyXP3xyg2jQvae3mieHg/FubMmAKunTjLVKyjb13LWJfeIhzg7dB1oysEETpVEr 6 | tDXgRoMj9F67Mxc+HZ6n9q2R2bRXaULu0NTh/E6j4vQP0LLvCKOhW8dIZSLRwvmF 7 | Kqn68+i883OKfYapeP5HMDLturXCs/OL5dDQWsjGum2CCqZWON4Kiw/ivVKICxfJ 8 | 5NC/tAesGCfAeYM8dJTjnlMYiJ3nBfcE0Eo8dNb+B2TyYfPM+vbXI1UlqR0kMOSA 9 | lgViy8aLoHfAQWU0eiIqMrKi53nha0r4o5VdGf3PSootGIyU9QNdRJF0b7WDiSUE 10 | vaYNtRW3/OIeGLgkj5EDR/hHQpkHmkCHaqbH126F5KsJYOceu9Hsdw2tSTNINK97 11 | KpTKAFBCuIqhniLpTLHy1insrvArWSMnCSx/NxQXtjgCjh1iADVGfeN5iNQQFQw0 12 | x5tuGsPIz8yWvB6mJrTbxdPMcYN3CtzMD9RRsbZ4rBN+R8Y7O8X1Ljn3AlsCAwEA 13 | AQKCAgEAn8Y04Qa0JfQqWSQjOVZCdi2KN2NepHXQRB7mggN9tCwYE0GqZkXQTngN 14 | 6AJTVNS/fUvjf8kPblALjIHFGtmikL0ysJ0Vu311cV9tdPLKLk9sQjhbsG/chXeF 15 | pbP0yuGPt2GJp7aiQKetDiby+8XQdck3h4rS3pxG3wJnvu5PqUzE8NS2tpz1vwEr 16 | E6mf9NJRDthxWrOLoSttS0jcYR9lIIbhW8B2to5oenNprfrf/MWyMSufdePbarvb 17 | 1nz295yViWpo0QtkqpZ2715Y6/HUyDFZT8WkPn7n8Pr7JaFek8l5ee2YBh3RI1VZ 18 | x84orF2a+Nfw04fFJ24P+jKkIeKDg28dFmqJbSKCt/jCJmca1ioy8xGHUJjJPwp5 19 | QCVdiWrBTQGCxD3vCoyT1rNVsbUsnEQjWepcgAb9uRrNRkS54se9qd5HKZK1Fn2q 20 | Wz20eYOPQBNuMIYkc4AKXCs0s1csr9VStPW3iUnQBBDKkNgoNeapCloZIIv1h2U3 21 | tJk57UPixHklKKilaNA8ODNEP53kyG2SLEnaeSeTliftSHvK8Prtc1qf9dMR4OU3 22 | B90hcXgMbMU0b+36T/qzyK6QED+vjWx+yl6SCN211sgPyK7v++edgxlLr+UoJndV 23 | x8OEFPANX1ibek0IZgydhoDJuz04hDgkgDgZIagY18OAuDjLeDECggEBANLKY8C2 24 | Md56Bp6U7Da2fd0Jfbhi77xfTRRxlqzIe9DDD9o3Y8Il49kiiwUctwGMBhlxcwDy 25 | 6WMIKpU4JRFZG9HCXxIUncdEdHwwoMY0Xz7SUi4iZtj3t9oZwFjDVqmgi2IgHaQB 26 | lzLSqkU1PzLmLBMFUjxUFx+Yagt2NRDxFVWNAJbJAcd59+xH7iip0GvVz218zmOh 27 | ap9cLb46GoDU68CAcLGsPIcCwz+GhNE35t6+Ymbag8w0w50JCBBQHa7/9HayGhtD 28 | c6hfw+ZZif6NlXRiyy8L8h44MTPidMkMYhVD8J63fsQeRzP0kIyDCjWFEhXAJNh7 29 | RIckG9lX4Wopw5MCggEBAMoO2Q7do7+Epv0tlmH410nitOhLWa2V/jIAgxauJTVP 30 | /aIy/fogKWat4C17ihxGMsX+tP9R8Gwa1qKWKpS11iyodFI6eeq/Q9k4kkSOrEAk 31 | 7KyGlydXyUc85eYnCZIZgTzvuOtG2wO1X7dGiIEpjA/uUxOD8w9hS6nW0AaUrEh9 32 | iGWAvMCt6q+XgNlZd+AEgDDcAsqIcg5SsbHI4tDhqyCIU6hHSYNFXIs4zaPbkpQ2 33 | rN3W6jLBgbPN/IpHx3cBj1psdcteh5IFD38UQjIlSaLXw13j+ClfunhRtdEbfhpo 34 | wBMQM1LIueIYE/0inrkz7PIEJZL4qF0xOxowgp2FExkCggEBAI0e+pG2aMStpWje 35 | AxbOLo2hIQ4lDqNqmkwpj9q1jk9BiIdrtdnxTA2+1pvhkZPzjtHR5lCoUCABA6FL 36 | KWXn5nwUSVnte4RBDEtosvp/bZS9ck94sKppjijyPJgwjwCZfzd+kNmQRw27hEs5 37 | Tspg1vkVAu1ozuJURArQZM6m2MWh1NceU5aczaLetU98ARFw36JJgFOraZqvN+C3 38 | Pa8q3XrPgqMw0IUDEHyjLqBzcJmHlJGPkdVRLfUgasmhGX5j1eLxchD2o6QCGUFK 39 | iNxnJbv5uFYTBVG+BRLbdZx0MeZSyfE4oCHks37RKUUpJdiW8nilXwWf4U0om4xz 40 | DXLp6wkCggEBAJQfPFmcewzLxsq0n5hknhYo3munyS7qVPT80RxQPzCM2icMcIjr 41 | CM6fykYtWTqO72ub472DqNbm+c8ofECV6FLGjrc07Oj8m1VjFj6xxG4lY2a6J5aM 42 | 0R2q8/G7TlXO4qH0LkAzqhxW2rr1Nt5Qwb9v+3DD+uucbKYttkQMuxtNAy89p6Es 43 | HW3ph2hOIQWU5xBqSJWGXu5HCsKEvFlaBWQM7B7hW2+i6kuZMY7cSODkD+d0RC0/ 44 | E8Dm0SnhosSH3TnxZozWWFXf5dNH25r9ILUCrNJoaySRa5YGeF25ZMEhZyTSbH1U 45 | bofjFMwtk+O6wAlOpujN5kai72usgiPNSQkCggEBAI4sTQJO3LNn86RfLRqEFpkx 46 | oJ6VCWE0yujD3ndJ5AuDOeyEEYBHmo6X/z8Gy4YhfAd30cJDPVuKVCuRxSjxnMf1 47 | x9IuguhbKkKx9OWr0ZRk1irjQE0UQE64fsL/74w76TMUHr2pvMNZRF+hfuc4++El 48 | P8FxM5JuZ7J7F0cGA3TNTBMSxK19RgpaHnaTt4ppdVcofJXYRLIPO1pCygAR964t 49 | 67EesrU+ytEzS5QyXrl9/gwS89mQ8elyzn7YfEfkRs36vS+rVN8b+VCoNB2IrKdW 50 | giFhmOYE7ZtaQiBwlyijkaSF+qf1zblkRW5+YufGwqprFCn0apZHz8tOEESK86I= 51 | -----END RSA PRIVATE KEY----- -------------------------------------------------------------------------------- /client_labs/src/components/TopMenu.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 75 | -------------------------------------------------------------------------------- /client_labs/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var utils = require('./utils') 4 | var webpack = require('webpack') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 8 | var HtmlWebpackPlugin = require('html-webpack-plugin') 9 | var env = config.build.env 10 | 11 | var webpackConfig = merge(baseWebpackConfig, { 12 | module: { 13 | loaders: utils.styleLoaders({ sourceMap: config.build.productionSourceMap, extract: true }) 14 | }, 15 | devtool: config.build.productionSourceMap ? '#source-map' : false, 16 | output: { 17 | path: config.build.assetsRoot, 18 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 19 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 20 | }, 21 | vue: { 22 | loaders: utils.cssLoaders({ 23 | sourceMap: config.build.productionSourceMap, 24 | extract: true 25 | }) 26 | }, 27 | plugins: [ 28 | // http://vuejs.github.io/vue-loader/workflow/production.html 29 | new webpack.DefinePlugin({ 30 | 'process.env': env 31 | }), 32 | new webpack.optimize.UglifyJsPlugin({ 33 | compress: { 34 | warnings: false 35 | } 36 | }), 37 | new webpack.optimize.OccurenceOrderPlugin(), 38 | // extract css into its own file 39 | new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')), 40 | // generate dist index.html with correct asset hash for caching. 41 | // you can customize output by editing /index.html 42 | // see https://github.com/ampedandwired/html-webpack-plugin 43 | new HtmlWebpackPlugin({ 44 | filename: config.build.index, 45 | template: 'index.html', 46 | inject: true, 47 | minify: { 48 | removeComments: true, 49 | collapseWhitespace: true, 50 | removeAttributeQuotes: true 51 | // more options: 52 | // https://github.com/kangax/html-minifier#options-quick-reference 53 | }, 54 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 55 | chunksSortMode: 'dependency' 56 | }), 57 | // split vendor js into its own file 58 | new webpack.optimize.CommonsChunkPlugin({ 59 | name: 'vendor', 60 | minChunks: function (module, count) { 61 | // any required modules inside node_modules are extracted to vendor 62 | return ( 63 | module.resource && 64 | /\.js$/.test(module.resource) && 65 | module.resource.indexOf( 66 | path.join(__dirname, '../node_modules') 67 | ) === 0 68 | ) 69 | } 70 | }), 71 | // extract webpack runtime and module manifest to its own file in order to 72 | // prevent vendor hash from being updated whenever app bundle is updated 73 | new webpack.optimize.CommonsChunkPlugin({ 74 | name: 'manifest', 75 | chunks: ['vendor'] 76 | }) 77 | ] 78 | }) 79 | 80 | if (config.build.productionGzip) { 81 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 82 | 83 | webpackConfig.plugins.push( 84 | new CompressionWebpackPlugin({ 85 | asset: '[path].gz[query]', 86 | algorithm: 'gzip', 87 | test: new RegExp( 88 | '\\.(' + 89 | config.build.productionGzipExtensions.join('|') + 90 | ')$' 91 | ), 92 | threshold: 10240, 93 | minRatio: 0.8 94 | }) 95 | ) 96 | } 97 | 98 | module.exports = webpackConfig 99 | -------------------------------------------------------------------------------- /server_labs/config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'passport', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /client_labs/src/components/private-message/privateMessageStore.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import _ from 'lodash' 3 | import { 4 | getHeader, 5 | getUserPrivateMessages, 6 | getPrivateMessageById, 7 | sendPrivateMessage, 8 | getUserPrivateMessagesSent, 9 | getUserPMNotifications 10 | } from './../../config' 11 | 12 | const state = { 13 | notifications: [], 14 | messageRec: [], 15 | messageSent: [], 16 | message: { 17 | subject: '', 18 | message: '', 19 | sender: {} 20 | } 21 | } 22 | 23 | const mutations = { 24 | SET_USER_PM_NOTIFICATIONS (state, notifications) { 25 | state.notifications = notifications 26 | }, 27 | SET_MESSAGES_REC (state, messages) { 28 | state.messageRec = messages 29 | }, 30 | SET_MESSAGE_VIEW (state, message) { 31 | state.message = message 32 | }, 33 | CLEAR_MESSAGE_VIEW (state) { 34 | state.message = { 35 | subject: '', 36 | message: '', 37 | sender: {} 38 | } 39 | }, 40 | SEND_PRIVATE_MESSAGE (state, message) { 41 | state.messageSent.push(message) 42 | }, 43 | SET_MESSAGES_SENT (state, messages) { 44 | state.messageSent = messages 45 | }, 46 | NEW_PM_NOTIFICATION (state, message) { 47 | state.notifications.unshift(message) 48 | state.messageRec.unshift(message) 49 | }, 50 | MESSAGE_READ_NOTIFICATION (state, message) { 51 | _.forEach(state.messageRec, function (value, key) { 52 | if (message.id === value.id) { 53 | state.messageRec[key] = value 54 | } 55 | }) 56 | 57 | _.forEach(state.notifications, function (value, key) { 58 | if (message.id === value.id) { 59 | state.notifications.splice(key, 1) 60 | } 61 | }) 62 | } 63 | } 64 | 65 | const actions = { 66 | getUserNotifications: ({commit}) => { 67 | let postData = {} 68 | return Vue.http.post(getUserPMNotifications, postData, {headers: getHeader()}) 69 | .then(response => { 70 | Vue.$logger('info', 'getUserNotifications response', response) 71 | commit('SET_USER_PM_NOTIFICATIONS', response.body.data) 72 | }) 73 | }, 74 | setUserMessagesRec: ({commit}, messages) => { 75 | let postData = {} 76 | return Vue.http.post(getUserPrivateMessages, postData, {headers: getHeader()}) 77 | .then(response => { 78 | Vue.$logger('info', 'setUserMessagesRec response', response) 79 | commit('SET_MESSAGES_REC', response.body.data) 80 | }) 81 | }, 82 | getPrivateMessageById: ({commit}, id) => { 83 | let postData = {id: id} 84 | return Vue.http.post(getPrivateMessageById, postData, {headers: getHeader()}) 85 | .then(response => { 86 | Vue.$logger('info', 'getPrivateMessageById response', response) 87 | commit('SET_MESSAGE_VIEW', response.body.data) 88 | }) 89 | }, 90 | clearMessageView: ({commit}) => { 91 | commit('CLEAR_MESSAGE_VIEW') 92 | }, 93 | sendPrivateMessage: ({commit}, postData) => { 94 | return Vue.http.post(sendPrivateMessage, postData, {headers: getHeader()}) 95 | .then(response => { 96 | Vue.$logger('info', 'sendPrivateMessage response', response) 97 | commit('SEND_PRIVATE_MESSAGE', response.body.data) 98 | return response 99 | }) 100 | }, 101 | setUserMessagesSent: ({commit}) => { 102 | let postData = {} 103 | return Vue.http.post(getUserPrivateMessagesSent, postData, {headers: getHeader()}) 104 | .then(response => { 105 | Vue.$logger('info', 'setUserMessagesSent response', response) 106 | commit('SET_MESSAGES_SENT', response.body.data) 107 | return response 108 | }) 109 | }, 110 | newMessageNotification: ({commit}, message) => { 111 | commit('NEW_PM_NOTIFICATION', message) 112 | }, 113 | messageReadNotification: ({commit}, message) => { 114 | commit('MESSAGE_READ_NOTIFICATION', message) 115 | } 116 | } 117 | 118 | export default { 119 | state, mutations, actions 120 | } 121 | -------------------------------------------------------------------------------- /server_labs/config/database.php: -------------------------------------------------------------------------------- 1 | PDO::FETCH_OBJ, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Database Connection Name 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may specify which of the database connections below you wish 24 | | to use as your default connection for all database work. Of course 25 | | you may use many connections at once using the Database library. 26 | | 27 | */ 28 | 29 | 'default' => env('DB_CONNECTION', 'mysql'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Database Connections 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here are each of the database connections setup for your application. 37 | | Of course, examples of configuring each database platform that is 38 | | supported by Laravel is shown below to make development simple. 39 | | 40 | | 41 | | All database work in Laravel is done through the PHP PDO facilities 42 | | so make sure you have the driver for your particular database of 43 | | choice installed on your machine before you begin development. 44 | | 45 | */ 46 | 47 | 'connections' => [ 48 | 49 | 'sqlite' => [ 50 | 'driver' => 'sqlite', 51 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 52 | 'prefix' => '', 53 | ], 54 | 55 | 'mysql' => [ 56 | 'driver' => 'mysql', 57 | 'host' => env('DB_HOST', 'localhost'), 58 | 'port' => env('DB_PORT', '3306'), 59 | 'database' => env('DB_DATABASE', 'forge'), 60 | 'username' => env('DB_USERNAME', 'forge'), 61 | 'password' => env('DB_PASSWORD', ''), 62 | 'charset' => 'utf8', 63 | 'collation' => 'utf8_unicode_ci', 64 | 'prefix' => '', 65 | 'strict' => true, 66 | 'engine' => null, 67 | ], 68 | 69 | 'pgsql' => [ 70 | 'driver' => 'pgsql', 71 | 'host' => env('DB_HOST', 'localhost'), 72 | 'port' => env('DB_PORT', '5432'), 73 | 'database' => env('DB_DATABASE', 'forge'), 74 | 'username' => env('DB_USERNAME', 'forge'), 75 | 'password' => env('DB_PASSWORD', ''), 76 | 'charset' => 'utf8', 77 | 'prefix' => '', 78 | 'schema' => 'public', 79 | 'sslmode' => 'prefer', 80 | ], 81 | 82 | ], 83 | 84 | /* 85 | |-------------------------------------------------------------------------- 86 | | Migration Repository Table 87 | |-------------------------------------------------------------------------- 88 | | 89 | | This table keeps track of all the migrations that have already run for 90 | | your application. Using this information, we can determine which of 91 | | the migrations on disk haven't actually been run in the database. 92 | | 93 | */ 94 | 95 | 'migrations' => 'migrations', 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Redis Databases 100 | |-------------------------------------------------------------------------- 101 | | 102 | | Redis is an open source, fast, and advanced key-value store that also 103 | | provides a richer set of commands than a typical key-value systems 104 | | such as APC or Memcached. Laravel makes it easy to dig right in. 105 | | 106 | */ 107 | 108 | 'redis' => [ 109 | 110 | 'cluster' => false, 111 | 112 | 'default' => [ 113 | 'host' => env('REDIS_HOST', 'localhost'), 114 | 'password' => env('REDIS_PASSWORD', null), 115 | 'port' => env('REDIS_PORT', 6379), 116 | 'database' => 0, 117 | ], 118 | 119 | ], 120 | 121 | ]; 122 | -------------------------------------------------------------------------------- /server_labs/config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => 'hello@example.com', 60 | 'name' => 'Example', 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | SMTP Server Password 92 | |-------------------------------------------------------------------------- 93 | | 94 | | Here you may set the password required by your SMTP server to send out 95 | | messages from your application. This will be given to the server on 96 | | connection so that the application will be able to send messages. 97 | | 98 | */ 99 | 100 | 'password' => env('MAIL_PASSWORD'), 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Sendmail System Path 105 | |-------------------------------------------------------------------------- 106 | | 107 | | When using the "sendmail" driver to send e-mails, we will need to know 108 | | the path to where Sendmail lives on this server. A default path has 109 | | been provided here, which will work well on most of your systems. 110 | | 111 | */ 112 | 113 | 'sendmail' => '/usr/sbin/sendmail -bs', 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /server_labs/resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'alpha' => 'The :attribute may only contain letters.', 20 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 21 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 22 | 'array' => 'The :attribute must be an array.', 23 | 'before' => 'The :attribute must be a date before :date.', 24 | 'between' => [ 25 | 'numeric' => 'The :attribute must be between :min and :max.', 26 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 27 | 'string' => 'The :attribute must be between :min and :max characters.', 28 | 'array' => 'The :attribute must have between :min and :max items.', 29 | ], 30 | 'boolean' => 'The :attribute field must be true or false.', 31 | 'confirmed' => 'The :attribute confirmation does not match.', 32 | 'date' => 'The :attribute is not a valid date.', 33 | 'date_format' => 'The :attribute does not match the format :format.', 34 | 'different' => 'The :attribute and :other must be different.', 35 | 'digits' => 'The :attribute must be :digits digits.', 36 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 37 | 'dimensions' => 'The :attribute has invalid image dimensions.', 38 | 'distinct' => 'The :attribute field has a duplicate value.', 39 | 'email' => 'The :attribute must be a valid email address.', 40 | 'exists' => 'The selected :attribute is invalid.', 41 | 'file' => 'The :attribute must be a file.', 42 | 'filled' => 'The :attribute field is required.', 43 | 'image' => 'The :attribute must be an image.', 44 | 'in' => 'The selected :attribute is invalid.', 45 | 'in_array' => 'The :attribute field does not exist in :other.', 46 | 'integer' => 'The :attribute must be an integer.', 47 | 'ip' => 'The :attribute must be a valid IP address.', 48 | 'json' => 'The :attribute must be a valid JSON string.', 49 | 'max' => [ 50 | 'numeric' => 'The :attribute may not be greater than :max.', 51 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 52 | 'string' => 'The :attribute may not be greater than :max characters.', 53 | 'array' => 'The :attribute may not have more than :max items.', 54 | ], 55 | 'mimes' => 'The :attribute must be a file of type: :values.', 56 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 57 | 'min' => [ 58 | 'numeric' => 'The :attribute must be at least :min.', 59 | 'file' => 'The :attribute must be at least :min kilobytes.', 60 | 'string' => 'The :attribute must be at least :min characters.', 61 | 'array' => 'The :attribute must have at least :min items.', 62 | ], 63 | 'not_in' => 'The selected :attribute is invalid.', 64 | 'numeric' => 'The :attribute must be a number.', 65 | 'present' => 'The :attribute field must be present.', 66 | 'regex' => 'The :attribute format is invalid.', 67 | 'required' => 'The :attribute field is required.', 68 | 'required_if' => 'The :attribute field is required when :other is :value.', 69 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 70 | 'required_with' => 'The :attribute field is required when :values is present.', 71 | 'required_with_all' => 'The :attribute field is required when :values is present.', 72 | 'required_without' => 'The :attribute field is required when :values is not present.', 73 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 74 | 'same' => 'The :attribute and :other must match.', 75 | 'size' => [ 76 | 'numeric' => 'The :attribute must be :size.', 77 | 'file' => 'The :attribute must be :size kilobytes.', 78 | 'string' => 'The :attribute must be :size characters.', 79 | 'array' => 'The :attribute must contain :size items.', 80 | ], 81 | 'string' => 'The :attribute must be a string.', 82 | 'timezone' => 'The :attribute must be a valid zone.', 83 | 'unique' => 'The :attribute has already been taken.', 84 | 'uploaded' => 'The :attribute failed to upload.', 85 | 'url' => 'The :attribute format is invalid.', 86 | 87 | /* 88 | |-------------------------------------------------------------------------- 89 | | Custom Validation Language Lines 90 | |-------------------------------------------------------------------------- 91 | | 92 | | Here you may specify custom validation messages for attributes using the 93 | | convention "attribute.rule" to name the lines. This makes it quick to 94 | | specify a specific custom language line for a given attribute rule. 95 | | 96 | */ 97 | 98 | 'custom' => [ 99 | 'attribute-name' => [ 100 | 'rule-name' => 'custom-message', 101 | ], 102 | ], 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Custom Validation Attributes 107 | |-------------------------------------------------------------------------- 108 | | 109 | | The following language lines are used to swap attribute place-holders 110 | | with something more reader friendly such as E-Mail Address instead 111 | | of "email". This simply helps us make messages a little cleaner. 112 | | 113 | */ 114 | 115 | 'attributes' => [], 116 | 117 | ]; 118 | -------------------------------------------------------------------------------- /server_labs/config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Cache Store 91 | |-------------------------------------------------------------------------- 92 | | 93 | | When using the "apc" or "memcached" session drivers, you may specify a 94 | | cache store that should be used for these sessions. This value must 95 | | correspond with one of the application's configured cache stores. 96 | | 97 | */ 98 | 99 | 'store' => null, 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Sweeping Lottery 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Some session drivers must manually sweep their storage location to get 107 | | rid of old sessions from storage. Here are the chances that it will 108 | | happen on a given request. By default, the odds are 2 out of 100. 109 | | 110 | */ 111 | 112 | 'lottery' => [2, 100], 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Name 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Here you may change the name of the cookie used to identify a session 120 | | instance by ID. The name specified here will get used every time a 121 | | new session cookie is created by the framework for every driver. 122 | | 123 | */ 124 | 125 | 'cookie' => 'laravel_session', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Path 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The session cookie path determines the path for which the cookie will 133 | | be regarded as available. Typically, this will be the root path of 134 | | your application but you are free to change this when necessary. 135 | | 136 | */ 137 | 138 | 'path' => '/', 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | Session Cookie Domain 143 | |-------------------------------------------------------------------------- 144 | | 145 | | Here you may change the domain of the cookie used to identify a session 146 | | in your application. This will determine which domains the cookie is 147 | | available to in your application. A sensible default has been set. 148 | | 149 | */ 150 | 151 | 'domain' => env('SESSION_DOMAIN', null), 152 | 153 | /* 154 | |-------------------------------------------------------------------------- 155 | | HTTPS Only Cookies 156 | |-------------------------------------------------------------------------- 157 | | 158 | | By setting this option to true, session cookies will only be sent back 159 | | to the server if the browser has a HTTPS connection. This will keep 160 | | the cookie from being sent to you if it can not be done securely. 161 | | 162 | */ 163 | 164 | 'secure' => env('SESSION_SECURE_COOKIE', false), 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | HTTP Access Only 169 | |-------------------------------------------------------------------------- 170 | | 171 | | Setting this value to true will prevent JavaScript from accessing the 172 | | value of the cookie and the cookie will only be accessible through 173 | | the HTTP protocol. You are free to modify this option if needed. 174 | | 175 | */ 176 | 177 | 'http_only' => true, 178 | 179 | ]; 180 | -------------------------------------------------------------------------------- /server_labs/config/app.php: -------------------------------------------------------------------------------- 1 | 'Laravel', 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Application Environment 20 | |-------------------------------------------------------------------------- 21 | | 22 | | This value determines the "environment" your application is currently 23 | | running in. This may determine how you prefer to configure various 24 | | services your application utilizes. Set this in your ".env" file. 25 | | 26 | */ 27 | 28 | 'env' => env('APP_ENV', 'production'), 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Application Debug Mode 33 | |-------------------------------------------------------------------------- 34 | | 35 | | When your application is in debug mode, detailed error messages with 36 | | stack traces will be shown on every error that occurs within your 37 | | application. If disabled, a simple generic error page is shown. 38 | | 39 | */ 40 | 41 | 'debug' => env('APP_DEBUG', false), 42 | 43 | /* 44 | |-------------------------------------------------------------------------- 45 | | Application URL 46 | |-------------------------------------------------------------------------- 47 | | 48 | | This URL is used by the console to properly generate URLs when using 49 | | the Artisan command line tool. You should set this to the root of 50 | | your application so that it is used when running Artisan tasks. 51 | | 52 | */ 53 | 54 | 'url' => env('APP_URL', 'http://localhost'), 55 | 56 | /* 57 | |-------------------------------------------------------------------------- 58 | | Application Timezone 59 | |-------------------------------------------------------------------------- 60 | | 61 | | Here you may specify the default timezone for your application, which 62 | | will be used by the PHP date and date-time functions. We have gone 63 | | ahead and set this to a sensible default for you out of the box. 64 | | 65 | */ 66 | 67 | 'timezone' => 'UTC', 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Application Locale Configuration 72 | |-------------------------------------------------------------------------- 73 | | 74 | | The application locale determines the default locale that will be used 75 | | by the translation service provider. You are free to set this value 76 | | to any of the locales which will be supported by the application. 77 | | 78 | */ 79 | 80 | 'locale' => 'en', 81 | 82 | /* 83 | |-------------------------------------------------------------------------- 84 | | Application Fallback Locale 85 | |-------------------------------------------------------------------------- 86 | | 87 | | The fallback locale determines the locale to use when the current one 88 | | is not available. You may change the value to correspond to any of 89 | | the language folders that are provided through your application. 90 | | 91 | */ 92 | 93 | 'fallback_locale' => 'en', 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Encryption Key 98 | |-------------------------------------------------------------------------- 99 | | 100 | | This key is used by the Illuminate encrypter service and should be set 101 | | to a random, 32 character string, otherwise these encrypted strings 102 | | will not be safe. Please do this before deploying an application! 103 | | 104 | */ 105 | 106 | 'key' => env('APP_KEY'), 107 | 108 | 'cipher' => 'AES-256-CBC', 109 | 110 | /* 111 | |-------------------------------------------------------------------------- 112 | | Logging Configuration 113 | |-------------------------------------------------------------------------- 114 | | 115 | | Here you may configure the log settings for your application. Out of 116 | | the box, Laravel uses the Monolog PHP logging library. This gives 117 | | you a variety of powerful log handlers / formatters to utilize. 118 | | 119 | | Available Settings: "single", "daily", "syslog", "errorlog" 120 | | 121 | */ 122 | 123 | 'log' => env('APP_LOG', 'single'), 124 | 125 | 'log_level' => env('APP_LOG_LEVEL', 'debug'), 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Autoloaded Service Providers 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The service providers listed here will be automatically loaded on the 133 | | request to your application. Feel free to add your own services to 134 | | this array to grant expanded functionality to your applications. 135 | | 136 | */ 137 | 138 | 'providers' => [ 139 | 140 | /* 141 | * Laravel Framework Service Providers... 142 | */ 143 | Illuminate\Auth\AuthServiceProvider::class, 144 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 145 | Illuminate\Bus\BusServiceProvider::class, 146 | Illuminate\Cache\CacheServiceProvider::class, 147 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 148 | Illuminate\Cookie\CookieServiceProvider::class, 149 | Illuminate\Database\DatabaseServiceProvider::class, 150 | Illuminate\Encryption\EncryptionServiceProvider::class, 151 | Illuminate\Filesystem\FilesystemServiceProvider::class, 152 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 153 | Illuminate\Hashing\HashServiceProvider::class, 154 | Illuminate\Mail\MailServiceProvider::class, 155 | Illuminate\Notifications\NotificationServiceProvider::class, 156 | Illuminate\Pagination\PaginationServiceProvider::class, 157 | Illuminate\Pipeline\PipelineServiceProvider::class, 158 | Illuminate\Queue\QueueServiceProvider::class, 159 | Illuminate\Redis\RedisServiceProvider::class, 160 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 161 | Illuminate\Session\SessionServiceProvider::class, 162 | Illuminate\Translation\TranslationServiceProvider::class, 163 | Illuminate\Validation\ValidationServiceProvider::class, 164 | Illuminate\View\ViewServiceProvider::class, 165 | 166 | /* 167 | * Package Service Providers... 168 | */ 169 | 170 | Laravel\Passport\PassportServiceProvider::class, 171 | Vinkla\Pusher\PusherServiceProvider::class, 172 | 173 | /* 174 | * Application Service Providers... 175 | */ 176 | App\Providers\AppServiceProvider::class, 177 | App\Providers\AuthServiceProvider::class, 178 | // App\Providers\BroadcastServiceProvider::class, 179 | App\Providers\EventServiceProvider::class, 180 | App\Providers\RouteServiceProvider::class, 181 | 182 | ], 183 | 184 | /* 185 | |-------------------------------------------------------------------------- 186 | | Class Aliases 187 | |-------------------------------------------------------------------------- 188 | | 189 | | This array of class aliases will be registered when this application 190 | | is started. However, feel free to register as many as you wish as 191 | | the aliases are "lazy" loaded so they don't hinder performance. 192 | | 193 | */ 194 | 195 | 'aliases' => [ 196 | 197 | 'App' => Illuminate\Support\Facades\App::class, 198 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 199 | 'Auth' => Illuminate\Support\Facades\Auth::class, 200 | 'Blade' => Illuminate\Support\Facades\Blade::class, 201 | 'Bus' => Illuminate\Support\Facades\Bus::class, 202 | 'Cache' => Illuminate\Support\Facades\Cache::class, 203 | 'Config' => Illuminate\Support\Facades\Config::class, 204 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 205 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 206 | 'DB' => Illuminate\Support\Facades\DB::class, 207 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 208 | 'Event' => Illuminate\Support\Facades\Event::class, 209 | 'File' => Illuminate\Support\Facades\File::class, 210 | 'Gate' => Illuminate\Support\Facades\Gate::class, 211 | 'Hash' => Illuminate\Support\Facades\Hash::class, 212 | 'Lang' => Illuminate\Support\Facades\Lang::class, 213 | 'Log' => Illuminate\Support\Facades\Log::class, 214 | 'Mail' => Illuminate\Support\Facades\Mail::class, 215 | 'Notification' => Illuminate\Support\Facades\Notification::class, 216 | 'Password' => Illuminate\Support\Facades\Password::class, 217 | 'Queue' => Illuminate\Support\Facades\Queue::class, 218 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 219 | 'LRedis' => Illuminate\Support\Facades\Redis::class, 220 | 'Request' => Illuminate\Support\Facades\Request::class, 221 | 'Response' => Illuminate\Support\Facades\Response::class, 222 | 'Route' => Illuminate\Support\Facades\Route::class, 223 | 'Schema' => Illuminate\Support\Facades\Schema::class, 224 | 'Session' => Illuminate\Support\Facades\Session::class, 225 | 'Storage' => Illuminate\Support\Facades\Storage::class, 226 | 'URL' => Illuminate\Support\Facades\URL::class, 227 | 'Validator' => Illuminate\Support\Facades\Validator::class, 228 | 'View' => Illuminate\Support\Facades\View::class, 229 | 230 | 'LaravelPusher' => Vinkla\Pusher\Facades\Pusher::class, 231 | 232 | ], 233 | 234 | ]; 235 | -------------------------------------------------------------------------------- /node_server/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | accepts@~1.3.3: 6 | version "1.3.3" 7 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" 8 | dependencies: 9 | mime-types "~2.1.11" 10 | negotiator "0.6.1" 11 | 12 | accepts@~1.3.4: 13 | version "1.3.7" 14 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" 15 | dependencies: 16 | mime-types "~2.1.24" 17 | negotiator "0.6.2" 18 | 19 | after@0.8.2: 20 | version "0.8.2" 21 | resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" 22 | 23 | array-flatten@1.1.1: 24 | version "1.1.1" 25 | resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" 26 | 27 | arraybuffer.slice@~0.0.7: 28 | version "0.0.7" 29 | resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" 30 | 31 | backo2@1.0.2: 32 | version "1.0.2" 33 | resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" 34 | 35 | base64-arraybuffer@0.1.4: 36 | version "0.1.4" 37 | resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz#9818c79e059b1355f97e0428a017c838e90ba812" 38 | 39 | base64id@2.0.0: 40 | version "2.0.0" 41 | resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" 42 | 43 | blob@0.0.5: 44 | version "0.0.5" 45 | resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" 46 | 47 | component-bind@1.0.0: 48 | version "1.0.0" 49 | resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" 50 | 51 | component-emitter@1.2.1: 52 | version "1.2.1" 53 | resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" 54 | 55 | component-emitter@~1.3.0: 56 | version "1.3.0" 57 | resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" 58 | 59 | component-inherit@0.0.3: 60 | version "0.0.3" 61 | resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" 62 | 63 | content-disposition@0.5.2: 64 | version "0.5.2" 65 | resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" 66 | 67 | content-type@~1.0.2: 68 | version "1.0.2" 69 | resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" 70 | 71 | cookie-signature@1.0.6: 72 | version "1.0.6" 73 | resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" 74 | 75 | cookie@0.3.1: 76 | version "0.3.1" 77 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" 78 | 79 | cookie@~0.4.1: 80 | version "0.4.1" 81 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" 82 | 83 | debug@2.6.1: 84 | version "2.6.1" 85 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" 86 | dependencies: 87 | ms "0.7.2" 88 | 89 | debug@~3.1.0: 90 | version "3.1.0" 91 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 92 | dependencies: 93 | ms "2.0.0" 94 | 95 | debug@~4.1.0: 96 | version "4.1.1" 97 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" 98 | dependencies: 99 | ms "^2.1.1" 100 | 101 | denque@^1.5.0: 102 | version "1.5.1" 103 | resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.1.tgz#07f670e29c9a78f8faecb2566a1e2c11929c5cbf" 104 | 105 | depd@1.1.0, depd@~1.1.0: 106 | version "1.1.0" 107 | resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" 108 | 109 | destroy@~1.0.4: 110 | version "1.0.4" 111 | resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" 112 | 113 | ee-first@1.1.1: 114 | version "1.1.1" 115 | resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" 116 | 117 | encodeurl@~1.0.1: 118 | version "1.0.1" 119 | resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" 120 | 121 | engine.io-client@~3.5.0: 122 | version "3.5.2" 123 | resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.5.2.tgz#0ef473621294004e9ceebe73cef0af9e36f2f5fa" 124 | dependencies: 125 | component-emitter "~1.3.0" 126 | component-inherit "0.0.3" 127 | debug "~3.1.0" 128 | engine.io-parser "~2.2.0" 129 | has-cors "1.1.0" 130 | indexof "0.0.1" 131 | parseqs "0.0.6" 132 | parseuri "0.0.6" 133 | ws "~7.4.2" 134 | xmlhttprequest-ssl "~1.6.2" 135 | yeast "0.1.2" 136 | 137 | engine.io-parser@~2.2.0: 138 | version "2.2.1" 139 | resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.1.tgz#57ce5611d9370ee94f99641b589f94c97e4f5da7" 140 | dependencies: 141 | after "0.8.2" 142 | arraybuffer.slice "~0.0.7" 143 | base64-arraybuffer "0.1.4" 144 | blob "0.0.5" 145 | has-binary2 "~1.0.2" 146 | 147 | engine.io@~3.5.0: 148 | version "3.5.0" 149 | resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.5.0.tgz#9d6b985c8a39b1fe87cd91eb014de0552259821b" 150 | dependencies: 151 | accepts "~1.3.4" 152 | base64id "2.0.0" 153 | cookie "~0.4.1" 154 | debug "~4.1.0" 155 | engine.io-parser "~2.2.0" 156 | ws "~7.4.2" 157 | 158 | escape-html@~1.0.3: 159 | version "1.0.3" 160 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" 161 | 162 | etag@~1.8.0: 163 | version "1.8.0" 164 | resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" 165 | 166 | express@^4.14.0: 167 | version "4.15.2" 168 | resolved "https://registry.yarnpkg.com/express/-/express-4.15.2.tgz#af107fc148504457f2dca9a6f2571d7129b97b35" 169 | dependencies: 170 | accepts "~1.3.3" 171 | array-flatten "1.1.1" 172 | content-disposition "0.5.2" 173 | content-type "~1.0.2" 174 | cookie "0.3.1" 175 | cookie-signature "1.0.6" 176 | debug "2.6.1" 177 | depd "~1.1.0" 178 | encodeurl "~1.0.1" 179 | escape-html "~1.0.3" 180 | etag "~1.8.0" 181 | finalhandler "~1.0.0" 182 | fresh "0.5.0" 183 | merge-descriptors "1.0.1" 184 | methods "~1.1.2" 185 | on-finished "~2.3.0" 186 | parseurl "~1.3.1" 187 | path-to-regexp "0.1.7" 188 | proxy-addr "~1.1.3" 189 | qs "6.4.0" 190 | range-parser "~1.2.0" 191 | send "0.15.1" 192 | serve-static "1.12.1" 193 | setprototypeof "1.0.3" 194 | statuses "~1.3.1" 195 | type-is "~1.6.14" 196 | utils-merge "1.0.0" 197 | vary "~1.1.0" 198 | 199 | finalhandler@~1.0.0: 200 | version "1.0.0" 201 | resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.0.tgz#b5691c2c0912092f18ac23e9416bde5cd7dc6755" 202 | dependencies: 203 | debug "2.6.1" 204 | encodeurl "~1.0.1" 205 | escape-html "~1.0.3" 206 | on-finished "~2.3.0" 207 | parseurl "~1.3.1" 208 | statuses "~1.3.1" 209 | unpipe "~1.0.0" 210 | 211 | forwarded@~0.1.0: 212 | version "0.1.2" 213 | resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" 214 | 215 | fresh@0.5.0: 216 | version "0.5.0" 217 | resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" 218 | 219 | has-binary2@~1.0.2: 220 | version "1.0.3" 221 | resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" 222 | dependencies: 223 | isarray "2.0.1" 224 | 225 | has-cors@1.1.0: 226 | version "1.1.0" 227 | resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" 228 | 229 | http-errors@~1.6.1: 230 | version "1.6.1" 231 | resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" 232 | dependencies: 233 | depd "1.1.0" 234 | inherits "2.0.3" 235 | setprototypeof "1.0.3" 236 | statuses ">= 1.3.1 < 2" 237 | 238 | indexof@0.0.1: 239 | version "0.0.1" 240 | resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" 241 | 242 | inherits@2.0.3: 243 | version "2.0.3" 244 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 245 | 246 | ipaddr.js@1.2.0: 247 | version "1.2.0" 248 | resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.2.0.tgz#8aba49c9192799585bdd643e0ccb50e8ae777ba4" 249 | 250 | isarray@2.0.1: 251 | version "2.0.1" 252 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" 253 | 254 | media-typer@0.3.0: 255 | version "0.3.0" 256 | resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" 257 | 258 | merge-descriptors@1.0.1: 259 | version "1.0.1" 260 | resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" 261 | 262 | methods@~1.1.2: 263 | version "1.1.2" 264 | resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" 265 | 266 | mime-db@1.51.0: 267 | version "1.51.0" 268 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" 269 | 270 | mime-db@~1.26.0: 271 | version "1.26.0" 272 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" 273 | 274 | mime-types@~2.1.11, mime-types@~2.1.13: 275 | version "2.1.14" 276 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" 277 | dependencies: 278 | mime-db "~1.26.0" 279 | 280 | mime-types@~2.1.24: 281 | version "2.1.34" 282 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" 283 | dependencies: 284 | mime-db "1.51.0" 285 | 286 | mime@1.3.4: 287 | version "1.3.4" 288 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" 289 | 290 | ms@0.7.2: 291 | version "0.7.2" 292 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 293 | 294 | ms@2.0.0: 295 | version "2.0.0" 296 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 297 | 298 | ms@^2.1.1: 299 | version "2.1.3" 300 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" 301 | 302 | negotiator@0.6.1: 303 | version "0.6.1" 304 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" 305 | 306 | negotiator@0.6.2: 307 | version "0.6.2" 308 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" 309 | 310 | on-finished@~2.3.0: 311 | version "2.3.0" 312 | resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" 313 | dependencies: 314 | ee-first "1.1.1" 315 | 316 | parseqs@0.0.6: 317 | version "0.0.6" 318 | resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.6.tgz#8e4bb5a19d1cdc844a08ac974d34e273afa670d5" 319 | 320 | parseuri@0.0.6: 321 | version "0.0.6" 322 | resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.6.tgz#e1496e829e3ac2ff47f39a4dd044b32823c4a25a" 323 | 324 | parseurl@~1.3.1: 325 | version "1.3.1" 326 | resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" 327 | 328 | path-to-regexp@0.1.7: 329 | version "0.1.7" 330 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" 331 | 332 | proxy-addr@~1.1.3: 333 | version "1.1.3" 334 | resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074" 335 | dependencies: 336 | forwarded "~0.1.0" 337 | ipaddr.js "1.2.0" 338 | 339 | qs@6.4.0: 340 | version "6.4.0" 341 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" 342 | 343 | range-parser@~1.2.0: 344 | version "1.2.0" 345 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" 346 | 347 | redis-commands@^1.7.0: 348 | version "1.7.0" 349 | resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89" 350 | 351 | redis-errors@^1.0.0, redis-errors@^1.2.0: 352 | version "1.2.0" 353 | resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad" 354 | 355 | redis-parser@^3.0.0: 356 | version "3.0.0" 357 | resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4" 358 | dependencies: 359 | redis-errors "^1.0.0" 360 | 361 | redis@^3.1.1: 362 | version "3.1.1" 363 | resolved "https://registry.yarnpkg.com/redis/-/redis-3.1.1.tgz#a44bee7c072dcf685e139048d6a1a4d3b00f5d01" 364 | dependencies: 365 | denque "^1.5.0" 366 | redis-commands "^1.7.0" 367 | redis-errors "^1.2.0" 368 | redis-parser "^3.0.0" 369 | 370 | send@0.15.1: 371 | version "0.15.1" 372 | resolved "https://registry.yarnpkg.com/send/-/send-0.15.1.tgz#8a02354c26e6f5cca700065f5f0cdeba90ec7b5f" 373 | dependencies: 374 | debug "2.6.1" 375 | depd "~1.1.0" 376 | destroy "~1.0.4" 377 | encodeurl "~1.0.1" 378 | escape-html "~1.0.3" 379 | etag "~1.8.0" 380 | fresh "0.5.0" 381 | http-errors "~1.6.1" 382 | mime "1.3.4" 383 | ms "0.7.2" 384 | on-finished "~2.3.0" 385 | range-parser "~1.2.0" 386 | statuses "~1.3.1" 387 | 388 | serve-static@1.12.1: 389 | version "1.12.1" 390 | resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.1.tgz#7443a965e3ced647aceb5639fa06bf4d1bbe0039" 391 | dependencies: 392 | encodeurl "~1.0.1" 393 | escape-html "~1.0.3" 394 | parseurl "~1.3.1" 395 | send "0.15.1" 396 | 397 | setprototypeof@1.0.3: 398 | version "1.0.3" 399 | resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" 400 | 401 | socket.io-adapter@~1.1.0: 402 | version "1.1.2" 403 | resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" 404 | 405 | socket.io-client@2.4.0: 406 | version "2.4.0" 407 | resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.4.0.tgz#aafb5d594a3c55a34355562fc8aea22ed9119a35" 408 | dependencies: 409 | backo2 "1.0.2" 410 | component-bind "1.0.0" 411 | component-emitter "~1.3.0" 412 | debug "~3.1.0" 413 | engine.io-client "~3.5.0" 414 | has-binary2 "~1.0.2" 415 | indexof "0.0.1" 416 | parseqs "0.0.6" 417 | parseuri "0.0.6" 418 | socket.io-parser "~3.3.0" 419 | to-array "0.1.4" 420 | 421 | socket.io-parser@~3.3.0: 422 | version "3.3.2" 423 | resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.2.tgz#ef872009d0adcf704f2fbe830191a14752ad50b6" 424 | dependencies: 425 | component-emitter "~1.3.0" 426 | debug "~3.1.0" 427 | isarray "2.0.1" 428 | 429 | socket.io-parser@~3.4.0: 430 | version "3.4.1" 431 | resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.4.1.tgz#b06af838302975837eab2dc980037da24054d64a" 432 | dependencies: 433 | component-emitter "1.2.1" 434 | debug "~4.1.0" 435 | isarray "2.0.1" 436 | 437 | socket.io@^2.4.0: 438 | version "2.4.0" 439 | resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.4.0.tgz#01030a2727bd8eb2e85ea96d69f03692ee53d47e" 440 | dependencies: 441 | debug "~4.1.0" 442 | engine.io "~3.5.0" 443 | has-binary2 "~1.0.2" 444 | socket.io-adapter "~1.1.0" 445 | socket.io-client "2.4.0" 446 | socket.io-parser "~3.4.0" 447 | 448 | "statuses@>= 1.3.1 < 2", statuses@~1.3.1: 449 | version "1.3.1" 450 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" 451 | 452 | to-array@0.1.4: 453 | version "0.1.4" 454 | resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" 455 | 456 | type-is@~1.6.14: 457 | version "1.6.14" 458 | resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.14.tgz#e219639c17ded1ca0789092dd54a03826b817cb2" 459 | dependencies: 460 | media-typer "0.3.0" 461 | mime-types "~2.1.13" 462 | 463 | unpipe@~1.0.0: 464 | version "1.0.0" 465 | resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" 466 | 467 | utils-merge@1.0.0: 468 | version "1.0.0" 469 | resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" 470 | 471 | vary@~1.1.0: 472 | version "1.1.0" 473 | resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.0.tgz#e1e5affbbd16ae768dd2674394b9ad3022653140" 474 | 475 | ws@~7.4.2: 476 | version "7.4.6" 477 | resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" 478 | 479 | xmlhttprequest-ssl@~1.6.2: 480 | version "1.6.3" 481 | resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz#03b713873b01659dfa2c1c5d056065b27ddc2de6" 482 | 483 | yeast@0.1.2: 484 | version "0.1.2" 485 | resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" 486 | --------------------------------------------------------------------------------