- $ git clone https://github.com/itmsh/simple-ecommerce.git
- cd simple-ecommerce
- composer install
- config your ElasticSearch server in this file: ./config/packages/fos_elastica.yaml
- config your Redis server in this file: ./config/packages/framework.yaml
- $ php bin/console doctrine:migrations:migrate
- $ php bin/console doctrine:fixtures:load
-
To get all product
GET /products/
-
To Create a new product
POST /products title={title}&description={description}
-
To Edit product
PUT /products/{productId} title={title}&description={description}
-
To remove product
DELETE /products/{productId}
-
To get all product variants
GET /products/{productId}/variants
-
To Create a new product variants
POST /products{productId} color={color}&price={price}
-
To Edit product variants
PUT /products/{productId}/variants/{variantsId} color={color}&price={price}
-
To remove product variants
DELETE /products/{productId}/variants/{variantsId}
-
To Create a new user
POST /users username={username}&password={password}&email={email}
Just a very simple ecommerce example using Redis, ElasticSearch and Symfony using following bundls:
- FOSRestBundle / JMSSerializerBundle
- DoctrineBundle
- FOSElasticaBundle
- SecurityBundle