# Contributing
# Overview
Lunar is an open source project, and so by its very nature, welcomes contributions.
You can contribute to the project in many different ways. Reporting bugs, fixing bugs, helping with the documentation, making suggestions and submitting improvements to the software.
# Monorepo
Lunar uses a monorepo lunarphp/lunar (opens new window) to house the core, admin hub and documentation. Monorepos (opens new window) are quite common, but may not be familiar to some. The monorepo helps us to organise the code for ease of development.
# Repository Branching
There are two branches you need to be aware of when contributing to Lunar - main
and develop
.
The main
branch hosts the latest stable version of the software and documentation. Whereas the develop
branch hosts new features and updates in active development between releases.
# Documentation
If you would like to contribute to the documentation you can do easily by following these instructions...
- Fork the monorepo
lunarphp/lunar
- Clone your fork locally
- In your terminal change to the
/docs
directory - Run
npm install
- Run
npm run dev
to preview the documentation locally - Make your changes
- Submit a pull request
Lunar uses VuePress (opens new window) for our documentation site which uses Markdown (opens new window) files to store the content. You'll find these Markdown files in the /docs/src
directory.
# Found a Bug?
If you find a bug in the software please raise a GitHub Issue on the lunarphp/lunar (opens new window) repository.
Even better would be a pull request with a test that fails demonstrating the bug.
# Proposing a Feature
Before you start coding away on the next awesome feature, we highly recommend starting a discussion (opens new window) to check that your contribution will be welcomed. We would hate for you to spend valuable time on something that won't be merged into Lunar.
However, you're more than welcome to code away on your idea if you think it will help the discussion.
# Issue Not Getting Attention?
If you need a bug fixed and nobody is fixing it, your best bet is to provide a fix for it and make a pull request (opens new window). Open source code belongs to all of us, and it's all of our responsibility to push it forward.
# Contributing Code
The basic process for contributing to Lunar is as follows...
- Fork the monorepo
- Clone your fork locally
- Make your changes
- Ensure the tests run and complete successfully
- Submit a pull request
However, if you're not used to working with monorepo's and setting them up inside a test Laravel application, no problem!
Development Guide
Here's a guide on how to set-up your development environent ready for contributing to Lunar.
# Making a Pull Request
When making a pull request (opens new window), you will want to target the correct branch.
If you are contributing documentation, the PR should be targeted straight to the main
branch. However, code contributions should target the develop
branch.
Please include a good description of what your pull request offers.
When contributing code, please ensure you include suitable tests, documentation and changelog entries, as applicable.