Index: src/webapp/apigility/module/Application/config/module.config.php
===================================================================
--- src/webapp/apigility/module/Application/config/module.config.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/config/module.config.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace Application;
+
+use Zend\ServiceManager\Factory\InvokableFactory;
+
+return [
+    'router' => [
+        'routes' => [
+            'home' => [
+                'type' => 'Literal',
+                'options' => [
+                    'route'    => '/',
+                    'defaults' => [
+                        'controller' => Controller\IndexController::class,
+                        'action'     => 'index',
+                    ],
+                ],
+            ],
+        ],
+    ],
+    'controllers' => [
+        'factories' => [
+            Controller\IndexController::class => InvokableFactory::class,
+        ],
+    ],
+    'view_manager' => [
+        'display_not_found_reason' => true,
+        'display_exceptions'       => true,
+        'doctype'                  => 'HTML5',
+        'not_found_template'       => 'error/404',
+        'exception_template'       => 'error/index',
+        'template_map' => [
+            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
+            'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
+            'error/404'               => __DIR__ . '/../view/error/404.phtml',
+            'error/index'             => __DIR__ . '/../view/error/index.phtml',
+        ],
+        'template_path_stack' => [
+            __DIR__ . '/../view',
+        ],
+    ],
+];
Index: src/webapp/apigility/module/Application/src/Controller/IndexController.php
===================================================================
--- src/webapp/apigility/module/Application/src/Controller/IndexController.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/src/Controller/IndexController.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace Application\Controller;
+
+use Zend\Mvc\Controller\AbstractActionController;
+use Zend\View\Model\ViewModel;
+use ZF\Apigility\Admin\Module as AdminModule;
+
+class IndexController extends AbstractActionController
+{
+    public function indexAction()
+    {
+        if (class_exists(AdminModule::class, false)) {
+            return $this->redirect()->toRoute('zf-apigility/ui');
+        }
+        return new ViewModel();
+    }
+}
Index: src/webapp/apigility/module/Application/src/Module.php
===================================================================
--- src/webapp/apigility/module/Application/src/Module.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/src/Module.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace Application;
+
+class Module
+{
+    public function getConfig()
+    {
+        return include __DIR__ . '/../config/module.config.php';
+    }
+}
Index: src/webapp/apigility/module/Application/test/Controller/IndexControllerTest.php
===================================================================
--- src/webapp/apigility/module/Application/test/Controller/IndexControllerTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/test/Controller/IndexControllerTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace ApplicationTest\Controller;
+
+use Application\Controller\IndexController;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
+
+class IndexControllerTest extends AbstractHttpControllerTestCase
+{
+    public function setUp()
+    {
+        // The module configuration should still be applicable for tests.
+        // You can override configuration here with test case specific values,
+        // such as sample view templates, path stacks, module_listener_options,
+        // etc.
+        $configOverrides = [
+            'module_listener_options' => [
+                'config_cache_enabled' => false,
+            ],
+        ];
+
+        $this->setApplicationConfig(ArrayUtils::merge(
+            include __DIR__ . '/../../../../config/application.config.php',
+            $configOverrides
+        ));
+
+        parent::setUp();
+    }
+
+    public function testIndexActionCanBeAccessed()
+    {
+        $this->dispatch('/', 'GET');
+        $this->assertResponseStatusCode(200);
+        $this->assertModuleName('application');
+        $this->assertControllerName(IndexController::class); // as specified in router's controller name alias
+        $this->assertControllerClass('IndexController');
+        $this->assertMatchedRouteName('home');
+    }
+
+    public function testIndexActionViewModelTemplateRenderedWithinLayout()
+    {
+        $this->dispatch('/', 'GET');
+        $this->assertQuery('.hero-unit');
+    }
+
+    public function testInvalidRouteDoesNotCrash()
+    {
+        $this->dispatch('/invalid/route', 'GET');
+        $this->assertResponseStatusCode(404);
+    }
+}
Index: src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php
===================================================================
--- src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,54 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace ApplicationTest\Controller;
+
+use Application\Controller\IndexController;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
+
+/**
+ * Name is intentional, to force it to run last; this was necessary as,
+ * once the Admin module is loaded, the controller is able to find it and
+ * will attempt the redirect.
+ */
+class ZZIndexControllerDevModeTest extends AbstractHttpControllerTestCase
+{
+    public function setUp()
+    {
+        // The module configuration should still be applicable for tests.
+        // You can override configuration here with test case specific values,
+        // such as sample view templates, path stacks, module_listener_options,
+        // etc.
+        $configOverrides = [
+            'modules' => [
+                'ZF\Apigility\Admin',
+                'ZF\Apigility\Admin\Ui',
+            ],
+            'module_listener_options' => [
+                'config_cache_enabled' => false,
+                'config_glob_paths' => [
+                    __DIR__ . '/../../../../config/autoload/{,*.}{global,local}.php',
+                    __DIR__ . '/../../../../config/autoload/{,*.}{global,local}-development.php',
+                ],
+            ]
+        ];
+
+        $this->setApplicationConfig(ArrayUtils::merge(
+            include __DIR__ . '/../../../../config/application.config.php',
+            $configOverrides
+        ));
+
+        parent::setUp();
+    }
+
+    public function testIndexActionRedirectsToAdminUi()
+    {
+        $this->dispatch('/', 'GET');
+        $this->assertResponseStatusCode(302);
+        $this->assertRedirectRegex('#/ui$#');
+    }
+}
Index: src/webapp/apigility/module/Application/view/application/index/index.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/application/index/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/application/index/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,11 @@
+<div class="hero-unit">
+    <p align="center"><img src="/img/ag-hero.png" alt="Apigility <?= \Apigility\VERSION ?>"></p>
+</div>
+<div class="row">
+    <div class="span8">
+        <p><br /><br />In order to use the <strong>Apigility Admin UI</strong> you need to enable the <strong>development</strong> mode. Currently your application is running in <strong>production</strong> mode.</p>
+        <p>To enable the development mode you can execute the following command from the terminal:</p>
+        <p><pre>$ composer development-enable</pre></p>
+        <p>Remember to set always the production mode if you want to deploy your API in a staging/production environment.</p>
+    </div>
+</div>
Index: src/webapp/apigility/module/Application/view/error/404.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/error/404.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/error/404.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,108 @@
+<?php
+use Zend\Mvc\Application;
+?>
+<h1>A 404 error occurred</h1>
+<h2><?= $this->message ?></h2>
+
+<?php
+if (! empty($this->reason)) :
+    $reasonMessage = '';
+    switch ($this->reason) {
+        case Application::ERROR_CONTROLLER_CANNOT_DISPATCH:
+            $reasonMessage = 'The requested controller was unable to dispatch the request.';
+            break;
+        case Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:
+            $reasonMessage = 'The requested middleware was unable to dispatch the request.';
+            break;
+        case Application::ERROR_CONTROLLER_NOT_FOUND:
+            $reasonMessage = 'The requested controller could not be mapped to an existing controller class.';
+            break;
+        case Application::ERROR_CONTROLLER_INVALID:
+            $reasonMessage = 'The requested controller was not dispatchable.';
+            break;
+        case Application::ERROR_ROUTER_NO_MATCH:
+            $reasonMessage = 'The requested URL could not be matched by routing.';
+            break;
+        default:
+            $reasonMessage = 'We cannot determine at this time why a 404 was generated.';
+            break;
+    }
+?>
+
+<p><?= $reasonMessage ?></p>
+
+<?php endif ?>
+
+<?php if (! empty($this->controller)) : ?>
+
+<dl>
+    <dt>Controller:</dt>
+    <dd><?= $this->escapeHtml($this->controller) ?>
+    <?php
+    if (! empty($this->controller_class)
+        && $this->controller_class != $this->controller
+    ) {
+        echo sprintf('(resolves to %s)', $this->escapeHtml($this->controller_class));
+    }
+    ?>
+</dd>
+</dl>
+
+<?php endif ?>
+
+<?php if (! empty($this->display_exceptions)) : ?>
+
+    <?php if (isset($this->exception)
+        && ($this->exception instanceof \Throwable || $this->exception instanceof \Exception)) : ?>
+<hr/>
+<h2>Additional information:</h2>
+<h3><?= get_class($this->exception) ?></h3>
+<dl>
+    <dt>File:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
+    </dd>
+    <dt>Message:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
+    </dd>
+    <dt>Stack trace:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getTraceAsString() ?></pre>
+    </dd>
+</dl>
+        <?php $e = $this->exception->getPrevious() ?>
+        <?php if ($e) : ?>
+<hr/>
+<h2>Previous exceptions:</h2>
+<ul class="unstyled">
+            <?php while ($e) : ?>
+    <li>
+        <h3><?= get_class($e) ?></h3>
+        <dl>
+            <dt>File:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>
+            </dd>
+            <dt>Message:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $this->escapeHtml($e->getMessage()) ?></pre>
+            </dd>
+            <dt>Stack trace:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getTraceAsString() ?></pre>
+            </dd>
+        </dl>
+    </li>
+                <?php $e = $e->getPrevious() ?>
+            <?php endwhile ?>
+</ul>
+        <?php endif ?>
+
+    <?php else : ?>
+
+<h3>No Exception available</h3>
+
+    <?php endif ?>
+
+<?php endif ?>
Index: src/webapp/apigility/module/Application/view/error/index.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/error/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/error/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,59 @@
+<h1>An error occurred</h1>
+<h2><?= $this->message ?></h2>
+
+<?php if (! empty($this->display_exceptions)) : ?>
+
+    <?php if (isset($this->exception)
+        && ($this->exception instanceof \Throwable || $this->exception instanceof \Exception)) : ?>
+<hr/>
+<h2>Additional information:</h2>
+<h3><?= get_class($this->exception) ?></h3>
+<dl>
+    <dt>File:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
+    </dd>
+    <dt>Message:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
+    </dd>
+    <dt>Stack trace:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getTraceAsString() ?></pre>
+    </dd>
+</dl>
+        <?php $e = $this->exception->getPrevious() ?>
+        <?php if ($e) : ?>
+<hr/>
+<h2>Previous exceptions:</h2>
+<ul class="unstyled">
+            <?php while ($e) : ?>
+    <li>
+        <h3><?= get_class($e); ?></h3>
+        <dl>
+            <dt>File:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>
+            </dd>
+            <dt>Message:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $this->escapeHtml($e->getMessage()) ?></pre>
+            </dd>
+            <dt>Stack trace:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getTraceAsString() ?></pre>
+            </dd>
+        </dl>
+    </li>
+                <?php $e = $e->getPrevious() ?>
+            <?php endwhile ?>
+</ul>
+        <?php endif ?>
+
+    <?php else : ?>
+
+<h3>No Exception available</h3>
+
+    <?php endif ?>
+
+<?php endif ?>
Index: src/webapp/apigility/module/Application/view/layout/layout.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/layout/layout.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/layout/layout.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,42 @@
+<?= $this->doctype() ?>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+<?php
+echo $this->headTitle('Apigility');
+
+echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0');
+
+echo $this->headLink(['rel' => 'icon', 'type' => 'image/png', 'href' => $this->basePath('/img/favicon.png')])
+    ->prependStylesheet($this->basePath('/zf-apigility/css/main.min.css'))
+    ->prependStylesheet($this->basePath('/zf-apigility/css/bootstrap.min.css'));
+
+echo $this->headScript()
+    ->prependFile($this->basePath('/zf-apigility/js/bootstrap.min.js'))
+    ->prependFile($this->basePath('/zf-apigility/js/jquery.min.js'));
+?>
+</head>
+<body>
+    <div class="container">
+        <?= $this->content ?>
+    </div>
+    <footer>
+        <hr>
+        <div class="container center-block"><div class="row">
+            <div class="col-sm-4">
+                &copy; Copyright 2013 - <?= date('Y') ?>
+                by <a href="http://www.zend.com">Zend Technologies</a> Ltd.
+            </div>
+
+            <div class="col-sm-4"><p class="center-block">
+                Apigility version <strong><?= \Apigility\VERSION ?></strong>
+            </p></div>
+
+            <div class="col-sm-4"><p class="pull-right">
+                For more information <a href="https://apigility.org">apigility.org</a>
+            </p></div>
+        </div></div>
+    </footer>
+    <?= $this->inlineScript() ?>
+</body>
+</html>
