1.9 KiB
1.9 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
castes/delegate-auth is a Laravel package (PHP ^8.3, Laravel ^10|^11) installed via Composer on an existing Laravel project. Its primary purpose is to publish a configuration file (delegate-auth.php) into the host application's config/ directory. Namespace: Rodev\DelegateAuth.
The package is still in scaffolding — several placeholder names from the generator template have not yet been replaced.
Commands
Install dependencies:
composer install
Run tests (via Orchestra Testbench):
vendor/bin/phpunit
# single file:
vendor/bin/phpunit tests/Path/To/TestFile.php
Architecture
src/DelegateAuthServiceProvider.php— registers the package. Merges the default config, binds a singleton under thedelegate-authkey, and inboot()publishes config/migrations, loads routes, and loads views.src/Console/InstallCommand.php— Artisan command (mon-package:install) that callsvendor:publishfor config and migrations.config/deletgate-auth.php— single keyencrypt_keysourced fromDELEGATE_KEYenv var.
Known Issues (scaffolding not yet cleaned up)
- Config filename typo:
deletgate-auth.phpshould bedelegate-auth.php. The service provider references the correct name, so this causes a runtime error. - The class inside
DelegateAuthServiceProvider.phpis still namedMonPackageServiceProvider. - The service provider references
MonPackageClass(the main service class) which does not exist yet. composer.jsonextra.laravelstill declares the placeholder provider (MonPackageServiceProvider) and facade (MonPackage).InstallCommandstill referencesTonNamespace\\MonPackage\\MonPackageServiceProvider.tests/directory does not exist yet (autoload-devis configured forRodev\DelegateAuth\Tests\).