avored / laravel-ecommerce
The AvoRed Ecommerce App
Fund package maintenance!
Open Collective
Installs: 10 093
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1 513
Watchers: 105
Forks: 549
Open Issues: 59
Language:TypeScript
Type:project
Requires
- php: >=7.3
- avored/banner: ^2.4
- avored/framework: ~3.2
- darkghosthunter/rememberable-query: ^1.1
- fideloper/proxy: ^4.0
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.3
- beyondcode/laravel-dump-server: ^1.0
- deployer/deployer: ^6.8
- facade/ignition: ^1.4
- fzaninotto/faker: ^1.4
- laravel/dusk: ^6.4
- mockery/mockery: ^1.0
- nunomaduro/collision: ^3.0
- phpunit/phpunit: ^8.0
- 3.34
- 3.30.1
- 3.30
- 3.12
- 3.05
- 3.3
- 3.2.17
- 3.2.16
- 3.2.15
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2
- 3.1.1
- 3.1.0
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-beta.6
- 3.0.0-beta-3
- 3.0.0-beta.1
- 3.0.0-alpha.5
- 3.0.0-alpha.3
- 3.0.0-alpha.2
- 3.0.0-alpha.1
- 2.9.8.8
- 2.9.8.7
- 2.9.8.6
- 2.9.8
- 2.9.7
- 2.9.6.8
- 2.9.6
- 2.9.5.8
- 2.9.5.7
- 2.9.5.6
- 2.9.5.1
- 2.9.5
- 2.9.4
- 2.9.3
- 2.9.2
- 2.9.1
- 2.9
- 2.7.2
- 2.7.1.1
- 2.7.1
- 2.7
- 2.6.1
- 2.6
- 2.5.5
- 2.5
- 2.4
- 2.3.2
- 2.3.1
- 2.3
- 2.2.7
- 2.2.2
- 2.2.1
- 2.1
- 2.0
- 1.9
- 1.8
- 1.7
- 1.6
- 1.5
- 1.4
- 1.3
- 1.2
- 1.1
- 1.0
- 0.9
- 0.8
- 0.7
- 0.6
- 0.5.1
- 0.5
- 0.2.1
- 0.2
- 0.1.0
- dev-dependabot/npm_and_yarn/modules/avored/review/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/modules/avored/cash-on-delivery/elliptic-6.5.4
- dev-issue-502
This package is auto-updated.
Last update: 2024-10-30 01:59:29 UTC
README
AvoRed an laravel headless e commerce
A headless e commerce GraphQL API which uses Laravel as a backend.
Installation
Backend APP setup
First thing first we will install laravel backend api service. First thing first we will install the laravel app.
composer create-project laravel/laravel avored-backend
cd avored-backend
composer require avored/framework
composer require avored/dummy-data
composer require avored/cash-on-delivery
composer require avored/pickup
Set up your .env values and CORS
To fixed the CORS in your laravel8 app. You can open config/cors.php
and replace the code like below in the file.
'allowed_origins' => ['http://localhost:8080'],
Once the .env setup is done then we can install the AvoRed E commerce
php artisan avored:install
php artisan vendor:publish --provider="AvoRed\Framework\AvoRedServiceProvider"
yoursite.com/graphiql
Once the avored/framework has been installed after that we will make sure we setup the CORS to allow access of an graphql api via any frontend.
Frontend APP Setup
git clone https://github.com/avored/laravel-ecommerce avored-frontend
cd avored-frontend
npm install
npm run serve
Installation via Docker
Execute the below command:
git clone https://github.com/avored/docker-dev.git
cd docker-dev
git clone https://github.com/avored/laravel-ecommerce ./src/frontend
docker-compose up -d
docker-compose run --rm composer create-project laravel/laravel:8.6 ./
docker-compose run --rm composer require avored/framework
docker-compose run --rm composer require avored/dummy-data avored/cash-on-delivery avored/pickup
Now setup .env
file. Open a avored app .env file which is located at ./src/backend/.env
then setup your database and any other env as per your docker-compose.yml file
DB_HOST=mysql
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Now we just have to install the AvoRed and create an avored admin user account
docker-compose run --rm artisan avored:install
docker-compose run --rm artisan vendor:publish --provider="AvoRed\Framework\AvoRedServiceProvider"
Now we need to setup CORS so frontend application can receive api call from backnd.
Open ./src/backend/config/cors.php
then replace the below line
'paths' => ['/graphql', 'sanctum/csrf-cookie'],
'allowed_origins' => ['http://localhost:8060'],
That's It. Now you can visit http://localhost:8060
for frontend and for backend you can visit http://localhost:8050/admin