dystcz/lunar-api

0.8.10 2024-04-18 09:18 UTC

This package is auto-updated.

Last update: 2024-04-18 09:19:51 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

What's going on here?

This package introduces an API layer for the Lunar ecommerce package. It connects the Lunar backend with your SPA, other applications, and possibly with a mobile app.

The main aim is to provide a solid foundation for your e-commerce project, giving you a head start while maintaining flexibility so you can easily build features to meet your project's needs.

Some perks

Feature set

  • Configurable checkout flow with guest checkout
  • Solid extensibility (Models, Schemas, Resources, Routes, ...)
  • Payment adapters registrar (currently Stripe & Mollie)

Work in progress 🚧

  • Documentation Wiki
  • Vitepress documentation
  • Better test coverage
  • Paypal payment adapter
  • Custom model filters
  • Composable products (good for configurators)
  • Purchasable payment options
  • HashIds

Planned 🕛

  • Automated Open API documentation
  • Authentication flow (currently has to be implemented in the main app)
  • More streamlined configuration

Feature requests and ideas 💡

Got an idea? Share it in a dicussion or create an issue.

Getting started guide

Requirements

Installation

You can install the package via composer

composer require dystcz/lunar-api

Publish config files

You will probably need them pretty bad

php artisan vendor:publish --provider="Dystcz\LunarApi\LunarApiServiceProvider" --tag="lunar-api"

Publish migrations

Only in case you want to customize the database schema

php artisan vendor:publish --provider="Dystcz\LunarApi\LunarApiServiceProvider" --tag="lunar-api.migrations"

Let's hit your first endpoint

Just visit /api/v1/products and you should see a list of products.

Hopefully everything went smooth so far. If not, please create an issue.

You can view the rest of the API routes by running php artisan route:list --name=v1 in your terminal.

Useful resource

Testing

composer test

Lunar API compatible packages

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email dev@dy.st instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.