diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 93821ad1c..000000000
--- a/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/app/config/parameters.yml
-/build/
-/phpunit.xml
-/var/*
-!/var/cache
-/var/cache/*
-!var/cache/.gitkeep
-!/var/logs
-/var/logs/*
-!var/logs/.gitkeep
-!/var/sessions
-/var/sessions/*
-!var/sessions/.gitkeep
-!var/SymfonyRequirements.php
-/vendor/
-/web/bundles/
diff --git a/.travis.yml b/.travis.yml
index 731d213eb..a780db0d2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,42 @@
sudo: required
services:
- - docker
+ - docker
+
+cache:
+ yarn: true
+ directories:
+ - admin/node_modules
+ - client/node_modules
+
+before_script:
+ - sudo service mysql stop
+ - sudo service postgresql stop
+ - wget https://kubernetes-helm.storage.googleapis.com/helm-v2.6.1-linux-amd64.tar.gz
+ - tar xzf helm-v2.6.1-linux-amd64.tar.gz
+ - npm install -g react-scripts
+ - while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done
script:
- - docker-compose build
- - docker-compose run web composer install -o -n
- - docker-compose run web bin/console security:check
- - docker-compose run web bin/console doctrine:schema:validate --skip-sync
- - docker-compose up -d
- - docker-compose run web bin/console doctrine:schema:create
- - docker-compose run web bin/console hautelook:fixtures:load -n
+ - docker-compose up -d
+ - linux-amd64/helm lint api/helm/api/
+ - sleep 20
+ - sh -c "cd admin && PUBLIC_URL="/api-demo-admin-test" yarn install && yarn build"
+ - sh -c "cd client && PUBLIC_URL="/api-demo-client-test" yarn install && yarn build"
+ - docker-compose exec php composer install -o -n
+ - docker-compose exec php bin/console security:check
+ - docker-compose exec php bin/console doctrine:schema:validate --skip-sync
+ - docker-compose exec php bin/console doctrine:schema:drop --force
+ - docker-compose exec php bin/console doctrine:schema:create
+ - docker-compose exec php bin/console hautelook:fixtures:load -n
+ - docker-compose exec php bin/console doctrine:schema:drop --env=test --force
+ - docker-compose exec php bin/console cache:warmup --env=test
+ - docker-compose exec php bin/behat
+ - curl http://localhost
+ - curl http://localhost:81
+ - curl http://localhost:8080
+ - curl http://localhost:8081
+ - curl -k https://localhost
+ - curl -k https://localhost:444
+ - curl -k https://localhost:8443
+ - curl -k https://localhost:8444
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index be4b8bd09..000000000
--- a/Dockerfile
+++ /dev/null
@@ -1,63 +0,0 @@
-FROM php:7.1-apache
-
-# PHP extensions
-ENV APCU_VERSION 5.1.7
-RUN buildDeps=" \
- libicu-dev \
- zlib1g-dev \
- " \
- && apt-get update \
- && apt-get install -y --no-install-recommends \
- $buildDeps \
- libicu52 \
- zlib1g \
- && rm -rf /var/lib/apt/lists/* \
- && docker-php-ext-install \
- intl \
- mbstring \
- pdo_mysql \
- zip \
- && apt-get purge -y --auto-remove $buildDeps
-RUN pecl install \
- apcu-$APCU_VERSION \
- && docker-php-ext-enable --ini-name 05-opcache.ini \
- opcache \
- && docker-php-ext-enable --ini-name 20-apcu.ini \
- apcu
-
-# Apache config
-RUN a2enmod rewrite
-ADD docker/apache/vhost.conf /etc/apache2/sites-available/000-default.conf
-
-# PHP config
-ADD docker/php/php.ini /usr/local/etc/php/php.ini
-
-# Install Git
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- git \
- && rm -rf /var/lib/apt/lists/*
-
-# Add the application
-ADD . /app
-WORKDIR /app
-
-# Fix permissions (useful if the host is Windows)
-RUN chmod +x docker/composer.sh docker/start.sh docker/apache/start_safe_perms
-
-# Install composer
-RUN ./docker/composer.sh \
- && mv composer.phar /usr/bin/composer \
- && composer global require "hirak/prestissimo:^0.3"
-
-RUN \
- # Remove var directory if it's accidentally included
- (rm -rf var || true) \
- # Create the var sub-directories
- && mkdir -p var/cache var/logs var/sessions \
- # Install dependencies
- && composer install --prefer-dist --no-scripts --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative \
- # Fixes permissions issues in non-dev mode
- && chown -R www-data . var/cache var/logs var/sessions
-
-CMD ["/app/docker/start.sh"]
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 2ca693961..01cf17b3e
--- a/README.md
+++ b/README.md
@@ -11,10 +11,11 @@ Installation (recommended)
$ git clone https://github.com/api-platform/demo.git
-
$ docker-compose up
```
+And go to https://localhost
+
Installation (manual)
=====================
@@ -22,9 +23,9 @@ Installation (manual)
$ git clone https://github.com/api-platform/demo.git
-$ composer install
+# Create a user and a database in PostgreSQL and enter the credentials into .env
-# Create a user and a database in MySQL and enter the credentials during composer install
+$ composer install
$ php bin/console doctrine:schema:update --force
```
\ No newline at end of file
diff --git a/admin/.dockerignore b/admin/.dockerignore
new file mode 100755
index 000000000..4534dd5d9
--- /dev/null
+++ b/admin/.dockerignore
@@ -0,0 +1,10 @@
+**/*.log
+**/._*
+**/.DS_Store
+**/.gitignore
+**/.gitattributes
+**/Thumbs.db
+**/*.md
+**/.dockerignore
+Dockerfile*
+.env*
diff --git a/admin/.env b/admin/.env
new file mode 100755
index 000000000..9d5249ead
--- /dev/null
+++ b/admin/.env
@@ -0,0 +1 @@
+REACT_APP_API_ENTRYPOINT=https://localhost:8443
diff --git a/admin/.gitignore b/admin/.gitignore
new file mode 100755
index 000000000..2785b0623
--- /dev/null
+++ b/admin/.gitignore
@@ -0,0 +1,20 @@
+# See https://help.github.com/ignore-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
diff --git a/admin/Dockerfile b/admin/Dockerfile
new file mode 100755
index 000000000..f2b675b3a
--- /dev/null
+++ b/admin/Dockerfile
@@ -0,0 +1,13 @@
+FROM node:9.4-alpine
+
+RUN mkdir -p /usr/src/admin
+
+WORKDIR /usr/src/admin
+
+# Prevent the reinstallation of node modules at every changes in the source code
+COPY package.json yarn.lock ./
+RUN yarn install
+
+COPY . ./
+
+CMD yarn start
diff --git a/admin/README.md b/admin/README.md
new file mode 100755
index 000000000..c55ccdf94
--- /dev/null
+++ b/admin/README.md
@@ -0,0 +1,2164 @@
+This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
+
+Below you will find some information on how to perform common tasks.
+You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
+
+## Table of Contents
+
+- [Updating to New Releases](#updating-to-new-releases)
+- [Sending Feedback](#sending-feedback)
+- [Folder Structure](#folder-structure)
+- [Available Scripts](#available-scripts)
+ - [npm start](#npm-start)
+ - [npm test](#npm-test)
+ - [npm run build](#npm-run-build)
+ - [npm run eject](#npm-run-eject)
+- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills)
+- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
+- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
+- [Debugging in the Editor](#debugging-in-the-editor)
+- [Formatting Code Automatically](#formatting-code-automatically)
+- [Changing the Page `