Skip to content

Installation

Terminal window
composer create-project northwestern-sysdev/northwestern-laravel-starter your-project-name
cd your-project-name

Then initialize a fresh Git repository:

Terminal window
git init -b develop # or `main` depending on your branching strategy
git add .
git commit -m "chore: initial commit from Northwestern Laravel Starter"

The application expects specific services to exist before you can begin local development:

  1. Create Databases

    Create the two databases required by the application:

    your_project_name_local # Primary application database
    your_project_name_test # PHPUnit test database
  2. Create RustFS Bucket

    Create a bucket for local object storage in the RustFS console (http://localhost:9001 in Herd, signing in as herd / secretkey):

    your-project-name

    Then open the bucket’s settings, edit Bucket CORS, and save the default rule. Livewire uploads files directly from the browser to the bucket, and RustFS sends no CORS headers until a rule exists.

    With Serve over HTTPS enabled in Herd’s RustFS service settings, the S3 API is available at https://rustfs.herd.<tld> on macOS and https://rustfs-9000.herd.<tld> on Windows, where <tld> is your Herd TLD.

    You can also create the bucket and its CORS rule from the command line with the RustFS CLI, rc (brew install rustfs/tap/rc on macOS):

    Terminal window
    rc alias set local https://rustfs.herd.test herd secretkey
    rc bucket create local/your-project-name
    echo '{"CORSRules":[{"AllowedOrigins":["*"],"AllowedMethods":["GET","PUT","POST","DELETE","HEAD"],"AllowedHeaders":["*"],"ExposeHeaders":["ETag"]}]}' \
    | rc bucket cors set local/your-project-name -
  1. .env.example

    Update the file by referencing the services you created in the previous step and setting other project-specific defaults:

    .env.example
    APP_NAME="Your Project Name"
    APP_URL=https://your-project-name.test
    DB_DATABASE=your_project_name_local
    DB_PHPUNIT_DATABASE=your_project_name_test
    AWS_URL=https://rustfs.herd.test/your-project-name
    AWS_ENDPOINT=https://rustfs.herd.test
    AWS_BUCKET=your-project-name

    Replace test in AWS_URL and AWS_ENDPOINT with your Herd TLD (use rustfs-9000.herd.<tld> on Windows). AWS_URL ends with the bucket name.

    Commit these changes to your repository as the base configuration for other developers.

  2. herd.yml

    If you’re using Laravel Herd, update the name field to match your folder/repository name:

    herd.yml
    name: northwestern-laravel-starter
    name: your-project-name
Terminal window
herd init # If using Laravel Herd
herd secure # If using Laravel Herd
composer install
cp .env.example .env
php artisan key:generate
nvm install
nvm use v26
npm install -g pnpm@latest-12 # If pnpm is not already installed
pnpm install
pnpm build

A local environment needs no credentials. With the .env.example values, the sign-in page offers Sign In As for the seeded demo users, db:rebuild makes no network calls, and config:validate skips the SSO and Directory Search checks. See Signing In Locally.

Configure SSO and Directory Search locally only to test real NetID sign-in or to add Northwestern users from the directory. Deployed environments always need them. See the WebSSO / Entra ID documentation for full details on each provider.

If your application uses Microsoft Entra ID (the default):

.env
AZURE_CLIENT_ID=your-client-id
AZURE_CLIENT_SECRET=your-client-secret
DIRECTORY_SEARCH_API_KEY=your-value-here
EVENT_HUB_API_KEY=your-value-here # Only if the EventHub integration is needed

To ensure your environment is correctly configured, run:

Terminal window
php artisan config:validate

If any issues are detected, the command will output error messages to help you resolve them.

Terminal window
php artisan db:rebuild

This will:

  • Clear the cache, the queue and the schedule cache (Redis must be running)
  • Create all database tables
  • Seed system permissions, role types and default roles
  • Sync changelog entries from resources/changelogs/
  • Seed the demo users, which the sign-in page offers under Sign In As
  • Regenerate the model IDE helper files

Start the development processes:

Terminal window
composer dev

This runs the PHP server, a queue worker, the log viewer and Vite together. The queue worker is required: jobs go to Redis (QUEUE_CONNECTION=redis), and email sign-in codes are not sent until a worker runs them.

With Laravel Herd, the site is served at https://your-project-name.test. Without Herd, use the address php artisan serve prints.

As a guest you should see the landing page. Choose Sign In, then Sign In As… and a demo user such as NUIT Administrator, and you land in the app panel at /app.