Qore frontend
The Qore Frontend package provides application scaffolding and authentication functionality for building customer-facing portals in the Qore.works Business ecosystem.
What it provides
Authentication & User Management
- Portal authentication: Pre-built Livewire components for login, registration, password reset, and email verification (using Livewire Flux UI)
- Two-factor authentication: Support for 2FA with recovery codes (via pragmarx/google2fa)
- Welcome notifications: Automated welcome emails with time-limited access links for new platform users
- Email verification: Built-in email verification workflow with custom notifications
Installation
- Install the package via composer:
composer require qore-works-business/qore-frontend --with-all-dependencies- Run the artisan install script to install the qore-frontend.
php artisan qore-frontend:installScaffold a new portal application
To scaffold a new application based on the Portal template you can run:
php artisan scaffold:application Portal portal --create
npm install
npm run buildIf route, config, or ServiceProviders already exist these won't be replaced with a newer version.
To redeploy the latest version of these files, you can add the --force flag.
Update User model
Make sure to add the trait HasWelcomeNotification to the user model so it wil receive notifications when creating a platform user from a Person inside the Admin.
Make sure to add the HasVerifyEmailNotification trait to the user model so it will receive an email to verify its email address before being allowed to access the platform.
use QoreWorksBusiness\QoreFrontend\Concerns\HasVerifyEmailNotification;
use QoreWorksBusiness\QoreFrontend\Concerns\HasWelcomeNotification;
class User extends QoreAdminBaseUser implements MustVerifyEmail
{
use HasVerifyEmailNotification;
use HasWelcomeNotification;
}Adding middleware aliases
The frontend and routing ships with aliases for middleware as default, this makes using the correct middleware easy, without having to read config files.
Add the following snippet to bootstrap/app.php to setup the middleware.
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Middleware;
use QoreWorksBusiness\QoreFrontend\QoreFrontendRouting;
return Application::configure()
->withMiddleware(function (Middleware $middleware) {
QoreFrontendRouting::aliasPortalMiddleware($middleware);
});Alternatively the aliases can be added in a service provider using the following snippet.
Using the bootstrap/app.php is recommended but for some testing setups this doesn't work.
use Illuminate\Contracts\Http\Kernel;
use QoreWorksBusiness\QoreFrontend\QoreFrontendRouting;
// Add global middleware to Kernel. In projects, this is done in the bootstrap/app.php
$aliases = app(Kernel::class)->getMiddlewareAliases();
app(Kernel::class)->setMiddlewareAliases(QoreFrontendRouting::aliasPortalMiddleware($aliases));Styling livewire components
The frontend package ships with a handful of livewire components, who's views are not published to projects by default. The tailwind config should search the view files for tailwind classes already, but if styling issues occur, verify the vendor path is included.
Tailwind CSS v4 (recommended)
With Tailwind CSS v4, use @source directives in your CSS file (e.g. resources/css/application/portal/app.css):
@import "tailwindcss";
@source '../../../../vendor/qore-works-business/qore-frontend/resources/views/**/*.blade.php';
@source '../../../../resources/views/application/portal/**/*.blade.php';Tailwind CSS v3 (legacy)
For projects still using Tailwind CSS v3, include the vendor path in your tailwind.config.js:
export default {
content: {
relative: true,
files: [
'../../../../vendor/qore-works-business/qore-frontend/resources/views/application/portal/**/*.blade.php',
],
}
}Customizing the packages views can be done by publishing them.
php artisan vendor:publish --tag=qore-frontend-viewsAlternatively, you can extend the livewire class and render your own view using the render() function.
use QoreWorksBusiness\QoreFrontend\Integrations\Portal\Livewire\auth\LoginCard;
class Login extends LoginCard
{
public function render()
{
return view('your-view')
}
}