Initial stages of MVP, is the bootstrap file efficient coding I am attempting to put my new OOP skills to the test and am eventually going to build a simple OOP login/registration system.

However as I am making use of OOP I have decided to make my own simple MVC.

Here is my layout of my directory

root-directory/
   .htaccess
   app/
      Config/
      Controllers/
      Models/
      Views/
      Lib/
        Vendor/
        composer.json
      bootstrap/
         app.php
   public/
      assets/
        js/
        css/
        img/
      index.php
      .htaccess


I have my app file in the Bootstrap folder I have written my code in a manor so it checks if the _GET super variable has anything in it, if it doesn't then set the $this-&gt;controller = 'home' and set the $this-&gt;method = 'index'

Here is my Bootstrap/app.php file

&lt;?php

namespace App\Bootstrap;

require __DIR__ . '/../Lib/vendor/autoload.php';

class App
{

    private $controller;
    private $method;
    private $requests;

    public function __construct($requests)
    {
        $this-&gt;requests = $requests;

        $this-&gt;requests = $this-&gt;requests['PATH_INFO'];

        $this-&gt;requests = explode('/',$this-&gt;requests);

        if ($this-&gt;requests[0] == '')) {

            $this-&gt;controller = 'home';

        } else {

            $this-&gt;controller = $this-&gt;requests[0];

        }



        if ($this-&gt;requests[1] == '' ) {

            $this-&gt;method = 'index';

        } else {

            $this-&gt;method = $this-&gt;requests[1];

        }

        echo $this-&gt;controller;
        echo '&lt;br/&gt;';
        echo '&lt;br/&gt;';
        echo $this-&gt;method;

        die();

    }
}


Here is my index.php file

&lt;?php
error_reporting(E_ALL);
ini_set('display_errors',1);

require __DIR__ . '/../app/Bootstrap/app.php';

$b = new \App\Bootstrap\App($_GET);


Here is my .htaccess file

&lt;IfModule mod_rewrite.c&gt;
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?PATH_INFO=$1 [L,QSA]

&lt;/IfModule&gt;


Is this a correct way of starting this project? As my next step would be to create a base controller and then link the url to the controller.

If this is not a correct/appropriate coding manor for OOP would a good correction include changing the RewriteRule to include to variables for the controller and method.
You can add another folder named libraries inside of app.
Follow a particular case convention. Like don't have config (all small) and other folders with first letter capitalized. Either all small or all first letter capitalized.
Add a language folder within app. That will store your language strings within each language folder. For example, you can have a language/english folder &amp; similarly for other languages.


I like that you have separated the public folder.