Development Environment Setup - McNamara84/ladis GitHub Wiki
This guide provides a step-by-step explanation for installing and setting up the local development environment for LADIS.
Note
We try to make this as easy and thorough as possible but we simply can't cover each and every detail of every tool used in the setup.
Before you can start developing, you'll need to install several tools. Follow this order for a smooth setup experience:
Git can be installed in various ways. Choose one option based on your comfort level. The Downloads page offers installers for the command-line interface and also GUI applications.
Tip
- The GitHub Desktop application provides a user-friendly GUI and uses a bundled version of Git, so you don't have to install Git manually.
- For users comfortable with terminal commands, GitHub CLI provides an efficient way to interact with remote repositories and is a nice companion to
git.
Note
On macOS you might need to install the Xcode Command Line Tools. Run xcode-select --install.
PHP is the core programming language for this project. As with many tools, the installation procedure differs depending on your OS. For Windows, prebuilt binaries are available. On Unix and macOS you have to rely on your favorite package manager.
Important
The minimum version is PHP 8.2 or higher as per the composer configuration (composer.json).
- Download and install PHP
- Verify the installation by running
php -vin your terminal. You should see a line like this:PHP 8.4.7 (cli) (built: May 6 2025 12:31:58) (NTS)
Tip
Please refer to the PHP Installation and Configuration manual for details.
You must install Node.js before proceeding โ this project requires it for frontend asset compilation and build processes.
Note
This project requires Node.js version 18.0 or higher. Version 22.0 or higher is recommended.
Node.js is a free, open-source, cross-platform JavaScript runtime environment that allows running JS outside the browser. It comes with NPM, a package and dependency manager that will be installed automatically with Node.js.
- Download Node.js: Visit the downloads page and choose an LTS (Long Term Support) version
- Install: Follow the installation instructions for your operating system
-
Verify installation: Open your terminal and run these commands:
You should see version numbers displayed (e.g.,
node -v npm -v
v20.11.0and10.2.4)
Note
Common Issues:
- If
nodeornpmcommands are not recognized after installation, you may need to restart your terminal or add Node.js to your system PATH - On macOS, you might need to restart your terminal or run
source ~/.zshrc(orsource ~/.bash_profile) after installation
Tip
Advanced users might want to use a Node.js version manager (like nvm, fnm, or volta) for easier version management across multiple projects.
Note
Choosing a code editor is a very personal thing for some people and we don't want to tell which one you should use. These are just recommendations to to get contributors started.
We recommend using Visual Studio Code (VS Code or simply VSC). It's available on many platforms, widely adopted, and offers an extensive extension ecosystem.
Tip
If you're camp libre, consider using VSCodium (Codium), a community-driven, freely-licensed binary distribution of VS Code.
Extensions can be installed directly from the Extensions view in VSC (โงโX) or from the Extensions Marketplace.
Tip
Open VSX is an open-source registry for extensions for VS Code compatible editors. It's the preferred registry for Codium.
Once you have your VSC installed, add these extensions for a better development experience:
EditorConfig is a plain-text file with simple declarations for maintaining consistent coding styles between different editors and IDEs.
Install the EditorConfig for Visual Studio Code. VSC will adopt the settings from the configuration file, overriding any options in its own settings.
PHP Tools for Visual Studio Code (PHP Tools) is an extension bundle that provides advanced PHP development features including debugging and IntelliSense. It also integrates support for Composer and Laravel.
Caution
Offers both free and premium (aka paid) features! Stick with the free version.
The bundled extensions are:
The extension provides complete integration of Composer, a dependency manager for PHP, and Packagist, the main Composer repository. The composer executable itself is downloaded automatically.
Tip
Make sure to set COMPOSER_HOME before installation, if you want to keep your user home directory clean.
IntelliPHP offers AI-assisted intelligent code predictions for PHP.
Caution
This is a premium feature. Feel free to disable this extension.
Xdebug profiles contain information about PHP code performance. PHP Profiler enables inspecting of profile files in VSC and it also highlights hot paths in your code.
Warning
XDebug isn't installed automatically.
- Install and setup XDebug manually
- or disable this extenison.
These aren't required and are general recommendations to make working with common file types more comfortable in VSC:
- Markdown All in One enhances the built-in language features for markdown editing.
- Even Better TOML makes editing TOML files even better.
Once you have all the prerequisites installed, you can set up the project locally. This process involves cloning the repository and installing the required dependencies.
First, you need to get a local copy of the project. You can do this using Git from the command line or through a GUI application like GitHub Desktop.
Important
A repository can be cloned using different URLs. Which one you should use depends on your git config.
- Open your terminal or command prompt
- Navigate to the directory where you want to store the project
- Clone the repository:
# Replace <URL> with the actual URL! git clone <URL> cd cleanup-laser-database
- Open GitHub Desktop
- Click File โ Clone repository
- Enter the repository URL or search for it if you have access
- Choose your local path and click Clone
This project uses Composer to manage PHP dependencies. The composer.json file contains all the required packages for the application to run properly.
- Navigate to the project directory in your terminal
- Install PHP dependencies:
composer install
Note
If you installed the PHP Tools extension, Composer should be available automatically. Otherwise, make sure Composer is installed and available in your system PATH.
PHP Tools also exposes Composer commands via the Command Palette. This way it's possible to run Composer commands and scripts even if the executable is not in PATH and thus not available in the terminal.
The installation process will:
- Download all PHP packages defined in
composer.json - Create a
vendor/directory with all dependencies - Generate the Composer autoloader for efficient class loading
The project uses Node.js and NPM for managing frontend assets and build tools.
Note
Make sure you have completed the Node.js installation from the Prerequisites section before running this command.
In the same project directory, install JavaScript dependencies:
npm installThis command will:
- Read the
package.jsonfile for dependency definitions - Download and install all required Node packages
- Create a
node_modules/directory with the dependencies - Generate or update the
package-lock.jsonfile for dependency locking
Note
The installation might take a few minutes depending on your internet connection and the number of dependencies.
Laravel provides first-party support for five different databases.
Tip
By far the simplest method is to use SQLite and we'll assume this database type in this guide. Feel free to choose any other DB if you're comfortable with running your own local DB server.
Create the SQLite database by running this command in the project's root directory:
touch database/database.sqliteSQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Creating the file is all that's necessary.
In the next step we'll update the Laravel environment and configure the database connection.
Laravel applications use environment files to manage configuration settings that vary between different users and environments (development, staging, production). Per-user settings are store in .env.
Caution
Never commit your .env file to version control as it may contain sensitive information like database credentials and API keys.
-
Copy the example environment file:
cp .env.example .env
-
Open the
.envfile in your code editor and configure the database connection.DB_CONNECTION=sqlite DB_DATABASE=database/database.sqlite
Update the email configuration in your .env file:
MAIL_MAILER=smtp
MAIL_SCHEME=null
MAIL_HOST=MAILSERVERHOST
MAIL_PORT=465
MAIL_USERNAME=MAILSERVERUSERNAME
MAIL_PASSWORD=MAILSERVERPASSWORD
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"Important
Note that MAILSERVERHOST, MAILSERVERUSERNAME and MAILSERVERPASSWORD are placeholders. Replace them with your actual mail server credentials. Depending on the mail server configuration you might also have to update MAIL_PORT and some servers require 2FA.
You can always use MAIL_MAILER=log instead of a real email server. You'll find the messages in storage/logs/laravel.log.
Laravel requires a unique application key for encryption and security purposes. This key is generated with Artisan, the command line interface included with Laravel.
Generate the application key:
php artisan key:generateThis command will automatically update your .env file with a new APP_KEY value.
Before you can use the application, you need to set up the database structure. Again artisan provides a command for that.
Run the database migrations:
php artisan migrateThis will create all the necessary database tables as defined in the project's migration files.
Note
Make sure your database connection is properly configured in the .env file before running migrations.
Laravel includes a built-in development server for local testing.
Important
The Laravel server alone is not enough for our setup. Read the whole section to get the full picture.
-
Run the dev server:
composer run-script dev
- Navigate to http://localhost:8000
The Laravel server is started by running the following command:
php artisan serveIf you navigate to http://localhost:8000 right now, you'll see an error message complaining that the file public/build/manifest.json is missing. This manifest.json is generated by Vite, the frontend build tool used in our project.
In the package.json file you can see that there are two scripts configured for Vite, build and dev:
-
"build": "vite build": This command will run the build process once. -
"dev": "vite": This starts the Vite dev server with hot reloading.
This is a pretty common configuration. Run any of those NPM scripts like this:
npm run <script-name>Instead of starting the two servers (Laravel and Vite) manually, we'll utilize the scripts defined in composer.json.
The dev command executes a Node.js script called dev-server.js. This script automatically reads the current version tag from Git (when available) and exposes it as an environment variable to the development processes. The script then starts Laravel, the queue worker, and Vite in parallel using concurrently. We use this approach because not all contributors have Git installed via command line (some may only use GitHub Desktop), and the logic was becoming too complex for inline composer scripts.
composer run-script devYou'll see exactly what the command does:

Open your web browser and navigate to http://localhost:8000
Tip
The development server will continue running until you stop it with Ctrl+C in your terminal.
If everything is set up correctly, this is what you should be able to see without any errors:

- PHP: Hypertext Preprocessor
- PHP: Downloads
- PHP: Installation and Configuration - Manual
- PHP For Windows: Binaries and sources Releases
- PHP: Installation on macOS - Manual
- PHP: Installation on Unix systems - Manual
- Git
- Git - Downloads
- GitHub Desktop | Simple collaboration from your desktop
- GitHub CLI | Take GitHub to the command line
- Visual Studio Code - Code Editing. Redefined
- Extensions for Visual Studio family of products | Visual Studio Marketplace
- Use extensions in Visual Studio Code
- VSCodium - Open Source Binaries of VSCode
- Open VSX Registry
- EditorConfig
- editorconfig/editorconfig-vscode: EditorConfig extension for Visual Studio Code
- PHP Tools for Visual Studio and VS Code by DEVSENSE
- Laravel - The PHP Framework For Web Artisans
- Composer โ Open VSX Registry
- IntelliPHP - AI Autocomplete for PHP โ Open VSX Registry
- PHP Profiler โ Open VSX Registry
- Composer
- Command-line interface / Commands - Composer
- Packagist
- Xdebug - Debugger and Profiler Tool for PHP
- Markdown and Visual Studio Code
- markdown-all-in-one โ Open VSX Registry
- Even Better TOML โ Open VSX Registry
- Node.js โ Run JavaScript Everywhere
- Node.js โ Download Node.jsยฎ
- npm | Home
- ECMA-262 - Ecma International
- About remote repositories - GitHub Docs
- Git - Git Configuration
- Command Palette | VS Code User Interface
- Database: Getting Started - Laravel 12.x - The PHP Framework For Web Artisans
- SQLite Home Page
- Configuration - Laravel 12.x - The PHP Framework For Web Artisans
- Artisan Console - Laravel 12.x - The PHP Framework For Web Artisans
- Vite | Next Generation Frontend Tooling
- concurrently - npm
- Environment variable - Wikipedia
- Git - Tagging