# Builder Core

The foundation of the Builder admin panel — Inertia + Vue 3 admin UI, Resource/Settings/Widget infrastructure, navigation registry, RBAC, MFA, and the shared `@builder/ui` component library. Every other Builder package depends on this one.

## Requirements

- PHP 8.4+
- Laravel 13.x
- Node 22+, pnpm 9+

## Installation

```bash
composer require builder/core
php artisan vendor:publish --tag=builder-config
php artisan migrate
php artisan builder:install   # seeds permissions, default admin role
php artisan builder:link      # symlinks public/vendor/builder/core
```

## Development

```bash
cd packages/core
composer install
pnpm install
pnpm run dev          # starts Vite dev server on :5173, emits public/hot
```

While the dev server runs, the host app picks up the hot file automatically. `composer test` and production builds work independently of dev mode.

## Testing

```bash
composer test
```

Runs the full pipeline: `pest --type-coverage --min=100` → `pest --parallel --coverage --exactly=100.0` → `pint --test` + `rector --dry-run` + `npm run test:lint` → `phpstan`.

## Releasing a new version

Releases are automated by the **Release** GitHub Actions workflow — you no
longer build assets or create tags by hand.

1. Make sure `main` is up to date and green.
2. Trigger the workflow with the new version number:
   - GitHub UI: **Actions → Release → Run workflow**, enter e.g. `1.2.3`
   - CLI: `gh workflow run release.yml -f version=1.2.3`

The workflow runs `composer test`, builds the production assets, commits them
into the release tag, pushes the tag and creates the GitHub Release. The build
output is **not** tracked on `main` — it lives only inside release tags.

> Built assets (`public/assets`, `public/.vite`) and `public/hot` are
> gitignored; never commit them by hand.
