Monorepo
Lunar uses a monorepo at lunarphp/lunar to manage its codebase. All packages, tests, and admin panel code live in a single repository. Monorepos are common in large projects and allow changes that span multiple packages to be developed and reviewed together.Contributing Code
The basic process for contributing code to Lunar is:- Fork the lunarphp/lunar monorepo
- Clone the fork locally
- Create a new branch for the change
- Make changes and write tests
- Ensure the full test suite passes
- Submit a pull request
Coding Standards
Lunar follows the Laravel coding style and uses Laravel Pint to enforce it. Before submitting a pull request, run Pint from the repository root:Running Tests
Lunar uses Pest for its test suite. Each package has its own testsuite, and CI runs them one at a time. Run a testsuite from the repository root:Reporting a Bug
If a bug is discovered, please open a GitHub issue on the lunarphp/lunar repository. The issue should include: At minimum:- A clear title and description of the issue
- Steps to reproduce the behavior
- The version of Lunar, PHP, and Laravel in use
- An accompanying pull request with a failing test that demonstrates the issue
Proposing a Feature
Before investing time on a new feature, it is strongly recommended to start a discussion first. This allows the community and maintainers to provide feedback on whether the feature aligns with Lunar’s direction before any code is written. Prototyping the feature alongside the discussion is welcome if it helps illustrate the proposal.Making a Pull Request
When submitting a pull request, the repository provides a template to guide the submission. A well-structured pull request should include:- A title that clearly summarizes the change
- A description explaining what the change does and why it is valuable
- References to any related issues (e.g.,
Fixes #123) - A label of
bug,enhancement, orfeature - Automated tests with adequate coverage
- Any relevant documentation updates
Documentation
Lunar’s documentation is built with Mintlify and written in MDX. The 2.x docs live in thedocs/ directory on the 2.x branch of the monorepo, next to the code they describe.
- A code change: update the docs in the same pull request as the code.
- A docs-only change, such as a correction or a clearer explanation: open a pull request against the
2.xbranch that changes onlydocs/.
mint validate and mint broken-links from docs/. The same checks run on every pull request that changes docs/. See docs/README.md for the linking rules and the writing style.
Any new page must also be added to the navigation in
docs/docs.json, or it will not appear in the sidebar.