Biscuit Link has a folder structure that has been designed in a way to organise your PHP projects from the start. Inspired by many other famous PHP frameworks, with its own twist.
The following is the main folder structure for Biscuit Link, we will be discussing each folder and its importance to the framework individually.
(root) |-- app/ |-- classes/ |-- controllers/ |-- elements/ |-- public/ |-- assets/ |-- templates/ |-- elements/ |-- markdown/
app/ folder is where the main application files can be found. This is what makes your web application run. However, the serving of the pages are done through the
public/index.php file (see below).
In this folder you will find the following files:
Controllerclass, which are found in
This folder is where your classes (excluding controllers and elements) go. Biscuit Link already comes with some classes built-in.
This folder is where you should include your controllers. You can find a
DefaultController class in this folder, which you can use for reference on making your own.
app/routes.php file which is what calls these controllers.
This folder includes your elements.
Element templates are also included in
templates/elements where the Smarty templates are stored.
index.php file is found.
Your web server looks at the
index.php file when serving a file to your users. A favicon is already provided to you, please replace it with your own.
You are also recommended to place your
robots.txt file here for SEO purposes.
This folder is optional, however, you are advised to place your application's assets inside this folder for organisation purposes.
A file would normally be accessed by
example.com/assets/file.css for a file named
styles.css placed in the
This folder is where the
Template class fetches your Smarty template files.
You are advised to keep this folder organised as much as possible.
templates/elements/ is already created where your Element templates should be placed.
A special folder
templates/markdown/ is used by the
.md files should be placed under this folder. They can be also placed in sub-folders.
To be continued...