[next >>](2-composer.md) ### Front Controller A [front controller](http://en.wikipedia.org/wiki/Front_Controller_pattern) is a single point of entry for your application. To start, create an empty directory for your project. You also need an entry point where all requests will go to. This means you will have to create an `index.php` file. A common way to do this is to just put the `index.php` in the root folder of the projects. This is also how some frameworks do it. Let me explain why you should not do this. The `index.php` is the starting point, so it has to be inside the web server directory. This means that the web server has access to all subdirectories. If you set things up properly, you can still prevent it from accessing your subfolders where your application files are. But sometimes things don't go according to plan. And if something goes wrong and your files are set up as above, your whole application source code could be exposed to visitors. I won't have to explain why this is not a good thing. So instead of doing that, create a folder in your project folder called `public`. This is a good time to create an `src` folder for your application, also in the project root folder. Inside the `public` folder you can now create your `index.php`. Remember that you don't want to expose anything here, so put just the following code in there: ``` >](2-composer.md)