aldidsCoop
Guide

Installation

Install and run aldidsCoop locally — from cloning the GitHub repository to a fully working app on Laravel Herd, XAMPP, or plain PHP.

On this page 19

This guide walks you through installing aldidsCoop from GitHub on your own machine. You can run the app on Laravel Herd (recommended, macOS/Windows), on XAMPP (Apache + MariaDB), or simply with PHP's built-in dev server.

Requirements

Requirement Version How to check
PHP ^8.3 (8.3, 8.4, or 8.5) php -v
Composer 2.x composer --version
Node.js & npm Node 20+ node -v && npm -v
Database MySQL 8 / MariaDB, or SQLite see Database
Git any recent git --version
Note

PHP 8.3+ is required by both Laravel 13 and Filament v5. If your php -v reports an older version, pick one of the setup options below that gives you a modern PHP before continuing.

Step 1 — Clone the repository

bash
git clone https://github.com/<owner>/<repo>.git
cd <repo>

Replace <owner>/<repo> with the project's actual GitHub address. If you already have a clone, pull the latest:

bash
git pull

Step 2 — Set up your PHP environment

Pick one of the following options.

Herd bundles PHP (with a per-site version switcher) and nginx, and gives every project a .test domain automatically.

  1. Download and install Herd for macOS or Windows.
  2. From the Herd dashboard, install PHP 8.3 (or 8.4/8.5) and make it the active version.
  3. Install Composer and Node.js (Herd can install both for you).

You can now host the project as a site. Either place the cloned folder inside ~/Herd, or link an existing folder:

bash
cd /path/to/<repo>
herd link coop
herd secure
Tip

herd secure enables HTTPS (https://coop.test). Skip it if you only need plain http://coop.test.

Option B — XAMPP

XAMPP provides Apache, MariaDB, and PHP in one installer for Windows, macOS, and Linux.

  1. Install XAMPP.

  2. Check the bundled PHP version — XAMPP often ships PHP 8.2 or older:

    bash
    php -v
    

    If it's below 8.3, do one of the following:

    • Update XAMPP's PHP to 8.3+, or
    • Install PHP 8.3+ separately (e.g. from windows.php.net) and make sure your terminal's php resolves to it, and
    • Use XAMPP's Apache + MariaDB only, and run the app with php artisan serve.
  3. Start the Apache and MySQL services from the XAMPP Control Panel.

  4. (Optional) Create a virtual host so the app has its own domain. Edit C:\xampp\apache\conf\extra\httpd-vhosts.conf (or /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf on macOS):

    apache
    <VirtualHost *:80>
        ServerName coop.test
        DocumentRoot "C:/path/to/<repo>/public"
        <Directory "C:/path/to/<repo>/public">
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    </VirtualHost>
    

    Then add coop.test to your hosts file and restart Apache.

Caution

Composer natively requires your PHP build to include extensions like openssl, pdo_mysql, mbstring, curl, and fileinfo. XAMPP bundles these for its own PHP; for a standalone PHP install you must enable them in php.ini.

Option C — Plain PHP + artisan serve

If you already have PHP 8.3+, Composer, and MySQL:

bash
php -S localhost:8000 -t public

This works but offers no domain, HTTPS, or PHP version management — fine for quick experiments.

Step 3 — Configure the environment

The composer script creates .env from .env.example, generates the app key, and handles the basics:

bash
composer run setup

…or do it manually, step by step:

bash
cp .env.example .env
php artisan key:generate

Edit .env and set the app URL and database to match your setup (see below).

App URL

Setup APP_URL
Herd (secure) https://coop.test
Herd (plain) http://coop.test
XAMPP virtual host http://coop.test
artisan serve http://localhost:8000

Database

MySQL / MariaDB

Set the connection to MySQL and fill in your credentials. With a default XAMPP/Herd install the values are:

env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=coop
DB_USERNAME=root
DB_PASSWORD=

Create the database first (via phpMyAdmin, Herd's database UI, or the MySQL client):

sql
CREATE DATABASE coop CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

SQLite (quick start)

The included .env.example defaults to SQLite, which needs no server:

bash
touch database/database.sqlite

Keep DB_CONNECTION=sqlite and leave the MySQL keys commented out.

Step 4 — Install PHP & JavaScript dependencies

bash
composer install
npm install

Step 5 — Migrate and seed

bash
php artisan migrate --seed

The seeders create the initial permissions/roles and starter data. Run php artisan storage:link so uploaded files can be served.

Step 6 — Frontend assets

In production-style use, build the compiled assets:

bash
npm run build

During development, instead keep the asset builder watching your files (leave this running in a separate terminal):

bash
npm run dev
Tip

If pages render with no styling after an update, run npm run build and, if using Herd, remember to refresh the browser cache with a hard reload (Ctrl/Cmd+Shift+R).

Step 7 — Serve the app

Setup Command
Herd Nothing — the app is live at your .test URL (https://coop.test)
XAMPP / Apache Nothing — Apache + virtual host serves it; or php artisan serve
Plain PHP php artisan serve (serves on http://localhost:8000)

Step 8 — Verify

  • Member dashboard — open /app and log in as a member.
  • Management area — open /app/{tenant}/management (e.g. /app/PSN0000159/management) as an administrator.
  • API — see the API Reference and authenticate with POST /api/auth/login.

Testing

bash
php artisan test

Tests run against an in-memory SQLite database (see phpunit.xml), so nothing needs to be added to MySQL for the suite to pass.

Code style

bash
vendor/bin/pint --dirty

Troubleshooting

Problem Fix
composer install fails with a PHP version warning Your PHP is below 8.3 — use Herd or update XAMPP/standalone PHP.
Unable to locate file in Vite manifest Run npm run build (or keep npm run dev running).
API reference at /docs/api is missing or stale Re-export the OpenAPI spec: php artisan scramble:export --path=docs/openapi.json.
Could not find package information in Composer Retry with composer update -W (widens dependency resolution).
DB connection refused (MySQL) Start MySQL via XAMPP Control Panel / Herd, and confirm DB_HOST, DB_PORT, and credentials in .env.
Pages load but have no CSS Assets haven't been built (npm run build); check the browser's network tab for failed asset requests.