Library / SDK
lunarphp/lunar avatar
lunarphp/lunar

Lunar for Laravel: a headless e-commerce backend you assemble yourself

An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

3,745 stars513 forksPHPMIT

At a glance

What is it?
Lunar is a set of Laravel packages that supplies the e-commerce backend (catalogue, orders, admin panel) while leaving the storefront entirely to you. It suits Laravel teams that want to own the front end, and it is the wrong tool if you want a hosted platform.
Who is it for?
Adopt Lunar if your team already runs Laravel and you intend to build and host the storefront yourself, because the repository is a backend monorepo with an MIT licence and no hosted service behind it. Do not adopt it if you want a platform that also gives you a theme, a checkout page or a support contract, since the README states the storefront is yours to create.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly PHP, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What problem Lunar solves, and who it is actually for

The README opens with a comparison rather than a feature list: Lunar brings "functionality akin to Shopify and other e-commerce platforms to Laravel". Read that carefully. Shopify gives you a storefront, a checkout, a payment flow and a dashboard in one product. Lunar gives you the part underneath the storefront. Products, orders, staff members and the rest of the store state live in your Laravel application, and the README says you have "complete freedom to create your own storefront(s)".

That sentence is the entire audience definition. If you have a Laravel codebase, a front end you already like, and a reason to keep customer and order data inside your own database, Lunar is aimed at you. If you would rather not build a storefront at all, the same sentence tells you this is the wrong shelf. There is no theme, no checkout page and no hosted dashboard in the repository; the README describes a backend and stops there.

The monorepo layout: Core, Admin panel, and what each one owns

The repository is a monorepo, and the README names two packages inside it. Core is the foundation: "all the models, actions and utilities live" there, and the README states it is required by the admin hub. The Admin panel is built with Filament and is described as the interface for managing products, orders, staff members and similar records, extensible per store.

So the data flow is conventional Laravel. Your application depends on the core package, which owns the Eloquent models and the actions that mutate them. The admin package sits on top of core and gives non-developers a Filament UI over the same records. Your storefront, wherever it runs, talks to your application. Nothing in the README describes a separate service, a queue topology or an API layer that ships with the packages, so treat the boundary between storefront and backend as something you design rather than something Lunar hands you.

The top level of the repository backs this up: a packages/ directory, a monorepo-builder.php config, phpstan.neon.dist, phpunit.xml and pint.json. That is a PHP library workspace with static analysis and a test suite wired in, not an application skeleton.

Installing Lunar and getting to a first product

The README does not include install commands. It links to the v1.0 documentation at docs.lunarphp.com and the project site at lunarphp.com, and those are where setup steps live. What the repository does confirm is that this is a Composer package set with a monorepo-builder.php at the root, and that the default branch is 1.x. The composer.json at the repository root is the manifest the monorepo is built around, so any install starts from Composer; the documentation is the authority on the exact package names and versions.

Because the README gives no commands, there is nothing here to copy into a terminal. The one file the repository does expose at the root is composer.json, and it is worth reading before you install anything:

json
{
  "name": "lunarphp/lunar",
  "type": "library"
}

That is the shape of the manifest, not a published install recipe. For the actual steps, follow the v1.0 documentation link in the README; the README itself stops at pointing you there.

Once you are running, the admin panel is the fastest way to confirm the install. The README states the panel is built with Filament and that it manages products, orders and staff members, so creating a product there exercises the core models through the UI rather than through your own code. If the panel loads and a product saves, core and admin are wired correctly. If it does not, the problem is in your Laravel and Filament setup, not in your storefront, which you have not written yet.

One caveat on versions. The default branch is 1.x and the README points to v1.0 documentation, while the releases list shows 2.0.0-alpha.6 published on 2026-09-01 and 1.5.0 on 2026-08-26. Installing from the default branch and installing a 2.0 alpha are different decisions, and the documentation link in the README is the v1 line.

Where Lunar stops, and why that is a real cost

The honest limitation is the one the README advertises as a feature. "You have complete freedom to create your own storefront(s)" means every storefront concern is yours: routing, templates, cart UI, checkout pages, whatever rendering stack you prefer. A team comparing Lunar to a hosted platform is not comparing two backends. It is comparing a backend plus a storefront project against a backend plus a storefront that someone else already built and maintains.

The repository also does not document rollback. The README is a short orientation document: it lists the packages, links to v1.0 documentation, and points bug reports at GitHub issues and enhancements and feature requests at GitHub discussions. There is no migration-rollback guidance, no upgrade guide and no deprecation policy in the README itself. For a package that owns your orders table, that silence matters more than it would for a utility library, because schema changes on order and product tables are the kind you cannot simply reverse in production.

The version situation compounds this. With 2.0.0-alpha.6 out on 2026-09-01 while the README still points at v1.0 documentation, anyone evaluating Lunar has to decide deliberately whether to build on the 1.x line or on an alpha. The README does not make that choice for you.

Lunar against a hosted storefront platform

The natural alternative is a hosted platform of the kind the README itself invokes when it says Lunar brings functionality "akin to Shopify". The difference is not features, it is ownership of the running system. On a hosted platform you configure a store inside someone else's application, and the storefront, checkout and dashboard arrive as part of the product. With Lunar you run the application. Your Laravel deployment is the store, your database holds the products and orders, and the admin panel is a Filament package inside your own codebase that you can extend.

That trade is concrete in both directions. You gain control over the data model and the ability to extend the admin panel to fit your store, which the README calls out as a property of the admin package. You take on hosting, upgrades, backups and the storefront build. A hosted platform inverts all of that: less to run, less to change. If your team has no Laravel deployment, Lunar does not remove that requirement; it assumes it.

Maintenance, upgrades and the MIT licence

The repository is not archived, and the last push was on 2026-09-23. Releases are moving: 1.5.0 on 2026-08-26 and two 2.0 alphas in the weeks after, 2.0.0-alpha.5 on 2026-08-29 and 2.0.0-alpha.6 on 2026-09-01. Two release lines are being published at once, which is normal for a project preparing a major version, but it means your upgrade path depends on which line you start on.

Upgrade cost is the part the README does not address. There is no upgrade guide in the repository root, and the documentation link points at v1.0 only. Before adopting, look for the migration notes for the 1.x to 2.0 transition in the documentation rather than assuming they exist.

On licensing: Lunar is MIT-licensed, per both the README and the LICENSE.md file at the repository root. MIT is permissive and places few conditions on commercial use, but this is a description of the licence text, not legal advice. If your organisation has rules about open-source dependencies in commerce systems, run the licence past whoever handles that.

Editorial conclusion

Adopt Lunar if your team already runs Laravel and you intend to build and host the storefront yourself, because the repository is a backend monorepo with an MIT licence and no hosted service behind it. Do not adopt it if you want a platform that also gives you a theme, a checkout page or a support contract, since the README states the storefront is yours to create. Before committing, check which branch you are installing against: the default branch is 1.x while 2.0.0-alpha.6 was published on 2026-09-01, and the README points to v1.0 documentation only.

Frequently asked questions

What is Lunar for Laravel?

It is a set of Laravel packages that provide headless e-commerce backend functionality, described in the README as bringing functionality akin to Shopify and other e-commerce platforms to Laravel. The monorepo contains a core package with the models, actions and utilities, plus an admin panel built with Filament.

Does Lunar include a storefront?

No. The README states you have complete freedom to create your own storefronts, so the storefront is something you build. Lunar supplies the backend and an admin panel for managing products, orders and staff members.

How do I install Lunar?

The README does not list install commands; it links to the v1.0 documentation at docs.lunarphp.com, which is where the setup steps live. The repository is a Composer monorepo with a monorepo-builder.php at the root, and the default branch is 1.x.

What licence does Lunar use?

Lunar is open-sourced software licensed under the MIT license, according to the README, and the repository root contains a LICENSE.md file.

Official sources

  1. License: MIT
  2. lunarphp/lunar on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/lunarphp-lunar.svg)](https://hysenlabs.com/projects/lunarphp-lunar)