This is coderstm/foundry, a comprehensive Laravel package providing essential functionalities including subscription management, multi-auth, theming, notifications, and payment integrations. It's designed as a complete business solution package with extensive service provider architecture.
Note: Detailed, area-specific instructions are available in
.github/instructions/for different parts of the codebase. These instructions complement this overview.
# 1. Install dependencies
composer install
# 2. Build workbench (creates test Laravel app)
vendor/bin/testbench workbench:build
# 3. Run tests to verify setup
composer test
# 4. Start development server (optional)
composer run serveAfter setup, you should be able to:
- ✅ Run
composer testsuccessfully - ✅ Run
composer lintwithout errors - ✅ Access workbench app at http://localhost:8000 (when using
composer run serve)
- Adding a new feature: Start by writing a test in
tests/Feature/ - Fixing a bug: Reproduce it with a test first, then fix
- Adding a model: Create model → migration → factory → tests
- Adding an API endpoint: Controller → Service → Resource → Tests
- Use semantic search to find intent-level code (e.g., "subscription renewal", "theme activation")
- Focus on key directories:
src/Services(business logic),src/Models(domain),src/Http/Controllers(orchestration),src/Commands(CLI) - Understand flow before editing: Open adjacent files (policies, events, listeners) to grasp complete workflows
- Start at service providers:
src/Providers/shows how the package registers itself and integrates with Laravel
# Build workbench (required before tests)
vendor/bin/testbench workbench:build
# Run package tests
vendor/bin/testbench package:test
# Start development server
composer run servefoundry:install- Package installation and provider registrationfoundry:subscriptions-expired- Subscription lifecycle management
# Run all tests
composer test
# Run specific test file
vendor/bin/phpunit tests/Feature/SubscriptionTest.php
# Run linting
composer lint
# Build workbench (if needed)
vendor/bin/testbench workbench:build
# Start dev server
composer run serveProblem: Tests fail with database errors or missing classes. Solution:
# Always build workbench first
vendor/bin/testbench workbench:build
composer test