PAM Folder Structure

I'm working on a new PHP, ANGULAR, and MONGODB platform and CMS called PAM. I'd like to share the folder structure as an example of a skeleton for a node project.

The idea behind PAM's folder structure is to limit the user to a confined zone. The user only has to worry about the config and themes folder. The red folders below are the core folders and should never be touched. The green folders are handled by automation and do not require users to manually change the contents.

This structure works well for a front facing site, but lacks the source files of similar setups I've done in the past. I've come up with this structure for PAM to keep things simple for the end user. PAM's codebase is powered with Bower, Composer and Node. GULP is used to automate all the config files of those programs so you don't have to spend a lot of time installing modules.

Bower Based Theming

Front end packages that you will need for themes will be done via bower. PAM automatically minifies and concatenate into one js/css file. This means less time writing code. PAM does use CDN to get Angular, Bootstrap and jQuery to take advantage of the cross site cache these files provide.

a bower.json file should be all you need to install everything your theme needs to function. By using GULP and Bower, we remove the need for more custom code and automate much of the process of adding front end files to your project.

core

And of course, all the red folders are core files that the user should never have to touch. Limiting the users to confined spaces within the file system... is always a good idea.

  • app
    • assets
      • css
      • fonts
      • js
      • img
    • plugins
    • uploads
    • themes
      • pam_default
        • bower_components
    • main
  • node_modules
  • config
  • core
  • vendor

, , , , ,