├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .gitmodules ├── LICENSE.txt ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ └── Controller.php │ ├── Kernel.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php ├── Models │ └── User.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php ├── trax-auth.php ├── trax-lrs.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php └── seeders │ └── DatabaseSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ ├── lrs.css │ ├── lrs.css.map │ └── plugins │ │ └── highlightjs.min.css ├── favicon.ico ├── fonts │ ├── FontAwesome │ │ ├── fa-brands-400-ie.eot │ │ ├── fa-brands-400.eot │ │ ├── fa-brands-400.svg │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-regular-400-ie.eot │ │ ├── fa-regular-400.eot │ │ ├── fa-regular-400.svg │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900-ie.eot │ │ ├── fa-solid-900.eot │ │ ├── fa-solid-900.svg │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ └── fa-solid-900.woff2 │ ├── Nucleo │ │ ├── nucleo.eot │ │ ├── nucleo.svg │ │ ├── nucleo.ttf │ │ ├── nucleo.woff │ │ └── nucleo.woff2 │ ├── Poppins │ │ ├── pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2 │ │ ├── pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2 │ │ ├── pxiByp8kv8JHgFVrLDD4Z1JlFc-K.woff2 │ │ ├── pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2 │ │ ├── pxiByp8kv8JHgFVrLDz8Z1JlFc-K.woff2 │ │ ├── pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 │ │ ├── pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2 │ │ ├── pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2 │ │ ├── pxiByp8kv8JHgFVrLFj_Z1JlFc-K.woff2 │ │ ├── pxiByp8kv8JHgFVrLFj_Z1xlFQ.woff2 │ │ ├── pxiEyp8kv8JHgFVrJJfecg.woff2 │ │ └── pxiEyp8kv8JHgFVrJJnecmNE.woff2 │ ├── font-awesome.css │ ├── nucleo-icons.css │ └── poppins-font.css ├── img │ ├── apple-icon.png │ └── favicon.png ├── index.php ├── js │ ├── lrs.js │ └── lrs.js.map ├── mix-manifest.json └── robots.txt ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js └── views │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── services └── trax │ └── lrs │ ├── resources │ ├── js │ │ ├── app.js │ │ ├── app │ │ │ ├── App.vue │ │ │ ├── components │ │ │ │ ├── Auth │ │ │ │ │ ├── LoginCard.vue │ │ │ │ │ └── LogoutButton.vue │ │ │ │ ├── BackToTop.vue │ │ │ │ ├── Inputs │ │ │ │ │ └── BaseInput.vue │ │ │ │ ├── Modal.vue │ │ │ │ ├── ModalConfirm.vue │ │ │ │ ├── SidebarPlugin │ │ │ │ │ ├── SideBar.vue │ │ │ │ │ └── index.js │ │ │ │ └── TopbarPlugin │ │ │ │ │ └── index.js │ │ │ ├── contents │ │ │ │ ├── Brand.vue │ │ │ │ ├── BrandFooter.vue │ │ │ │ └── help │ │ │ │ │ └── HelpFilters.vue │ │ │ ├── i18n.js │ │ │ ├── layout │ │ │ │ ├── FullPageLayout.vue │ │ │ │ ├── SideMenuLayout.vue │ │ │ │ └── parts │ │ │ │ │ ├── Centered.vue │ │ │ │ │ ├── Content.vue │ │ │ │ │ ├── ContentFooter.vue │ │ │ │ │ ├── SideMenu.vue │ │ │ │ │ └── TopNavbar.vue │ │ │ ├── locales │ │ │ │ └── en.json │ │ │ ├── main.js │ │ │ ├── pages │ │ │ │ ├── ClientsPage.vue │ │ │ │ ├── ErrorPage.vue │ │ │ │ ├── LoginPage.vue │ │ │ │ ├── MaintenancePage.vue │ │ │ │ ├── NotFoundPage.vue │ │ │ │ ├── SettingsPage.vue │ │ │ │ ├── StatementsPage.vue │ │ │ │ ├── UnauthorizedPage.vue │ │ │ │ ├── clients │ │ │ │ │ ├── ClientForm.vue │ │ │ │ │ ├── ClientInfo.vue │ │ │ │ │ └── ClientsCrud.vue │ │ │ │ ├── settings │ │ │ │ │ └── ClearAll.vue │ │ │ │ └── statements │ │ │ │ │ ├── StatementViewer.vue │ │ │ │ │ ├── StatementsResult.vue │ │ │ │ │ └── StatementsSearch.vue │ │ │ └── routing.js │ │ └── lib.js │ ├── sass │ │ ├── app.scss │ │ └── custom.scss │ └── views │ │ └── app.blade.php │ ├── routes │ └── routes.php │ └── src │ ├── BasicClients │ ├── BasicClientController.php │ └── BasicClientService.php │ ├── Console │ ├── AdminCommand.php │ ├── CreateAdminCommand.php │ ├── DeleteAdminCommand.php │ ├── ListAdminCommand.php │ └── UpdateAdminCommand.php │ └── LrsServiceProvider.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME="TRAX LRS" 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://traxlrs21starter.test 6 | 7 | DB_CONNECTION=mysql 8 | DB_HOST=127.0.0.1 9 | DB_PORT=3306 10 | DB_DATABASE=traxlrs21_starter 11 | DB_USERNAME=root 12 | DB_PASSWORD= 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | /services/tim 21 | /services/trax/framework 22 | .env.testing 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "services/trax/framework"] 2 | path = services/trax/framework 3 | url = https://github.com/trax-project/trax2-framework.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TRAX LRS 2.1 - Starter Edition 2 | 3 | 4 | ## About TRAX LRS 5 | 6 | TRAX LRS is an xAPI conformant Learning Record Store (LRS) built with Laravel. 7 | 8 | It focuses on the core features of an LRS, and that's it! 9 | 10 | We want to keep it simple and clean, and give you the freedom to build what you want around it. 11 | 12 | Fore further information, visit http://traxlrs.com 13 | 14 | 15 | ## Sofware License & Copyright 16 | 17 | TRAX LRS **Starter Edition** is distributed under the [GNU-GPL3 license](https://www.gnu.org/licenses/gpl-3.0.fr.html). 18 | 19 | Copyright 2022-2024 Sébastien Fraysse, http://fraysse.eu, sebastien@fraysse.eu. 20 | 21 | 22 | ## Server Requirements 23 | 24 | ### Apache 2.4 25 | 26 | - mod_rewrite 27 | 28 | ### PHP 8.1 to 8.3 29 | 30 | Check that your PHP version and configuration is valid both for PHP Web & CLI. 31 | The following extensions are required: 32 | 33 | - Ctype 34 | - cURL 35 | - DOM 36 | - Fileinfo 37 | - Filter 38 | - Hash 39 | - Mbstring 40 | - OpenSSL 41 | - PCRE 42 | - PDO (PDO_MYSQL / PDO_PGSQL) 43 | - Session 44 | - Tokenizer 45 | - XML 46 | 47 | ### Database 48 | 49 | - MySQL 5.7.7+ 50 | - MariaDB 10.10+ 51 | - PostgreSQL 12+ 52 | 53 | ### Utilities 54 | 55 | - Git 56 | - Composer 2 57 | 58 | 59 | ## Upgrade from TRAX LRS 2.0.x 60 | 61 | In order to upgrade TRAX LRS from version 2.0.x, we recommend to install the last release of TRAX LRS 62 | in a different location and then, to make a copy the `.env` file from your previous installation. 63 | 64 | 65 | ## Fresh install 66 | 67 | ### First Steps 68 | 69 | Assuming that you want to install TRAX LRS in a folder named **traxlrs**: 70 | 71 | ``` 72 | git clone https://github.com/trax-project/trax2-starter-lrs traxlrs 73 | cd traxlrs 74 | composer install 75 | ``` 76 | 77 | ### File Permissions 78 | 79 | The folders `storage` and `bootstrap/cache` must be writable both by the webserver and the console user. 80 | Assuming that the ownership has been properly set, you should be able to assign a `0775` permission 81 | to the folders and subfolders and a `644` permission to the files. 82 | Check this post for further details: https://laracasts.com/discuss/channels/laravel/proper-folder-permissions 83 | 84 | If you are not sure how to configure this, you can use the following commands **FOR TESTING PURPOSE ONLY**. 85 | 86 | ``` 87 | chmod -R 777 bootstrap/cache 88 | chmod -R 777 storage 89 | ``` 90 | 91 | ### Web Server 92 | 93 | For security reasons, only the `public` folder should be accessible by the web server. 94 | Create a virtual host and configure the document root to `traxlrs/public`. 95 | 96 | 97 | ### Database 98 | 99 | Create an empty database with the `utf8mb4_unicode_ci` encoding. 100 | Then, at the root of the application folder, make a copy of the `.env.example` file, 101 | rename it `.env` and enter your database settings. 102 | 103 | *MySQL/MariaDB example:* 104 | 105 | ```ini 106 | DB_CONNECTION=mysql 107 | DB_HOST=127.0.0.1 108 | DB_PORT=3306 109 | DB_DATABASE=traxlrs 110 | DB_USERNAME=root 111 | DB_PASSWORD= 112 | ``` 113 | 114 | *PostgreSQL example:* 115 | 116 | ```ini 117 | DB_CONNECTION=pgsql 118 | DB_HOST=127.0.0.1 119 | DB_PORT=5432 120 | DB_DATABASE=traxlrs 121 | DB_USERNAME=postgres 122 | DB_PASSWORD=aaaaaa 123 | ``` 124 | 125 | ### App URL 126 | 127 | In the `.env` file, you must set the public URL of your TRAX LRS application : 128 | 129 | ```ini 130 | APP_URL=http://traxlrs.test 131 | ``` 132 | 133 | ### Last Steps 134 | 135 | ``` 136 | php artisan key:generate 137 | php artisan migrate 138 | ``` 139 | 140 | 141 | ## Admin Account 142 | 143 | You can now create an admin account with the following command. 144 | This will give your credentials to log into the application. 145 | 146 | ``` 147 | php artisan admin:create 148 | ``` 149 | 150 | Additional commands are available to manage the admin accounts: 151 | 152 | ```powershell 153 | php artisan admin:list 154 | php artisan admin:update 155 | php artisan admin:delete 156 | ``` 157 | 158 | 159 | ## Production server 160 | 161 | In the `.env` file, changes settings from: 162 | 163 | ```ini 164 | APP_ENV=local 165 | APP_DEBUG=true 166 | ``` 167 | 168 | To: 169 | 170 | ```ini 171 | APP_ENV=production 172 | APP_DEBUG=false 173 | ``` 174 | 175 | To optimize performances, you can run the following commands. 176 | 177 | ```powershell 178 | php artisan config:cache 179 | php artisan route:cache 180 | ``` 181 | 182 | The `php artisan config:cache` command must be ran again after each config change. 183 | 184 | 185 | 186 | ## Known issues 187 | 188 | ### SQLSTATE[42000]: Syntax error or access violation: 1071 189 | 190 | If you get this error during the `php artisan migrate` command, check your version of MySQL or MariaDB. 191 | Since TRAX LRS 2.0.2, MySQL versions older than 5.7.7 are not supported anymore. 192 | MariaDB versions older than 10.3 are not supported. 193 | 194 | ### 404 error on the main page 195 | 196 | TRAX LRS has a `/public/.htaccess` file with some Apache directives. 197 | When these directives are ignored by Apache, this leads to a 404 error. 198 | In this case, check the `httpd.conf` file of Apache and try to set the `AllowOverride` option to `All`: 199 | 200 | ```xml 201 | 202 | Allowoverride All 203 | 204 | ``` 205 | 206 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 16 | } 17 | 18 | /** 19 | * Register the commands for the application. 20 | */ 21 | protected function commands(): void 22 | { 23 | $this->load(__DIR__.'/Commands'); 24 | 25 | require base_path('routes/console.php'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $dontFlash = [ 16 | 'current_password', 17 | 'password', 18 | 'password_confirmation', 19 | ]; 20 | 21 | /** 22 | * Register the exception handling callbacks for the application. 23 | */ 24 | public function register(): void 25 | { 26 | $this->reportable(function (Throwable $e) { 27 | // 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $middleware = [ 17 | // \App\Http\Middleware\TrustHosts::class, 18 | // \App\Http\Middleware\TrustProxies::class, 19 | // \Illuminate\Http\Middleware\HandleCors::class, 20 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class, 21 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, 22 | \App\Http\Middleware\TrimStrings::class, 23 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, 24 | \Trax\Auth\Middleware\CorsMiddleware::class, 25 | ]; 26 | 27 | /** 28 | * The application's route middleware groups. 29 | * 30 | * @var array> 31 | */ 32 | protected $middlewareGroups = [ 33 | 'web' => [ 34 | \App\Http\Middleware\EncryptCookies::class, 35 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 36 | \Illuminate\Session\Middleware\StartSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 44 | \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', 45 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 46 | ], 47 | ]; 48 | 49 | /** 50 | * The application's middleware aliases. 51 | * 52 | * Aliases may be used instead of class names to conveniently assign middleware to routes and groups. 53 | * 54 | * @var array 55 | */ 56 | protected $middlewareAliases = [ 57 | 'auth' => \App\Http\Middleware\Authenticate::class, 58 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 59 | 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, 60 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 61 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 62 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 63 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 64 | 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, 65 | 'signed' => \App\Http\Middleware\ValidateSignature::class, 66 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 67 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 68 | ]; 69 | } 70 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 24 | return redirect(RouteServiceProvider::HOME); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/ValidateSignature.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 'fbclid', 16 | // 'utm_campaign', 17 | // 'utm_content', 18 | // 'utm_medium', 19 | // 'utm_source', 20 | // 'utm_term', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | protected $fillable = [ 21 | 'name', 22 | 'email', 23 | 'password', 24 | ]; 25 | 26 | /** 27 | * The attributes that should be hidden for serialization. 28 | * 29 | * @var array 30 | */ 31 | protected $hidden = [ 32 | 'password', 33 | 'remember_token', 34 | ]; 35 | 36 | /** 37 | * The attributes that should be cast. 38 | * 39 | * @var array 40 | */ 41 | protected $casts = [ 42 | 'email_verified_at' => 'datetime', 43 | 'password' => 'hashed', 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | */ 22 | public function boot(): void 23 | { 24 | // 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 16 | */ 17 | protected $listen = [ 18 | Registered::class => [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | */ 26 | public function boot(): void 27 | { 28 | // 29 | } 30 | 31 | /** 32 | * Determine if events and listeners should be automatically discovered. 33 | */ 34 | public function shouldDiscoverEvents(): bool 35 | { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | by($request->user()?->id ?: $request->ip()); 29 | }); 30 | 31 | $this->routes(function () { 32 | Route::middleware('api') 33 | ->prefix('api') 34 | ->group(base_path('routes/api.php')); 35 | 36 | Route::middleware('web') 37 | ->group(base_path('routes/web.php')); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trax2/starter-lrs", 3 | "type": "project", 4 | "description": "TRAX LRS. Starter Edition.", 5 | "keywords": ["trax", "lrs", "xapi"], 6 | "license": "GPL-3.0-or-later", 7 | "require": { 8 | "php": "^8.1", 9 | "guzzlehttp/guzzle": "^7.2", 10 | "laravel/framework": "^10.10", 11 | "laravel/sanctum": "^3.3", 12 | "laravel/tinker": "^2.8", 13 | "laravel/ui": "^4.4", 14 | "trax2/framework": "2.0.4" 15 | }, 16 | "require-dev": { 17 | "fakerphp/faker": "^1.9.1", 18 | "laravel/pint": "^1.0", 19 | "laravel/sail": "^1.18", 20 | "mockery/mockery": "^1.4.4", 21 | "nunomaduro/collision": "^7.0", 22 | "phpunit/phpunit": "^10.1", 23 | "spatie/laravel-ignition": "^2.0" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "App\\": "app/", 28 | "Trax\\Lrs\\": "services/trax/lrs/src/", 29 | "Database\\Factories\\": "database/factories/", 30 | "Database\\Seeders\\": "database/seeders/" 31 | } 32 | }, 33 | "autoload-dev": { 34 | "psr-4": { 35 | "Tests\\": "tests/" 36 | } 37 | }, 38 | "scripts": { 39 | "post-autoload-dump": [ 40 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 41 | "@php artisan package:discover --ansi" 42 | ], 43 | "post-update-cmd": [ 44 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force" 45 | ], 46 | "post-root-package-install": [ 47 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 48 | ], 49 | "post-create-project-cmd": [ 50 | "@php artisan key:generate --ansi" 51 | ] 52 | }, 53 | "extra": { 54 | "laravel": { 55 | "dont-discover": [] 56 | } 57 | }, 58 | "config": { 59 | "optimize-autoloader": true, 60 | "preferred-install": "dist", 61 | "sort-packages": true, 62 | "allow-plugins": { 63 | "pestphp/pest-plugin": true, 64 | "php-http/discovery": true 65 | } 66 | }, 67 | "minimum-stability": "stable", 68 | "prefer-stable": true 69 | } 70 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Application Environment 24 | |-------------------------------------------------------------------------- 25 | | 26 | | This value determines the "environment" your application is currently 27 | | running in. This may determine how you prefer to configure various 28 | | services the application utilizes. Set this in your ".env" file. 29 | | 30 | */ 31 | 32 | 'env' => env('APP_ENV', 'production'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | Application Debug Mode 37 | |-------------------------------------------------------------------------- 38 | | 39 | | When your application is in debug mode, detailed error messages with 40 | | stack traces will be shown on every error that occurs within your 41 | | application. If disabled, a simple generic error page is shown. 42 | | 43 | */ 44 | 45 | 'debug' => (bool) env('APP_DEBUG', false), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Application URL 50 | |-------------------------------------------------------------------------- 51 | | 52 | | This URL is used by the console to properly generate URLs when using 53 | | the Artisan command line tool. You should set this to the root of 54 | | your application so that it is used when running Artisan tasks. 55 | | 56 | */ 57 | 58 | 'url' => env('APP_URL', 'http://localhost'), 59 | 60 | 'asset_url' => env('ASSET_URL'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Application Timezone 65 | |-------------------------------------------------------------------------- 66 | | 67 | | Here you may specify the default timezone for your application, which 68 | | will be used by the PHP date and date-time functions. We have gone 69 | | ahead and set this to a sensible default for you out of the box. 70 | | 71 | */ 72 | 73 | 'timezone' => 'UTC', 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Application Locale Configuration 78 | |-------------------------------------------------------------------------- 79 | | 80 | | The application locale determines the default locale that will be used 81 | | by the translation service provider. You are free to set this value 82 | | to any of the locales which will be supported by the application. 83 | | 84 | */ 85 | 86 | 'locale' => 'en', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Application Fallback Locale 91 | |-------------------------------------------------------------------------- 92 | | 93 | | The fallback locale determines the locale to use when the current one 94 | | is not available. You may change the value to correspond to any of 95 | | the language folders that are provided through your application. 96 | | 97 | */ 98 | 99 | 'fallback_locale' => 'en', 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Faker Locale 104 | |-------------------------------------------------------------------------- 105 | | 106 | | This locale will be used by the Faker PHP library when generating fake 107 | | data for your database seeds. For example, this will be used to get 108 | | localized telephone numbers, street address information and more. 109 | | 110 | */ 111 | 112 | 'faker_locale' => 'en_US', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Encryption Key 117 | |-------------------------------------------------------------------------- 118 | | 119 | | This key is used by the Illuminate encrypter service and should be set 120 | | to a random, 32 character string, otherwise these encrypted strings 121 | | will not be safe. Please do this before deploying an application! 122 | | 123 | */ 124 | 125 | 'key' => env('APP_KEY'), 126 | 127 | 'cipher' => 'AES-256-CBC', 128 | 129 | /* 130 | |-------------------------------------------------------------------------- 131 | | Maintenance Mode Driver 132 | |-------------------------------------------------------------------------- 133 | | 134 | | These configuration options determine the driver used to determine and 135 | | manage Laravel's "maintenance mode" status. The "cache" driver will 136 | | allow maintenance mode to be controlled across multiple machines. 137 | | 138 | | Supported drivers: "file", "cache" 139 | | 140 | */ 141 | 142 | 'maintenance' => [ 143 | 'driver' => 'file', 144 | // 'store' => 'redis', 145 | ], 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Autoloaded Service Providers 150 | |-------------------------------------------------------------------------- 151 | | 152 | | The service providers listed here will be automatically loaded on the 153 | | request to your application. Feel free to add your own services to 154 | | this array to grant expanded functionality to your applications. 155 | | 156 | */ 157 | 158 | 'providers' => ServiceProvider::defaultProviders()->merge([ 159 | /* 160 | * Package Service Providers... 161 | */ 162 | 163 | /* 164 | * Application Service Providers... 165 | */ 166 | App\Providers\AppServiceProvider::class, 167 | App\Providers\AuthServiceProvider::class, 168 | // App\Providers\BroadcastServiceProvider::class, 169 | App\Providers\EventServiceProvider::class, 170 | App\Providers\RouteServiceProvider::class, 171 | 172 | Trax\Core\TraxCoreServiceProvider::class, 173 | Trax\Auth\AuthServiceProvider::class, 174 | Trax\XapiValidation\XapiValidationServiceProvider::class, 175 | Trax\XapiStore\XapiStoreServiceProvider::class, 176 | Trax\Lrs\LrsServiceProvider::class, 177 | 178 | ])->toArray(), 179 | 180 | /* 181 | |-------------------------------------------------------------------------- 182 | | Class Aliases 183 | |-------------------------------------------------------------------------- 184 | | 185 | | This array of class aliases will be registered when this application 186 | | is started. However, feel free to register as many as you wish as 187 | | the aliases are "lazy" loaded so they don't hinder performance. 188 | | 189 | */ 190 | 191 | 'aliases' => Facade::defaultAliases()->merge([ 192 | 193 | 'TraxRouting' => Trax\Auth\TraxRouting::class, 194 | 'TraxAuth' => Trax\Auth\TraxAuth::class, 195 | 196 | ])->toArray(), 197 | 198 | 199 | 'secure' => env('APP_SECURE', null), 200 | 201 | ]; 202 | -------------------------------------------------------------------------------- /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" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => Trax\Auth\Stores\Users\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expiry time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | | The throttle setting is the number of seconds a user must wait before 88 | | generating more password reset tokens. This prevents the user from 89 | | quickly generating a very large amount of password reset tokens. 90 | | 91 | */ 92 | 93 | 'passwords' => [ 94 | 'users' => [ 95 | 'provider' => 'users', 96 | 'table' => 'trax_password_resets', 97 | 'expire' => 60, 98 | 'throttle' => 60, 99 | ], 100 | ], 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Password Confirmation Timeout 105 | |-------------------------------------------------------------------------- 106 | | 107 | | Here you may define the amount of seconds before a password confirmation 108 | | times out and the user is prompted to re-enter their password via the 109 | | confirmation screen. By default, the timeout lasts for three hours. 110 | | 111 | */ 112 | 113 | 'password_timeout' => 10800, 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /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_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', 41 | 'port' => env('PUSHER_PORT', 443), 42 | 'scheme' => env('PUSHER_SCHEME', 'https'), 43 | 'encrypted' => true, 44 | 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', 45 | ], 46 | 'client_options' => [ 47 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html 48 | ], 49 | ], 50 | 51 | 'ably' => [ 52 | 'driver' => 'ably', 53 | 'key' => env('ABLY_KEY'), 54 | ], 55 | 56 | 'redis' => [ 57 | 'driver' => 'redis', 58 | 'connection' => 'default', 59 | ], 60 | 61 | 'log' => [ 62 | 'driver' => 'log', 63 | ], 64 | 65 | 'null' => [ 66 | 'driver' => 'null', 67 | ], 68 | 69 | ], 70 | 71 | ]; 72 | -------------------------------------------------------------------------------- /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 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | 'lock_path' => storage_path('framework/cache/data'), 56 | ], 57 | 58 | 'memcached' => [ 59 | 'driver' => 'memcached', 60 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 61 | 'sasl' => [ 62 | env('MEMCACHED_USERNAME'), 63 | env('MEMCACHED_PASSWORD'), 64 | ], 65 | 'options' => [ 66 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 67 | ], 68 | 'servers' => [ 69 | [ 70 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 71 | 'port' => env('MEMCACHED_PORT', 11211), 72 | 'weight' => 100, 73 | ], 74 | ], 75 | ], 76 | 77 | 'redis' => [ 78 | 'driver' => 'redis', 79 | 'connection' => 'cache', 80 | 'lock_connection' => 'default', 81 | ], 82 | 83 | 'dynamodb' => [ 84 | 'driver' => 'dynamodb', 85 | 'key' => env('AWS_ACCESS_KEY_ID'), 86 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 87 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 88 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 89 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 90 | ], 91 | 92 | 'octane' => [ 93 | 'driver' => 'octane', 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Cache Key Prefix 101 | |-------------------------------------------------------------------------- 102 | | 103 | | When utilizing the APC, database, memcached, Redis, or DynamoDB cache 104 | | stores there might be other applications using the same cache. For 105 | | that reason, you may prefix every cache key to avoid collisions. 106 | | 107 | */ 108 | 109 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 110 | 111 | ]; 112 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => 'InnoDB', 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'search_path' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'), 93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Migration Repository Table 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This table keeps track of all the migrations that have already run for 104 | | your application. Using this information, we can determine which of 105 | | the migrations on disk haven't actually been run in the database. 106 | | 107 | */ 108 | 109 | 'migrations' => 'migrations', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Redis Databases 114 | |-------------------------------------------------------------------------- 115 | | 116 | | Redis is an open source, fast, and advanced key-value store that also 117 | | provides a richer body of commands than a typical key-value system 118 | | such as APC or Memcached. Laravel makes it easy to dig right in. 119 | | 120 | */ 121 | 122 | 'redis' => [ 123 | 124 | 'client' => env('REDIS_CLIENT', 'phpredis'), 125 | 126 | 'options' => [ 127 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 129 | ], 130 | 131 | 'default' => [ 132 | 'url' => env('REDIS_URL'), 133 | 'host' => env('REDIS_HOST', '127.0.0.1'), 134 | 'username' => env('REDIS_USERNAME'), 135 | 'password' => env('REDIS_PASSWORD'), 136 | 'port' => env('REDIS_PORT', '6379'), 137 | 'database' => env('REDIS_DB', '0'), 138 | ], 139 | 140 | 'cache' => [ 141 | 'url' => env('REDIS_URL'), 142 | 'host' => env('REDIS_HOST', '127.0.0.1'), 143 | 'username' => env('REDIS_USERNAME'), 144 | 'password' => env('REDIS_PASSWORD'), 145 | 'port' => env('REDIS_PORT', '6379'), 146 | 'database' => env('REDIS_CACHE_DB', '1'), 147 | ], 148 | 149 | ], 150 | 151 | ]; 152 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been set up for each driver as an example of the required values. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | 'throw' => false, 37 | ], 38 | 39 | 'public' => [ 40 | 'driver' => 'local', 41 | 'root' => storage_path('app/public'), 42 | 'url' => env('APP_URL').'/storage', 43 | 'visibility' => 'public', 44 | 'throw' => false, 45 | ], 46 | 47 | 's3' => [ 48 | 'driver' => 's3', 49 | 'key' => env('AWS_ACCESS_KEY_ID'), 50 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 51 | 'region' => env('AWS_DEFAULT_REGION'), 52 | 'bucket' => env('AWS_BUCKET'), 53 | 'url' => env('AWS_URL'), 54 | 'endpoint' => env('AWS_ENDPOINT'), 55 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 56 | 'throw' => false, 57 | ], 58 | 59 | ], 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Symbolic Links 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may configure the symbolic links that will be created when the 67 | | `storage:link` Artisan command is executed. The array keys should be 68 | | the locations of the links and the values should be their targets. 69 | | 70 | */ 71 | 72 | 'links' => [ 73 | public_path('storage') => storage_path('app/public'), 74 | ], 75 | 76 | ]; 77 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 12), 33 | 'verify' => true, 34 | ], 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Argon Options 39 | |-------------------------------------------------------------------------- 40 | | 41 | | Here you may specify the configuration options that should be used when 42 | | passwords are hashed using the Argon algorithm. These will allow you 43 | | to control the amount of time it takes to hash the given password. 44 | | 45 | */ 46 | 47 | 'argon' => [ 48 | 'memory' => 65536, 49 | 'threads' => 1, 50 | 'time' => 4, 51 | 'verify' => true, 52 | ], 53 | 54 | ]; 55 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Deprecations Log Channel 26 | |-------------------------------------------------------------------------- 27 | | 28 | | This option controls the log channel that should be used to log warnings 29 | | regarding deprecated PHP and library features. This allows you to get 30 | | your application ready for upcoming major versions of dependencies. 31 | | 32 | */ 33 | 34 | 'deprecations' => [ 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 36 | 'trace' => false, 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Log Channels 42 | |-------------------------------------------------------------------------- 43 | | 44 | | Here you may configure the log channels for your application. Out of 45 | | the box, Laravel uses the Monolog PHP logging library. This gives 46 | | you a variety of powerful log handlers / formatters to utilize. 47 | | 48 | | Available Drivers: "single", "daily", "slack", "syslog", 49 | | "errorlog", "monolog", 50 | | "custom", "stack" 51 | | 52 | */ 53 | 54 | 'channels' => [ 55 | 'stack' => [ 56 | 'driver' => 'stack', 57 | 'channels' => ['single'], 58 | 'ignore_exceptions' => false, 59 | ], 60 | 61 | 'single' => [ 62 | 'driver' => 'single', 63 | 'path' => storage_path('logs/laravel.log'), 64 | 'level' => env('LOG_LEVEL', 'debug'), 65 | 'replace_placeholders' => true, 66 | ], 67 | 68 | 'daily' => [ 69 | 'driver' => 'daily', 70 | 'path' => storage_path('logs/laravel.log'), 71 | 'level' => env('LOG_LEVEL', 'debug'), 72 | 'days' => 14, 73 | 'replace_placeholders' => true, 74 | ], 75 | 76 | 'slack' => [ 77 | 'driver' => 'slack', 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 79 | 'username' => 'Laravel Log', 80 | 'emoji' => ':boom:', 81 | 'level' => env('LOG_LEVEL', 'critical'), 82 | 'replace_placeholders' => true, 83 | ], 84 | 85 | 'papertrail' => [ 86 | 'driver' => 'monolog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 89 | 'handler_with' => [ 90 | 'host' => env('PAPERTRAIL_URL'), 91 | 'port' => env('PAPERTRAIL_PORT'), 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 93 | ], 94 | 'processors' => [PsrLogMessageProcessor::class], 95 | ], 96 | 97 | 'stderr' => [ 98 | 'driver' => 'monolog', 99 | 'level' => env('LOG_LEVEL', 'debug'), 100 | 'handler' => StreamHandler::class, 101 | 'formatter' => env('LOG_STDERR_FORMATTER'), 102 | 'with' => [ 103 | 'stream' => 'php://stderr', 104 | ], 105 | 'processors' => [PsrLogMessageProcessor::class], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | 'facility' => LOG_USER, 112 | 'replace_placeholders' => true, 113 | ], 114 | 115 | 'errorlog' => [ 116 | 'driver' => 'errorlog', 117 | 'level' => env('LOG_LEVEL', 'debug'), 118 | 'replace_placeholders' => true, 119 | ], 120 | 121 | 'null' => [ 122 | 'driver' => 'monolog', 123 | 'handler' => NullHandler::class, 124 | ], 125 | 126 | 'emergency' => [ 127 | 'path' => storage_path('logs/laravel.log'), 128 | ], 129 | ], 130 | 131 | ]; 132 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 32 | | "postmark", "log", "array", "failover", "roundrobin" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'url' => env('MAIL_URL'), 40 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 41 | 'port' => env('MAIL_PORT', 587), 42 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 43 | 'username' => env('MAIL_USERNAME'), 44 | 'password' => env('MAIL_PASSWORD'), 45 | 'timeout' => null, 46 | 'local_domain' => env('MAIL_EHLO_DOMAIN'), 47 | ], 48 | 49 | 'ses' => [ 50 | 'transport' => 'ses', 51 | ], 52 | 53 | 'postmark' => [ 54 | 'transport' => 'postmark', 55 | // 'message_stream_id' => null, 56 | // 'client' => [ 57 | // 'timeout' => 5, 58 | // ], 59 | ], 60 | 61 | 'mailgun' => [ 62 | 'transport' => 'mailgun', 63 | // 'client' => [ 64 | // 'timeout' => 5, 65 | // ], 66 | ], 67 | 68 | 'sendmail' => [ 69 | 'transport' => 'sendmail', 70 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 71 | ], 72 | 73 | 'log' => [ 74 | 'transport' => 'log', 75 | 'channel' => env('MAIL_LOG_CHANNEL'), 76 | ], 77 | 78 | 'array' => [ 79 | 'transport' => 'array', 80 | ], 81 | 82 | 'failover' => [ 83 | 'transport' => 'failover', 84 | 'mailers' => [ 85 | 'smtp', 86 | 'log', 87 | ], 88 | ], 89 | 90 | 'roundrobin' => [ 91 | 'transport' => 'roundrobin', 92 | 'mailers' => [ 93 | 'ses', 94 | 'postmark', 95 | ], 96 | ], 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Global "From" Address 102 | |-------------------------------------------------------------------------- 103 | | 104 | | You may wish for all e-mails sent by your application to be sent from 105 | | the same address. Here, you may specify a name and address that is 106 | | used globally for all e-mails that are sent by your application. 107 | | 108 | */ 109 | 110 | 'from' => [ 111 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 112 | 'name' => env('MAIL_FROM_NAME', 'Example'), 113 | ], 114 | 115 | /* 116 | |-------------------------------------------------------------------------- 117 | | Markdown Mail Settings 118 | |-------------------------------------------------------------------------- 119 | | 120 | | If you are using Markdown based email rendering, you may configure your 121 | | theme and component paths here, allowing you to customize the design 122 | | of the emails. Or, you may simply stick with the Laravel defaults! 123 | | 124 | */ 125 | 126 | 'markdown' => [ 127 | 'theme' => 'default', 128 | 129 | 'paths' => [ 130 | resource_path('views/vendor/mail'), 131 | ], 132 | ], 133 | 134 | ]; 135 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 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 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Job Batching 79 | |-------------------------------------------------------------------------- 80 | | 81 | | The following options configure the database and table that store job 82 | | batching information. These options can be updated to any database 83 | | connection and table which has been defined by your application. 84 | | 85 | */ 86 | 87 | 'batching' => [ 88 | 'database' => env('DB_CONNECTION', 'mysql'), 89 | 'table' => 'job_batches', 90 | ], 91 | 92 | /* 93 | |-------------------------------------------------------------------------- 94 | | Failed Queue Jobs 95 | |-------------------------------------------------------------------------- 96 | | 97 | | These options configure the behavior of failed queue job logging so you 98 | | can control which database and table are used to store the jobs that 99 | | have failed. You may change them to any database / table you wish. 100 | | 101 | */ 102 | 103 | 'failed' => [ 104 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 105 | 'database' => env('DB_CONNECTION', 'mysql'), 106 | 'table' => 'failed_jobs', 107 | ], 108 | 109 | ]; 110 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 19 | '%s%s', 20 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 21 | Sanctum::currentApplicationUrlWithPort() 22 | ))), 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Sanctum Guards 27 | |-------------------------------------------------------------------------- 28 | | 29 | | This array contains the authentication guards that will be checked when 30 | | Sanctum is trying to authenticate a request. If none of these guards 31 | | are able to authenticate the request, Sanctum will use the bearer 32 | | token that's present on an incoming request for authentication. 33 | | 34 | */ 35 | 36 | 'guard' => ['web'], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Expiration Minutes 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This value controls the number of minutes until an issued token will be 44 | | considered expired. This will override any values set in the token's 45 | | "expires_at" attribute, but first-party sessions are not affected. 46 | | 47 | */ 48 | 49 | 'expiration' => null, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Token Prefix 54 | |-------------------------------------------------------------------------- 55 | | 56 | | Sanctum can prefix new tokens in order to take advantage of numerous 57 | | security scanning initiatives maintained by open source platforms 58 | | that notify developers if they commit tokens into repositories. 59 | | 60 | | See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning 61 | | 62 | */ 63 | 64 | 'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''), 65 | 66 | /* 67 | |-------------------------------------------------------------------------- 68 | | Sanctum Middleware 69 | |-------------------------------------------------------------------------- 70 | | 71 | | When authenticating your first-party SPA with Sanctum you may need to 72 | | customize some of the middleware Sanctum uses while processing the 73 | | request. You may change the middleware listed below as required. 74 | | 75 | */ 76 | 77 | 'middleware' => [ 78 | 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class, 79 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 80 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 81 | ], 82 | 83 | ]; 84 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | 'scheme' => 'https', 22 | ], 23 | 24 | 'postmark' => [ 25 | 'token' => env('POSTMARK_TOKEN'), 26 | ], 27 | 28 | 'ses' => [ 29 | 'key' => env('AWS_ACCESS_KEY_ID'), 30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/trax-auth.php: -------------------------------------------------------------------------------- 1 | [ 6 | 'users' => true, 7 | ], 8 | 9 | 'user' => [ 10 | 'reset' => true, 11 | 'redirect' => [ 12 | 'after_authentication' => '/lrs/home', 13 | 'after_registration' => '/lrs/home', 14 | ] 15 | ], 16 | 17 | 'owners' => [ 18 | 'default' => [ 19 | 'user' => 'Default Store', 20 | 'role' => 'Default Store', 21 | 'entity' => 'Default Store', 22 | 'client' => 'Default Store', 23 | ] 24 | ] 25 | ]; 26 | -------------------------------------------------------------------------------- /config/trax-lrs.php: -------------------------------------------------------------------------------- 1 | '2.1', 5 | ]; 6 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('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' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class UserFactory extends Factory 13 | { 14 | /** 15 | * The current password being used by the factory. 16 | */ 17 | protected static ?string $password; 18 | 19 | /** 20 | * Define the model's default state. 21 | * 22 | * @return array 23 | */ 24 | public function definition(): array 25 | { 26 | return [ 27 | 'name' => fake()->name(), 28 | 'email' => fake()->unique()->safeEmail(), 29 | 'email_verified_at' => now(), 30 | 'password' => static::$password ??= Hash::make('password'), 31 | 'remember_token' => Str::random(10), 32 | ]; 33 | } 34 | 35 | /** 36 | * Indicate that the model's email address should be unverified. 37 | */ 38 | public function unverified(): static 39 | { 40 | return $this->state(fn (array $attributes) => [ 41 | 'email_verified_at' => null, 42 | ]); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | // \App\Models\User::factory()->create([ 18 | // 'name' => 'Test User', 19 | // 'email' => 'test@example.com', 20 | // ]); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.21.4", 14 | "bootstrap": "^4.6.2", 15 | "jquery": "^3.6.1", 16 | "laravel-mix": "^6.0.49", 17 | "lodash": "^4.17.21", 18 | "popper.js": "^1.12", 19 | "postcss": "^8.4.19", 20 | "resolve-url-loader": "^4.0.0", 21 | "sass": "^1.56.1", 22 | "sass-loader": "^8.0.0", 23 | "vue": "^2.7.14", 24 | "vue-loader": "^15.10.1", 25 | "vue-template-compiler": "^2.7.14" 26 | }, 27 | "dependencies": { 28 | "@vue/cli-plugin-babel": "^5.0.8", 29 | "es6-promise": "^4.2.8", 30 | "moment": "^2.29.4", 31 | "portal-vue": "^2.1.7", 32 | "vue-highlightjs": "^1.3.3", 33 | "vue-i18n": "^8.28.2", 34 | "vue-router": "^3.6.5", 35 | "vue2-transitions": "^0.3.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | tests/Unit 10 | 11 | 12 | tests/Feature 13 | 14 | 15 | 16 | 17 | app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/css/plugins/highlightjs.min.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#B6B18B}.hljs-variable,.hljs-template-variable,.hljs-tag,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-deletion{color:#EB3C54}.hljs-number,.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-type,.hljs-params,.hljs-meta,.hljs-link{color:#E7CE56}.hljs-attribute{color:#EE7C2B}.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#4FB4D7}.hljs-title,.hljs-section{color:#78BB65}.hljs-keyword,.hljs-selector-tag{color:#B45EA4}.hljs{display:block;overflow-x:auto;background:#1C1D21;color:#c0c5ce;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-brands-400-ie.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-brands-400-ie.eot -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-brands-400.eot -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-brands-400.ttf -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-brands-400.woff -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-brands-400.woff2 -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-regular-400-ie.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-regular-400-ie.eot -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-regular-400.eot -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-regular-400.ttf -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-regular-400.woff -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-regular-400.woff2 -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-solid-900-ie.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-solid-900-ie.eot -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-solid-900.eot -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-solid-900.ttf -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-solid-900.woff -------------------------------------------------------------------------------- /public/fonts/FontAwesome/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/FontAwesome/fa-solid-900.woff2 -------------------------------------------------------------------------------- /public/fonts/Nucleo/nucleo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Nucleo/nucleo.eot -------------------------------------------------------------------------------- /public/fonts/Nucleo/nucleo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Nucleo/nucleo.ttf -------------------------------------------------------------------------------- /public/fonts/Nucleo/nucleo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Nucleo/nucleo.woff -------------------------------------------------------------------------------- /public/fonts/Nucleo/nucleo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Nucleo/nucleo.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLDD4Z1JlFc-K.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLDD4Z1JlFc-K.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLDz8Z1JlFc-K.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLDz8Z1JlFc-K.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLFj_Z1JlFc-K.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLFj_Z1JlFc-K.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiByp8kv8JHgFVrLFj_Z1xlFQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiByp8kv8JHgFVrLFj_Z1xlFQ.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiEyp8kv8JHgFVrJJfecg.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiEyp8kv8JHgFVrJJfecg.woff2 -------------------------------------------------------------------------------- /public/fonts/Poppins/pxiEyp8kv8JHgFVrJJnecmNE.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/fonts/Poppins/pxiEyp8kv8JHgFVrJJnecmNE.woff2 -------------------------------------------------------------------------------- /public/fonts/nucleo-icons.css: -------------------------------------------------------------------------------- 1 | /*-------------------------------- 2 | 3 | Nucleo Web Font 4 | Generated using nucleoapp.com 5 | 6 | -------------------------------- */ 7 | @font-face { 8 | font-family: 'Nucleo'; 9 | src: url('../fonts/Nucleo/nucleo.eot'); 10 | src: url('../fonts/Nucleo/nucleo.eot') format('embedded-opentype'), url('../fonts/Nucleo/nucleo.woff2') format('woff2'), url('../fonts/Nucleo/nucleo.woff') format('woff'), url('../fonts/Nucleo/nucleo.ttf') format('truetype'); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | /*------------------------ 15 | base class definition 16 | -------------------------*/ 17 | .tim-icons { 18 | display: inline-block; 19 | font: normal normal normal 1em/1 'Nucleo'; 20 | speak: none; 21 | text-transform: none; 22 | /* Better Font Rendering */ 23 | -webkit-font-smoothing: antialiased; 24 | -moz-osx-font-smoothing: grayscale; 25 | } 26 | /*------------------------ 27 | change icon size 28 | -------------------------*/ 29 | /* relative units */ 30 | .tim-icons-sm { 31 | font-size: 0.8em; 32 | } 33 | .tim-icons-lg { 34 | font-size: 1.2em; 35 | } 36 | /* absolute units */ 37 | .tim-icons-16 { 38 | font-size: 16px; 39 | } 40 | .tim-icons-32 { 41 | font-size: 32px; 42 | } 43 | /*---------------------------------- 44 | add a square/circle background 45 | -----------------------------------*/ 46 | .tim-icons-bg-square, 47 | .tim-icons-bg-circle { 48 | padding: 0.35em; 49 | background-color: #eee; 50 | } 51 | .tim-icons-bg-circle { 52 | border-radius: 50%; 53 | } 54 | /*------------------------------------ 55 | use icons as list item markers 56 | -------------------------------------*/ 57 | .tim-icons-ul { 58 | padding-left: 0; 59 | list-style-type: none; 60 | } 61 | .tim-icons-ul > li { 62 | display: flex; 63 | align-items: flex-start; 64 | line-height: 1.4; 65 | } 66 | .tim-icons-ul > li > .tim-icons { 67 | margin-right: 0.4em; 68 | line-height: inherit; 69 | } 70 | /*------------------------ 71 | spinning icons 72 | -------------------------*/ 73 | .tim-icons-is-spinning { 74 | -webkit-animation: tim-icons-spin 2s infinite linear; 75 | -moz-animation: tim-icons-spin 2s infinite linear; 76 | animation: tim-icons-spin 2s infinite linear; 77 | } 78 | @-webkit-keyframes tim-icons-spin { 79 | 0% { 80 | -webkit-transform: rotate(0deg); 81 | } 82 | 100% { 83 | -webkit-transform: rotate(360deg); 84 | } 85 | } 86 | @-moz-keyframes tim-icons-spin { 87 | 0% { 88 | -moz-transform: rotate(0deg); 89 | } 90 | 100% { 91 | -moz-transform: rotate(360deg); 92 | } 93 | } 94 | @keyframes tim-icons-spin { 95 | 0% { 96 | -webkit-transform: rotate(0deg); 97 | -moz-transform: rotate(0deg); 98 | -ms-transform: rotate(0deg); 99 | -o-transform: rotate(0deg); 100 | transform: rotate(0deg); 101 | } 102 | 100% { 103 | -webkit-transform: rotate(360deg); 104 | -moz-transform: rotate(360deg); 105 | -ms-transform: rotate(360deg); 106 | -o-transform: rotate(360deg); 107 | transform: rotate(360deg); 108 | } 109 | } 110 | /*------------------------ 111 | rotated/flipped icons 112 | -------------------------*/ 113 | .tim-icons-rotate-90 { 114 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); 115 | -webkit-transform: rotate(90deg); 116 | -moz-transform: rotate(90deg); 117 | -ms-transform: rotate(90deg); 118 | -o-transform: rotate(90deg); 119 | transform: rotate(90deg); 120 | } 121 | .tim-icons-rotate-180 { 122 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); 123 | -webkit-transform: rotate(180deg); 124 | -moz-transform: rotate(180deg); 125 | -ms-transform: rotate(180deg); 126 | -o-transform: rotate(180deg); 127 | transform: rotate(180deg); 128 | } 129 | .tim-icons-rotate-270 { 130 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); 131 | -webkit-transform: rotate(270deg); 132 | -moz-transform: rotate(270deg); 133 | -ms-transform: rotate(270deg); 134 | -o-transform: rotate(270deg); 135 | transform: rotate(270deg); 136 | } 137 | .tim-icons-flip-y { 138 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0); 139 | -webkit-transform: scale(-1, 1); 140 | -moz-transform: scale(-1, 1); 141 | -ms-transform: scale(-1, 1); 142 | -o-transform: scale(-1, 1); 143 | transform: scale(-1, 1); 144 | } 145 | .tim-icons-flip-x { 146 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); 147 | -webkit-transform: scale(1, -1); 148 | -moz-transform: scale(1, -1); 149 | -ms-transform: scale(1, -1); 150 | -o-transform: scale(1, -1); 151 | transform: scale(1, -1); 152 | } 153 | /*------------------------ 154 | icons 155 | -------------------------*/ 156 | 157 | .icon-multiple-19::before { 158 | content: "\ea03"; 159 | } 160 | 161 | .icon-single-02::before { 162 | content: "\ea06"; 163 | } 164 | 165 | .icon-support::before { 166 | content: "\ea07"; 167 | } 168 | 169 | .icon-search::before { 170 | content: "\ea09"; 171 | } 172 | 173 | .icon-access-key::before { 174 | content: "\ea0a"; 175 | } 176 | 177 | .icon-button-power::before { 178 | content: "\ea0b"; 179 | } 180 | 181 | .icon-plug-2::before { 182 | content: "\ea0c"; 183 | } 184 | 185 | .icon-app::before { 186 | content: "\ea0d"; 187 | } 188 | 189 | .icon-pencil::before { 190 | content: "\ea0f"; 191 | } 192 | 193 | .icon-code::before { 194 | content: "\ea10"; 195 | } 196 | 197 | .icon-heart::before { 198 | content: "\ea11"; 199 | } 200 | 201 | .icon-move-right::before { 202 | content: "\ea13"; 203 | } 204 | 205 | .icon-check-single::before { 206 | content: "\ea1b"; 207 | } 208 | 209 | .icon-c-info::before { 210 | content: "\ea1c"; 211 | } 212 | 213 | .icon-up-arrow::before { 214 | content: "\ea1d"; 215 | } 216 | 217 | .icon-settings::before { 218 | content: "\ea1e"; 219 | } 220 | 221 | .icon-align-center::before { 222 | content: "\ea1f"; 223 | } 224 | 225 | .icon-bullet-list-67::before { 226 | content: "\ea20"; 227 | } 228 | 229 | .icon-simple-remove::before { 230 | content: "\ea48"; 231 | } 232 | 233 | .icon-double-left::before { 234 | content: "\ea4a"; 235 | } 236 | 237 | .icon-double-right::before { 238 | content: "\ea4b"; 239 | } 240 | 241 | .icon-database::before { 242 | content: "\ea4c"; 243 | } 244 | 245 | .icon-minimal-down::before { 246 | content: "\ea4d"; 247 | } 248 | 249 | .icon-e-add::before { 250 | content: "\ea4e"; 251 | } 252 | 253 | .icon-t-warning::before { 254 | content: "\ea4f"; 255 | } 256 | 257 | .icon-quote::before { 258 | content: "\ea50"; 259 | } 260 | 261 | .icon-badge-13::before { 262 | content: "\ea51"; 263 | } 264 | 265 | .icon-mail::before { 266 | content: "\ea52"; 267 | } 268 | 269 | .icon-book-39::before { 270 | content: "\ea56"; 271 | } 272 | 273 | .icon-drag-31::before { 274 | content: "\ea57"; 275 | } 276 | 277 | .icon-media-player::before { 278 | content: "\ea58"; 279 | } 280 | 281 | .icon-line-chart::before { 282 | content: "\ea59"; 283 | } 284 | 285 | .icon-book-bookmark::before { 286 | content: "\ea5a"; 287 | } 288 | -------------------------------------------------------------------------------- /public/fonts/poppins-font.css: -------------------------------------------------------------------------------- 1 | /* latin-ext */ 2 | @font-face { 3 | font-family: 'Poppins'; 4 | font-style: normal; 5 | font-weight: 200; 6 | src: local('Poppins ExtraLight'), local('Poppins-ExtraLight'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLFj_Z1JlFc-K.woff2) format('woff2'); 7 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 8 | } 9 | /* latin */ 10 | @font-face { 11 | font-family: 'Poppins'; 12 | font-style: normal; 13 | font-weight: 200; 14 | src: local('Poppins ExtraLight'), local('Poppins-ExtraLight'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLFj_Z1xlFQ.woff2) format('woff2'); 15 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 16 | } 17 | /* latin-ext */ 18 | @font-face { 19 | font-family: 'Poppins'; 20 | font-style: normal; 21 | font-weight: 300; 22 | src: local('Poppins Light'), local('Poppins-Light'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLDz8Z1JlFc-K.woff2) format('woff2'); 23 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 24 | } 25 | /* latin */ 26 | @font-face { 27 | font-family: 'Poppins'; 28 | font-style: normal; 29 | font-weight: 300; 30 | src: local('Poppins Light'), local('Poppins-Light'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2) format('woff2'); 31 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 32 | } 33 | /* latin-ext */ 34 | @font-face { 35 | font-family: 'Poppins'; 36 | font-style: normal; 37 | font-weight: 400; 38 | src: local('Poppins Regular'), local('Poppins-Regular'), url(../fonts/Poppins/pxiEyp8kv8JHgFVrJJnecmNE.woff2) format('woff2'); 39 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 40 | } 41 | /* latin */ 42 | @font-face { 43 | font-family: 'Poppins'; 44 | font-style: normal; 45 | font-weight: 400; 46 | src: local('Poppins Regular'), local('Poppins-Regular'), url(../fonts/Poppins/pxiEyp8kv8JHgFVrJJfecg.woff2) format('woff2'); 47 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 48 | } 49 | /* latin-ext */ 50 | @font-face { 51 | font-family: 'Poppins'; 52 | font-style: normal; 53 | font-weight: 600; 54 | src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2) format('woff2'); 55 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 56 | } 57 | /* latin */ 58 | @font-face { 59 | font-family: 'Poppins'; 60 | font-style: normal; 61 | font-weight: 600; 62 | src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2) format('woff2'); 63 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 64 | } 65 | /* latin-ext */ 66 | @font-face { 67 | font-family: 'Poppins'; 68 | font-style: normal; 69 | font-weight: 700; 70 | src: local('Poppins Bold'), local('Poppins-Bold'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2) format('woff2'); 71 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 72 | } 73 | /* latin */ 74 | @font-face { 75 | font-family: 'Poppins'; 76 | font-style: normal; 77 | font-weight: 700; 78 | src: local('Poppins Bold'), local('Poppins-Bold'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2) format('woff2'); 79 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 80 | } 81 | /* latin-ext */ 82 | @font-face { 83 | font-family: 'Poppins'; 84 | font-style: normal; 85 | font-weight: 800; 86 | src: local('Poppins ExtraBold'), local('Poppins-ExtraBold'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLDD4Z1JlFc-K.woff2) format('woff2'); 87 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 88 | } 89 | /* latin */ 90 | @font-face { 91 | font-family: 'Poppins'; 92 | font-style: normal; 93 | font-weight: 800; 94 | src: local('Poppins ExtraBold'), local('Poppins-ExtraBold'), url(../fonts/Poppins/pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2) format('woff2'); 95 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 96 | } 97 | -------------------------------------------------------------------------------- /public/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/img/apple-icon.png -------------------------------------------------------------------------------- /public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/public/img/favicon.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Request::capture() 53 | )->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/lrs.js": "/js/lrs.js?id=181073230d4fb202231f3f57def3b213", 3 | "/css/lrs.css": "/css/lrs.css?id=927c6218e7ec69f1c7e2c4f6266c5c8b" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trax-project/trax2-starter-lrs/509db06e1c1d11864378d812a5d22b208c15f2ae/resources/css/app.css -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | window.baseURL = document.head.querySelector('meta[name="base-url"]').content; 27 | window.appEnv = document.head.querySelector('meta[name="app-env"]').content; 28 | window.appVersion = document.head.querySelector('meta[name="app-version"]').content; 29 | window.axios.defaults.baseURL = window.baseURL; 30 | 31 | /** 32 | * Echo exposes an expressive API for subscribing to channels and listening 33 | * for events that are broadcast by Laravel. Echo and event broadcasting 34 | * allows your team to easily build robust real-time web applications. 35 | */ 36 | 37 | // import Echo from 'laravel-echo'; 38 | 39 | // window.Pusher = require('pusher-js'); 40 | 41 | // window.Echo = new Echo({ 42 | // broadcaster: 'pusher', 43 | // key: process.env.MIX_PUSHER_APP_KEY, 44 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 45 | // forceTLS: true 46 | // }); 47 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | */ -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | */ -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | */ -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
7 | 8 | 9 | 22 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/Auth/LoginCard.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 88 | 89 | 101 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/Auth/LogoutButton.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 35 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/BackToTop.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 29 | 30 | 56 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/Inputs/BaseInput.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 139 | 140 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/Modal.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 91 | 92 | 212 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/ModalConfirm.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 57 | 58 | 90 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/SidebarPlugin/SideBar.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 87 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/SidebarPlugin/index.js: -------------------------------------------------------------------------------- 1 | import Sidebar from "./SideBar.vue"; 2 | import SidebarLink from "@tim/black/src/components/SidebarPlugin/SidebarLink.vue"; 3 | 4 | const SidebarStore = { 5 | showSidebar: false, 6 | sidebarLinks: [], 7 | displaySidebar(value) { 8 | this.showSidebar = value; 9 | } 10 | }; 11 | 12 | const SidebarPlugin = { 13 | install(Vue) { 14 | let app = new Vue({ 15 | data: { 16 | sidebarStore: SidebarStore 17 | } 18 | }); 19 | 20 | Vue.prototype.$sidebar = app.sidebarStore; 21 | Vue.component("side-bar", Sidebar); 22 | Vue.component("sidebar-link", SidebarLink); 23 | } 24 | }; 25 | 26 | export default SidebarPlugin; 27 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/components/TopbarPlugin/index.js: -------------------------------------------------------------------------------- 1 | import ToggleState from '@trax/classes/ToggleState' 2 | 3 | export default { 4 | 5 | install(Vue) { 6 | let app = new Vue({ 7 | data: { 8 | topbarState: new ToggleState() 9 | } 10 | }); 11 | Vue.prototype.$topbar = app.topbarState; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/contents/Brand.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 29 | 30 | 41 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/contents/BrandFooter.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 26 | 27 | 34 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/contents/help/HelpFilters.vue: -------------------------------------------------------------------------------- 1 | 226 | 227 | 231 | 232 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/i18n.js: -------------------------------------------------------------------------------- 1 | import I18nFactory from '@trax/classes/I18nFactory' 2 | const appLocales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i) 3 | const libLocales = require.context('@trax/locales', true, /[A-Za-z0-9-_,\s]+\.json$/i) 4 | const i18n = I18nFactory.make(appLocales, libLocales) 5 | 6 | export default i18n 7 | 8 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/FullPageLayout.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/SideMenuLayout.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 34 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/parts/Centered.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 38 | 39 | 47 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/parts/Content.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/parts/ContentFooter.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/parts/SideMenu.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 19 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/layout/parts/TopNavbar.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 97 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/locales/en.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/main.js: -------------------------------------------------------------------------------- 1 | // Vendor plugins. 2 | Vue.use(require('vue-highlightjs')) 3 | Vue.use(require('portal-vue').default) 4 | 5 | // Local plugins. 6 | Vue.use(require('@trax/plugins/Auth').default) // $auth 7 | Vue.use(require('./components/TopbarPlugin').default); // $topbar 8 | Vue.use(require('./components/SidebarPlugin').default); // $sidebar 9 | Vue.use(require('@trax/plugins/XapiClient').default); // $xapi 10 | 11 | // Global vars. 12 | Vue.prototype.$baseURL = window.baseURL 13 | Vue.prototype.$appEnv = window.appEnv 14 | Vue.prototype.$appVersion = window.appVersion 15 | 16 | // Vue instance. 17 | import routing from './routing' 18 | import i18n from './i18n' 19 | import App from './App.vue' 20 | 21 | new Vue({ 22 | router: routing.router(), 23 | i18n, 24 | render: h => h(App) 25 | }).$mount("#app") 26 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/ClientsPage.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/ErrorPage.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 37 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/LoginPage.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/MaintenancePage.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 37 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/NotFoundPage.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 31 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/SettingsPage.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/StatementsPage.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 22 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/UnauthorizedPage.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 31 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/clients/ClientForm.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 56 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/clients/ClientInfo.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 47 | 48 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/clients/ClientsCrud.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 141 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/settings/ClearAll.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 69 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/statements/StatementViewer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | 20 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/pages/statements/StatementsSearch.vue: -------------------------------------------------------------------------------- 1 | 116 | 117 | 150 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/app/routing.js: -------------------------------------------------------------------------------- 1 | import RouterFactory from '@trax/classes/RouterFactory' 2 | 3 | // Layout. 4 | import FullPageLayout from './layout/FullPageLayout.vue'; 5 | import SideMenuLayout from './layout/SideMenuLayout.vue'; 6 | 7 | // Views. 8 | import LoginPage from './pages/LoginPage.vue'; 9 | import StatementsPage from './pages/StatementsPage.vue'; 10 | import ClientsPage from './pages/ClientsPage.vue'; 11 | import SettingsPage from './pages/SettingsPage.vue'; 12 | import NotFoundPage from './pages/NotFoundPage.vue'; 13 | import MaintenancePage from './pages/MaintenancePage.vue'; 14 | import ErrorPage from './pages/ErrorPage.vue'; 15 | 16 | 17 | function getRoutes(auth) { 18 | return [ 19 | { 20 | path: "/lrs", 21 | redirect: "/lrs/login", 22 | component: FullPageLayout, 23 | children: [ 24 | { 25 | path: "login", 26 | name: "login", 27 | beforeEnter: auth.ifNotAuthenticated, 28 | component: LoginPage 29 | }, 30 | ] 31 | }, 32 | { 33 | path: "/lrs", 34 | component: SideMenuLayout, 35 | children: [ 36 | { 37 | path: "home", 38 | name: "home", 39 | beforeEnter: auth.ifAuthenticated, 40 | component: StatementsPage 41 | }, 42 | { 43 | path: "clients", 44 | name: "clients", 45 | beforeEnter: auth.ifAuthenticated, 46 | component: ClientsPage 47 | }, 48 | { 49 | path: "settings", 50 | name: "settings", 51 | beforeEnter: auth.ifAuthenticated, 52 | component: SettingsPage 53 | }, 54 | ] 55 | }, 56 | { 57 | path: "/lrs", 58 | component: FullPageLayout, 59 | children: [ 60 | { 61 | path: "maintenance", 62 | name: "maintenance", 63 | component: MaintenancePage, 64 | }, 65 | { 66 | path: "error", 67 | name: "error", 68 | component: ErrorPage, 69 | }, 70 | { 71 | path: "*", 72 | name: "unknown", 73 | component: NotFoundPage 74 | }, 75 | ] 76 | }, 77 | ] 78 | } 79 | 80 | export default { 81 | 82 | routes() { 83 | return getRoutes(Vue.prototype.$auth) 84 | }, 85 | 86 | router() { 87 | return RouterFactory.make(this.routes()) 88 | }, 89 | } 90 | 91 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/js/lib.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 4 | install(Vue) { 5 | 6 | // FROM BLACK DASHBOARD. 7 | 8 | // Plugins. 9 | Vue.use(require('@tim/black/src/components/NotificationPlugin').default); 10 | 11 | // Directives. 12 | Vue.directive('click-outside', require('@tim/black/src/directives/click-ouside.js').default); 13 | 14 | // Components. 15 | Vue.component('base-alert', require('@tim/black/src/components/BaseAlert.vue').default); 16 | Vue.component('base-button', require('@tim/black/src/components/BaseButton.vue').default); 17 | Vue.component('card', require('@tim/black/src/components/Cards/Card.vue').default); 18 | Vue.component('base-dropdown', require('@tim/black/src/components/BaseDropdown.vue').default); 19 | Vue.component('base-checkbox', require('@tim/black/src/components/BaseCheckbox.vue').default); 20 | Vue.component('base-radio', require('@tim/black/src/components/BaseRadio.vue').default); 21 | Vue.component('base-table', require('@tim/black/src/components/BaseTable.vue').default); 22 | 23 | 24 | // LOCAL COMPONENTS. 25 | 26 | // Base components. 27 | Vue.component('base-input', require('./app/components/Inputs/BaseInput.vue').default); 28 | Vue.component('modal', require('./app/components/Modal.vue').default); 29 | Vue.component('modal-confirm', require('./app/components/ModalConfirm.vue').default); 30 | Vue.component('back-to-top', require('./app/components/BackToTop.vue').default); 31 | 32 | // Content components. 33 | Vue.component('brand', require('./app/contents/Brand.vue').default); 34 | Vue.component('brand-footer', require('./app/contents/BrandFooter.vue').default); 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | @import '@tim/black/src/assets/sass/black-dashboard'; 2 | 3 | @import 'custom'; 4 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/sass/custom.scss: -------------------------------------------------------------------------------- 1 | // Navbar 2 | 3 | // Ensure a min height for right icons. 4 | .navbar-nav { 5 | min-height: 46px; 6 | } 7 | // Anim on topbar icons. 8 | .navbar-transparent .navbar-nav .nav-item i { 9 | transition: all 0.3s; 10 | } 11 | .navbar-transparent .navbar-nav .nav-item i:hover { 12 | color: #e14eca; 13 | } 14 | // Hover effect on right menu. 15 | .navbar.bg-white .navbar-nav a.nav-link:hover, 16 | .navbar.bg-white .navbar-nav a.nav-link:hover p { 17 | font-weight: 400; 18 | } 19 | // More top space on right menu. 20 | .navbar.bg-white .navbar-nav { 21 | margin-top: 10px; 22 | } 23 | 24 | 25 | // Sidebar 26 | 27 | // Page top border. 28 | .main-panel { 29 | border-top: 2px solid #0098f0; 30 | } 31 | // Sidebar background. 32 | .off-canvas-sidebar[data=green], .sidebar[data=green] { 33 | background: #0098f0; 34 | background: -webkit-gradient(linear,left bottom,left top,from(#00f2c3),to(#0098f0)); 35 | background: linear-gradient(0deg,#00f2c3,#0098f0); 36 | } 37 | // Logo and product title. 38 | .sidebar .logo { 39 | padding-left: 1.5rem; 40 | } 41 | .sidebar .logo-mini { 42 | margin-left: 0 !important; 43 | } 44 | .sidebar .logo a.logo-mini .logo-img img, 45 | .off-canvas-sidebar .logo a.logo-mini .logo-img img { 46 | max-width: 100%; 47 | } 48 | .sidebar .logo-normal { 49 | font-size: 1.1rem !important; 50 | } 51 | 52 | 53 | // Modals 54 | 55 | .modal-backdrop.show { 56 | opacity: 1; 57 | } 58 | .modal label { 59 | font-size: 0.75rem; 60 | margin-bottom: 5px; 61 | } 62 | 63 | 64 | // Tables 65 | 66 | .table-hover tbody tr:hover { 67 | background-color: rgba(34, 42, 66, .075); 68 | background-color: rgba(255, 255, 255, .04); 69 | } 70 | table small { 71 | letter-spacing: 0.05em; 72 | color: #bbb; 73 | font-size: 0.75rem; 74 | } 75 | table small.spaced { 76 | letter-spacing: 0.1em; 77 | } 78 | table button .tim-icons { 79 | font-size: 1.2rem !important; 80 | font-weight: 400; 81 | } 82 | 83 | 84 | // Forms 85 | 86 | form h2 { 87 | font-size: 1rem; 88 | text-transform: uppercase; 89 | margin-bottom: 20px; 90 | margin-top: 25px; 91 | } 92 | form label { 93 | color: hsla(0,0%,100%,.6); 94 | } 95 | 96 | // Select 97 | 98 | .select-primary.el-select .el-input input { 99 | color: rgba(255, 255, 255, 0.8); 100 | } 101 | 102 | 103 | // Cards 104 | 105 | .card .card-body { 106 | font-size: 0.9rem; 107 | } 108 | .card.spaced .card-body { 109 | padding: 20px 30px 30px 30px; 110 | } 111 | .card.spaced .card-body h2 { 112 | margin-top: 10px; 113 | } 114 | 115 | 116 | // Colors 117 | 118 | .text-info-light { 119 | color: #62b1ff; 120 | } 121 | 122 | 123 | // Typography 124 | 125 | .typo h1 { 126 | text-transform: uppercase; 127 | margin: 0 0 20px 0; 128 | font-size: 2rem; 129 | color: #fff; 130 | } 131 | .typo h2 { 132 | text-transform: uppercase; 133 | margin: 30px 0 15px 0; 134 | font-size: 1.2rem; 135 | } 136 | .typo p, .typo li, .typo td { 137 | letter-spacing: 0.03em; 138 | } 139 | .typo p { 140 | color: rgba(255, 255, 255, 0.5) !important; 141 | line-height: 1.8; 142 | margin-bottom: 1.5rem; 143 | } 144 | .typo li { 145 | color: rgba(255, 255, 255, 0.5); 146 | line-height: 1.8; 147 | margin-bottom: 2rem; 148 | font-weight: 300; 149 | } 150 | .typo strong { 151 | color: rgba(255, 255, 255, 0.9); 152 | font-weight: 500; 153 | } 154 | .typo ol { 155 | counter-reset: olcount; 156 | padding-left: 0; 157 | } 158 | .typo ul { 159 | padding-left: 0; 160 | } 161 | .typo ol li { 162 | list-style-type: none; 163 | counter-increment: olcount; 164 | } 165 | .typo ul li { 166 | list-style-type: none; 167 | } 168 | .typo ol li:before { 169 | content: counter(olcount)"."; 170 | margin-right: 10px; 171 | color: #ff8d72; 172 | } 173 | .typo ul li:before { 174 | content: "•"; 175 | margin-right: 10px; 176 | color: #ff8d72; 177 | } 178 | .typo .table td { 179 | font-weight: 300; 180 | } 181 | .typo pre { 182 | font-size: 0.9rem; 183 | display: inline; 184 | background-color: #525f7f; 185 | padding: 0.1rem 0.3rem; 186 | margin: 0 0.1rem; 187 | } 188 | 189 | // Issue on active nav links. 190 | 191 | a.nav-link, .nav-link:focus { 192 | color: #525f7f; 193 | } 194 | .nav-link:hover { 195 | color: #e14eca !important; 196 | } 197 | -------------------------------------------------------------------------------- /services/trax/lrs/resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | TRAX LRS• The Progressive LRS 28 | 29 | 30 | 31 | 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /services/trax/lrs/routes/routes.php: -------------------------------------------------------------------------------- 1 | where('any', '.*')->middleware('web'); 8 | 9 | TraxRouting::userCrudRoutes('trax/api', 'basic-clients', BasicClientController::class); 10 | -------------------------------------------------------------------------------- /services/trax/lrs/src/BasicClients/BasicClientController.php: -------------------------------------------------------------------------------- 1 | repository = $service; 38 | } 39 | 40 | /** 41 | * Get the validation rules. 42 | * 43 | * @param \Illuminate\Http\Request $request; 44 | * @return array 45 | */ 46 | protected function validationRules(Request $request) 47 | { 48 | return [ 49 | 'id' => 'nullable|integer', 50 | 'name' => 'required|string', 51 | 'access.id' => 'nullable|integer', 52 | 'access.credentials.username' => 'required|alpha_dash', 53 | 'access.credentials.password' => 'required|regex:/^\S*$/u', 54 | ]; 55 | } 56 | 57 | /** 58 | * Hook before any request. 59 | * 60 | * @param \Trax\Repo\CrudRequest $crudRequest 61 | * @param \Illuminate\Http\Request $request 62 | * @return void 63 | */ 64 | protected function beforeRequest(CrudRequest $crudRequest, Request $request) 65 | { 66 | $crudRequest->addParam('accessors', ['accesses']); 67 | } 68 | 69 | /** 70 | * Hook before a store request. 71 | * 72 | * @param \Trax\Repo\CrudRequest $crudRequest 73 | * @param \Illuminate\Http\Request $request 74 | * @return void 75 | */ 76 | protected function beforeStore(CrudRequest $crudRequest, Request $request) 77 | { 78 | $crudRequest->setContentField('permissions', ['xapi-scope.all']); 79 | $this->checkOwner($crudRequest); 80 | } 81 | 82 | /** 83 | * Hook to change the response model. 84 | * 85 | * @param \Illuminate\Database\Eloquent\Model $model 86 | * @return mixed 87 | */ 88 | protected function responseModel($model) 89 | { 90 | $model->access = $model->accesses->first(); 91 | $model->access->credentials->setVisible(['password', 'username']); 92 | $model->access->setVisible(['id', 'uuid', 'credentials']); 93 | return $model->setVisible(['id', 'name', 'access']); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /services/trax/lrs/src/BasicClients/BasicClientService.php: -------------------------------------------------------------------------------- 1 | accesses = $accesses; 29 | } 30 | 31 | /** 32 | * Create a new resource. 33 | * 34 | * @param array $data 35 | * @return \Illuminate\Database\Eloquent\Model 36 | */ 37 | public function create(array $data) 38 | { 39 | return DB::transaction(function () use ($data) { 40 | 41 | $client = parent::create($data); 42 | 43 | $data = $data['access']; 44 | $data['client_id'] = $client->id; 45 | $data['type'] = 'basic_http'; 46 | $data['name'] = $client->name; 47 | $data['cors'] = '*'; 48 | $this->accesses->create($data); 49 | 50 | return $client; 51 | }); 52 | } 53 | 54 | /** 55 | * Update an existing resource, given its model and new data. 56 | * 57 | * @param \Illuminate\Database\Eloquent\Model $model 58 | * @param array $data 59 | * @return \Illuminate\Database\Eloquent\Model 60 | */ 61 | public function updateModel($model, array $data = null) 62 | { 63 | return DB::transaction(function () use ($model, $data) { 64 | 65 | $client = parent::updateModel($model, $data); 66 | 67 | $data = $data['access']; 68 | $data['name'] = $client->name; 69 | $this->accesses->update($data['id'], $data); 70 | 71 | return $client; 72 | }); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /services/trax/lrs/src/Console/AdminCommand.php: -------------------------------------------------------------------------------- 1 | users = $users; 30 | } 31 | 32 | /** 33 | * Get a user given its ID. 34 | * 35 | * @param int $id 36 | * @return \Trax\Auth\Stores\Users\User|false 37 | */ 38 | protected function getUser(int $id) 39 | { 40 | try { 41 | $user = $this->users->findOrFail($id); 42 | } catch (\Exception $e) { 43 | $this->error("There is no admin account with this id [$id]."); 44 | $this->info(''); 45 | return false; 46 | } 47 | return $user; 48 | } 49 | 50 | /** 51 | * Prompt the user password. 52 | * 53 | * @param bool $required 54 | * @return string 55 | */ 56 | protected function askUserPassword(bool $required = false) 57 | { 58 | $default = $required ? Password::random() : ''; 59 | while (1) { 60 | $password = $this->ask('Password', $default); 61 | if (!$required && empty($password)) { 62 | break; 63 | } 64 | if (Password::validate($password)) { 65 | break; 66 | } 67 | $this->error('This password does not comply with the password security rules.'); 68 | $this->info(Password::notice($password)); 69 | } 70 | return $password; 71 | } 72 | 73 | /** 74 | * Prompt the user choice. 75 | * 76 | * @param bool $allOption 77 | * @return int|string|false User ID | 'all' | false 78 | */ 79 | protected function chooseUser(bool $allOption = false) 80 | { 81 | $users = $this->users->addFilter(['admin' => 1, 'owner_id' => null])->all() 82 | ->pluck('username', 'id')->toArray(); 83 | 84 | if (empty($users)) { 85 | $this->warn("There is currently no admin account defined. 86 | You should define one with 'php artisan admin:create'."); 87 | $this->info(''); 88 | return false; 89 | } 90 | 91 | if ($allOption) { 92 | $users['a'] = 'All users'; 93 | } 94 | $users['x'] = 'Cancel'; 95 | 96 | $id = $this->choice("Choose an admin account", $users); 97 | 98 | switch ($id) { 99 | case 'a': 100 | return 'a'; 101 | case 'x': 102 | return false; 103 | default: 104 | return intval($id); 105 | } 106 | } 107 | 108 | /** 109 | * Display a list of users. 110 | * 111 | * @param \Illuminate\Support\Collection $users 112 | * @return void 113 | */ 114 | protected function displayUsers(Collection $users): void 115 | { 116 | $headers = [ 117 | 'ID', 118 | 'Email', 119 | ]; 120 | 121 | $data = $users->map(function (User $user) { 122 | return [ 123 | $user->id, 124 | $user->email, 125 | ]; 126 | }); 127 | 128 | if ($data->isEmpty()) { 129 | $this->info("There is currently no admin account defined. 130 | You should define one with 'php artisan admin:create'."); 131 | } else { 132 | $this->table($headers, $data); 133 | } 134 | $this->info(''); 135 | } 136 | 137 | /** 138 | * Display a user. 139 | * 140 | * @param \Trax\Auth\Stores\Users\User $user 141 | * @return void 142 | */ 143 | protected function displayUser(User $user): void 144 | { 145 | $this->displayUsers(collect([$user])); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /services/trax/lrs/src/Console/CreateAdminCommand.php: -------------------------------------------------------------------------------- 1 | ask('Email', 'admin@traxlrs.com'); 29 | $data = [ 30 | 'email' => $email, 31 | 'username' => $email, 32 | 'firstname' => 'Unknown', 33 | 'lastname' => 'Unknown', 34 | 'password' => $this->askUserPassword(true), 35 | 'admin' => true, 36 | ]; 37 | 38 | try { 39 | $user = $this->users->create($data); 40 | } catch (\Exception $e) { 41 | return $this->error($e->getMessage()); 42 | } 43 | 44 | $this->line('Admin account created.'); 45 | 46 | if ($this->option('list')) { 47 | $users = $this->users->addFilter(['admin' => 1, 'owner_id' => null])->all(); 48 | $this->displayUsers($users); 49 | } else { 50 | $this->displayUser($user); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /services/trax/lrs/src/Console/DeleteAdminCommand.php: -------------------------------------------------------------------------------- 1 | argument('id')) { 29 | if (!$id = $this->chooseUser()) { 30 | return; 31 | } 32 | } 33 | 34 | if (!$user = $this->getUser($id)) { 35 | return; 36 | } 37 | 38 | $this->line(''); 39 | if (!$this->confirm('Are you sure you want to delete this account?')) { 40 | return; 41 | } 42 | 43 | try { 44 | $this->users->delete($id); 45 | } catch (\Exception $e) { 46 | return $this->error($e->getMessage()); 47 | } 48 | 49 | $this->line('Account deleted.'); 50 | 51 | if ($this->option('list')) { 52 | $users = $this->users->addFilter(['admin' => 1, 'owner_id' => null])->all(); 53 | $this->displayUsers($users); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /services/trax/lrs/src/Console/ListAdminCommand.php: -------------------------------------------------------------------------------- 1 | users->addFilter(['admin' => 1, 'owner_id' => null])->all(); 29 | $this->displayUsers($users); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /services/trax/lrs/src/Console/UpdateAdminCommand.php: -------------------------------------------------------------------------------- 1 | argument('id')) { 29 | if (!$id = $this->chooseUser()) { 30 | return; 31 | } 32 | } 33 | 34 | if (!$user = $this->getUser($id)) { 35 | return; 36 | } 37 | 38 | $email = $this->ask('Email', $user->email); 39 | $data = [ 40 | 'email' => $email, 41 | 'username' => $email, 42 | 'password' => $this->askUserPassword(), 43 | ]; 44 | 45 | if (empty($data['password'])) { 46 | unset($data['password']); 47 | } 48 | 49 | try { 50 | $user = $this->users->update($id, $data); 51 | } catch (\Exception $e) { 52 | return $this->error($e->getMessage()); 53 | } 54 | 55 | $this->line('admin account updated.'); 56 | 57 | if ($this->option('list')) { 58 | $users = $this->users->addFilter(['admin' => 1, 'owner_id' => null])->all(); 59 | $this->displayUsers($users); 60 | } else { 61 | $this->displayUser($user); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /services/trax/lrs/src/LrsServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->runningInConsole()) { 32 | // Commands. 33 | $this->commands($this->commands); 34 | // Define migrations. 35 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); 36 | } 37 | 38 | // Define routes. 39 | $this->loadRoutesFrom(__DIR__.'/../routes/routes.php'); 40 | 41 | // Load views. 42 | $this->loadViewsFrom(__DIR__.'/../resources/views', 'trax-front-lrs'); 43 | } 44 | 45 | /** 46 | * Register any application services. 47 | * 48 | * @return void 49 | */ 50 | public function register() 51 | { 52 | // Basic client service. 53 | $this->app->singleton(BasicClientService::class, function () { 54 | $accesses = $this->app->make(AccessService::class); 55 | return new BasicClientService($accesses); 56 | }); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 18 | 19 | return $app; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | const path = require('path'); 3 | 4 | mix.webpackConfig({ 5 | resolve: { 6 | alias: { 7 | '@': path.resolve(__dirname, 'resources/js'), 8 | '@tim': path.resolve(__dirname, 'services/tim'), 9 | '@trax': path.resolve(__dirname, 'services/trax/framework/front'), 10 | '@lrs': path.resolve(__dirname, 'services/trax/lrs/resources'), 11 | } 12 | } 13 | }) 14 | 15 | mix.options({ 16 | processCssUrls: false, 17 | terser: { 18 | extractComments: false, 19 | } 20 | }) 21 | .js('services/trax/lrs/resources/js/app.js', 'public/js/lrs.js').vue() 22 | .sass('services/trax/lrs/resources/sass/app.scss', 'public/css/lrs.css') 23 | .sourceMaps() 24 | 25 | if (mix.inProduction()) { 26 | 27 | mix.version([ 28 | 'public/js/lrs.js', 29 | 'public/css/lrs.css', 30 | ]) 31 | } 32 | --------------------------------------------------------------------------------