Skip to content

Support discovery for modular directory structures#581

Open
soleinjast wants to merge 12 commits intolaravel:mainfrom
soleinjast:feature/modular-class-discovery
Open

Support discovery for modular directory structures#581
soleinjast wants to merge 12 commits intolaravel:mainfrom
soleinjast:feature/modular-class-discovery

Conversation

@soleinjast
Copy link
Copy Markdown
Contributor

@soleinjast soleinjast commented Feb 17, 2026

Summary

This PR adds support for modular Laravel project discovery in Laravel Boost by consuming architecture signals exposed by laravel/roster.

By default, Boost only scans the app/ directory. With this change, when Roster detects a MODULAR project structure, Boost will also discover classes located under a root-level modules/ (or Modules/) directory.


Motivation

Many Laravel applications use a modular architecture where domain code (such as Eloquent models, controllers, or enums) lives outside the app/ directory.

Previously, Boost was unable to detect these classes, resulting in incomplete or misleading context during AI-assisted workflows.

This change delegates architecture detection entirely to laravel/roster, allowing Boost to remain simple and deterministic while supporting modular Laravel applications.


Behavior

  • Boost continues to scan the app/ directory by default
  • When Roster reports the MODULAR approach:
    • Boost additionally scans:
      • modules/
      • Modules/ (case-insensitive)
      • app-modules/
  • For all other project types, Boost falls back to the default behavior
  • No filesystem heuristics or user configuration are required

Related Work

  • Project architecture detection is handled by laravel/roster
  • Boost only consumes the detected approach and adjusts class discovery accordingly

related #465

@soleinjast soleinjast changed the title feat: support discovery for modular directory structures Support discovery for modular directory structures Feb 17, 2026
@calebdw
Copy link
Copy Markdown
Contributor

calebdw commented Feb 18, 2026

This is something that whatever modular package you are using should provide---for example: https://github.com/InterNACHI/modular/tree/main/resources/boost

@pushpak1300
Copy link
Copy Markdown
Member

pushpak1300 commented Feb 18, 2026

Thanks @calebdw this is really good with the new option we added managing modular will be much more easier with lot of customisation on the guidelines.

I really like the approach if it's working really great i don't think we should manage this in boost.

@soleinjast
Copy link
Copy Markdown
Contributor Author

@pushpak1300 I’ve left a comment on #465 that’s related to this PR.

@ItsReddi
Copy link
Copy Markdown

ItsReddi commented Mar 9, 2026

Hello,
any support needed here to get that merged?

@pushpak1300
Copy link
Copy Markdown
Member

can we fix the merge conflicts here ?

@pushpak1300 pushpak1300 marked this pull request as draft March 16, 2026 12:42
@soleinjast soleinjast marked this pull request as ready for review March 16, 2026 14:05
@soleinjast
Copy link
Copy Markdown
Contributor Author

can we fix the merge conflicts here ?

@pushpak1300 It's ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants