On the 25th of April I published my first ever open source package!
A Laravel Nova tool for the pre-launch and launch phases of your website.
Let me give you a brief summary of how this package came to life:
I was working on a project with a friend when I took on the task of implementing functionality for disabling the website for visitors, while still allowing admins to access it. Furthermore, the site had to be launchable from within Nova.
Well, I created that functionality and kept refining it until I thought: maybe I should extract this from the project and wrap it in its own package?
nova-launch is a very simple package that adds functionality for the pre-launch and launch phases of the website. It enables site owners to give their visitors a sneak peek of the website, while still allowing themselves and developers full access1. Furthermore, visitors can register to get notified when the website goes live2. Finally, when the website is ready to be launched, it can be done through Nova or, if needed, via the command line3.
The package comes with the following functionalities:
- Disable the website for visitors by redirecting them to a single page (which is completely configurable by the developer). By default this page shows some basic information and a sign up form (table, model and store functionality are also included by default, because to me this seemed to be the most interesting functionality).
- Allow admins or people that know the secret (if enabled) full access to the website.
- Launch the website via Nova or the
php artisan nova-launch:launch
command. - Dispatch an event after launch, because you might want to do more after that!
- Completely disable itself after launch to lower the impact from multiple checks on each request.
You can find the package on Github: @dnwjn/nova-launch. Or, if you just want to install it, run the following command (which downloads the package from Packagist):
composer require dnwjn/nova-launch
As mentioned in the package's readme, this is the first package I ever published. So if you have any tips, tricks or improvements for making this or future packages better, don't hesitate to get in touch with me!
- The header image in this article is generated with @pqt/social-preview.