A Karma-Shop is a simple shop using Symfony (REST API) and React (from [free template](https://colorlib.com/wp/template/karma/). )
This project was created for training my skills. Please don't use this project for production.
To clone and run this application, you'll need Git, yarn and Redis installed on your computer. If u wanna use docker, you don't need this few packages installed on your computer.
# Clone this repository
$ git clone https://github.com/Glancu/Karma-Shop karma-shop
# Go into the repository
$ cd karma-shop
# .env from .env.dist
Create .env file from .env.dist and update DATABASE_URL variable
$ cp .env.dist .env
# Install packages for frontend
$ cd frontend/
$ yarn install
# Install packages to build view
$ yarn install
# Build view
$ yarn build
# Install symfony dependencies
$ composer install
# Create database
$ php bin/console doctrine:database:create
# Generate database structure
$ php bin/console doctrine:schema:update --force
# Load fixtures
$ php bin/console doctrine:fixtures:load
# Run tests
$ php ./vendor/bin/phpunit
# Install assets
$ php bin/console assets:install
# Install CKEditor assets
$ php bin/console ckeditor:install
For this project I used symfony messenger for mails. If you want automatic consume messages, you can use supervisor. In config/messenger-worker.conf you have configuration file for supervisor.
If you don't want use supervisor, you can run this command and consume messages from command lines.
$ php bin/console messenger:consume
# Remove expired jwt tokens
$ php bin/console gesdinet:jwt:clear
# Edit frontend live
$ yarn watch
# Create another admin account (for admin panel)
$ php bin/console app:create-admin-account
# Update .css from .scss files (in frontend folder)
$ cd frontend
$ sass public/assets/scss/main.scss public/assets/css/main.css
If you want to use docker, you can run localhost:8600 for website and localhost:8601 for phpmyadmin (login and password root). But you must run this command, to run containers
$ cd docker/
$ docker-compose up -d
If you want to clear redis cache:
$ php bin/console app:redis:flushall
If you want check api links, you can go /api/doc.
Go to /admin for visit admin panel.
Login: admin
Password: admin1
MIT