# Maestro host application

Laravel + Vue SPA consuming **maestro/core** and **@maestro/core**.

## Requirements

- PHP 8.3+
- Composer 2
- Node 22+
- SQLite (default) or MySQL

[Laravel Herd](https://herd.laravel.com) is recommended on macOS.

## Setup

```bash
composer install
cp .env.example .env
php artisan key:generate
php artisan core:install
php artisan migrate
php artisan db:seed
npm install
npm run build
```

Or one command:

```bash
composer run setup
```

## Development

```bash
composer run dev
```

Open the app URL (e.g. `http://localhost:8000`). After Vite config changes:

```bash
rm -rf node_modules/.vite
```

## Custom features

```bash
php artisan make:custom-feature Reservations --slug=reservations --api-prefix=reservations
```

Host code lives under `app/Custom/Features/` and `resources/js/modules/custom/`.

## Audits

```bash
composer run maestro-audit
php artisan maestro:host-integrity
```

Superadmin → **Installation health** shows host integrity checks.

## Upgrade Maestro CORE

```bash
composer update maestro/core
npm update @maestro/core
php artisan core:install --force
php artisan core:install --refresh-cursor-rules
php artisan migrate
rm -rf node_modules/.vite
npm run build
```

## Local Maestro CORE development

See `vendor/maestro/core/docs/LOCAL-LINKING.md` after package install, or the Maestro-new repository.

```bash
php artisan maestro:link ../Maestro-new
php artisan maestro:unlink   # before commit / CI
```

## Documentation

- `.cursor/rules/maestro-host-custom-code.mdc` — paths and anti-patterns
- `AGENTS.md` — AI agent quick reference
