Installation
Nexus Saas Launchpad is a Laravel application. This means it runs in a PHP environment.
The fastest path to a functional development environment is to use Valet if you're on Mac, or Sail if you're on Windows + WSL.
Early Adopters
If you're reading this, know that Nexus is evolving quickly. The current iteration is still very manual and sticky in places. I want to get this down to where you can install Nexus as a dependency, use it to create some things, and safely remove the dependency (or only have in dev), without impacting panel performance.
We are not there quite yet.
Pre-Requisites
Web Server
On Mac, Valet will act as the webserver and also assist with other important functions needed in a local environment.
On Windows, we recommend using Docker to host the necessary container. Sail is built-in to Laravel, and we take advantage of it when developing Nexus.
If you elect to pursue other hosting options, ensure that PHP 8.1 is installed and configured with all the necessary extensions (which can be found in composer.json).
Database
Our default choice is Postgres, but we use Eloquent everywhere, including migrations, seeders, and other files, so you should be able to point Nexus at any given DB engine supported by Laravel.
Cache & Queue Providers
For local development, we recommend using a Redis container. One is included by default with our Nexus configuration.
Provided Bash Script (setup.sh)
./setup.sh
This script will quickly and automatically bootstrap a local development environment in Windows + WSL 2 + Docker. All required containers will be created and all dependencies installed. The script will even launch the stack, so you can immediately load the app in your browser!
Do It By Hand
If you want to create the application and environment by hand, here are the steps:
- Clone
https://github.com/hotheadsoftware/nexus - Ensure you have Composer available to you.
- Run
composer install. - Run
.vendor/bin/sail up -d - Copy .env.example to .env
- Run
.vendor/bin/sail artisan key:generate - Run
.vendor/bin/sail artisan migrate --seed - Run
npm installorbun install(can do this using vendor/bin/sail if desired). - Add our Pint pre-commit hook if you want to enforce code styles (see setup.sh).
- Install bash aliases for sail, artisan, and composer (optional).
For details on the commands and how to run them, see setup.sh.
Localhost Routing (DNS / Hosts File)
Windows
You'll need to be able to route some domains to localhost. On windows, you can modify the c:\Windows\System32\drivers\etc\hosts file and add relevant entries. We recommend adding the following pointers:
foo.localhost 127.0.0.1
bar.localhost 127.0.0.1
baz.localhost 127.0.0.1
Linux
Modify /etc/hosts with the above.
MacOS
On Mac OS, use Valet. It will handle all of this (and much more) for you.
Next Steps
Now that you've established the environment, let's create your first tenant-context panel!