Open source framework for PHP & MySQL

Downloads Page

Directory Structure

/nicotine/ folder contains framework files, 99% cases you don't need to edit them.

Check /nicotine/ContentTypes.php if you want to use custom content types, e.g. video, for Admin area.

/public/ folder it is basically the entry point of the HTTP requests. It contains public static files.

/workspace/ it is your working workspace.

/config.php holds the configuration of your project.

/.gitignore holds the directories and filed which should be ignored by the Git. Because /config.php is related to each developer or server which could require different configuration, the file is gitignored.

/workspace/ it is divided into subfolders as follows:

/workspace/admin/ contains back application administration. /workspace/site/ contains front site. They looks similar, but admin folder has more components with extra security layers.

/workspace/api/ contains support for APIs, if needed. Any HTTP request into /api endpoint is correlated with this folder.

/workspace/cli/ contains support for CLI scripts. It is divided into crons/ and scripts/

The main difference between scripts and crons is that crons runs periodically, whereas scripts are executed when you need, e.g. once, from the command line.

/workspace/db/ is reserved for database queries.

/workspace/sessions/ is the session save path.

/workspace/admin/static/ is somehow similar to /public/. It contains static files for Admin area, but you need to be authenticated no matter what role, in order that script can access these resources. This is a security measure, so that a front user cannot see Admin resources. Nicotine supports different resources, e.g. .css, .js, so on. If you plan to add support for video for example, please edit /nicotine/ContentTypes.php and add more resource types there.