Application

index.php   .   .   .   .   .   .   .   Main Frontend entry point
cron.php    .   .   .   .   .   .   .   Crontab entry point
resize.php  .   .   .   .   .   .   .   Live resize thumbnails script
admin/
.   index.php   .   .   .   .   .   .   Admin entry point
api/
.   index.php   .   .   .   .   .   .   API entry point
core/   .   .   .   .   .   .   .   .   Core bundled modules
.   FCom/   .   .   .   .   .   .   .   Fulleron framework modules
.   Sellvana/   .   .   .   .   .   .   Sellvana platform modules
.   .   {Module}/

dlc/    .   .   .   .   .   .   .   .   Downloadable modules storage
.   {Vendor}/
.   .   {Module}/   .   .   .   .   .   Module Files (see the next section)

local/  .   .   .   .   .   .   .   .   Local modules storage
.   {Vendor}/
.   .   {Module}/

media/  .   .   .   .   .   .   .   .   Web accessible assets (images, documents)

storage/    .   .   .   .   .   .   .   Web protected, writable storage
.   config/     .   .   .   .   .   .   Configuration files
.   .   db.yml      .   .   .   .   .   DB settings
.   .   core.yml    .   .   .   .   .   Module run levels and debug levels per IP
.   .   local.yml   .   .   .   .   .   Local modules configuration
.   cache/  .   .   .   .   .   .   .   Cached files
.   .   haml/   .   .   .   .   .   .   HAML templates compiled PHP files
.   .   twig/   .   .   .   .   .   .   Twig templates compiled PHP files
.   logs/       .   .   .   .   .   .   Logs storage
.   .   debug.log   .   .   .   .   .   Debug messages
.   .   errors.log  .   .   .   .   .   Fulleron errors
.   .   exceptions.log  .   .   .   .   Fulleron and PHP exceptions

Module

{Vendor}/
.   {Module}/
.   .   manifest.yml    .   .   .   .   [1] Declaration of the module and its properties. This file is required.
.   .   Main.php    .   .   .   .   .   This class may contain common functionality of the module, used by all areas
.   .   Cron.php    .   .   .   .   .   Crontab routines
.   .   Migrate.php     .   .   .   .   [2] DB migration scripts
.   .   LICENSE     .   .   .   .   .   LICENSE text
.   .   README.md   .   .   .   .   .   Module expanded information

.   .   lib/    .   .   .   .   .   .   Store here any used 3rd party libraries
.   .   .   {3rdPartyLib}/

.   .   i18n/   .   .   .   .   .   .   Translation dictionaries
.   .   .   en_US.ini
.   .   .   de_DE.ini

.   .   Model/  .   .   .   .   .   .   Model classes
.   .   .   {ModelName}.php

.   .   View/   .   .   .   .   .   .   View classes, when special functionality required within a view
.   .   .   {ViewClass}.php

.   .   views/  .   .   .   .   .   .   View templates, which are used by all areas, usually for emails
.   .   .   email/  .   .   .   .   .   Template namespace
.   .   .   .   {email-view-name}.twig.html

.   .   Admin.php   .   .   .   .   .   Optional Admin bootstrap and admin helper methods
.   .   Admin/      .   .   .   .   .   Admin specific logic and assets
.   .   .   layout.yml  .   .   .   .   [3] Admin layout updates
.   .   .   views/  .   .   .   .   .   Admin templates
.   .   .   .   {module-namespace}/
.   .   .   .   .   {view-name}.haml
.   .   .   .   settings/   .   .   .   Admin Settings pages
.   .   .   .   .   {Vendor}_{Module}.haml
.   .   .   Controller.php  .   .   .   General admin Controller class
.   .   .   Controller/     .   .   .   For more specific features put your controllers here
.   .   .   .   {AdminFeature}.php
.   .   .   js/
.   .   .   jsx/
.   .   .   .   src/
.   .   .   .   build/
.   .   .   css/
.   .   .   img/

.   .   Frontend.php    .   .   .   .   Optional Frontend bootstrap and admin helper methods
.   .   Frontend/
.   .   .   layout.yml  .   .   .   .   [3] Frontend layout updates
.   .   .   views/
.   .   .   .   static/     .   .   .   Static page templates will proxy URL request to file structure
.   .   .   .   {module-namespace}/
.   .   .   .   .   {view-name}.twig.html
.   .   .   Controller.php
.   .   .   Controller/
.   .   .   .   {FrontendFeature}.php
.   .   .   js/
.   .   .   css/
.   .   .   img/

.   .   ApiServer.php   .   .   .   .   Optional ApiServer bootstrap and admin helper methods
.   .   ApiServer/
.   .   .   V1/
.   .   .   .   Controller/
.   .   .   .   .   {ApiFeature}.php
.   .   .   .   .   {ApiFeature}_spec.txt

.   .   Tests/
.   .   .   AllTests.php
.   .   .   Model/
.   .   .   .   {Feature}Test.php
  1. Manifest File
  2. Migration Scripts
  3. Layout File

Fulleron is built upon Buckyball library and inherently is not rigid in its structure or implementation. However, the following set of conventions is recommended for clean, uniform and maintainable application.

Primary goal: Achieve a maintainable balance between:

Abstract concepts

  • Separation of concerns: files should be separated by their role in app
  • Clear folder hierarchy: child entities should be under parent entities

Hardware related limitations

  • Storage speed/latency: more folders/files and deeper structure affect performance
  • CPU/Storage limitation: optimize use of bytecode caching

Immediate developer needs

  • Files should be intuitively found in folder structure
  • Number of files open in IDE should be minimized
  • Number of total files should be minimized (avoid “rice code”)
  • Reduce number of files with the same name (not an issue in some IDEs)
  • Ease of debugging (resolving development errors)
  • Some local configuration files should be shared between repo copies

Future maintenance and flexibility

  • Ease of refactoring (renaming/moving)
  • Ease of debugging (finding and resolving production errors)
  • Internal extensibility (adding new features within module)
  • External extensibility (adding/changing functionality from other modules)
  • Core and market module files should never be changed by developer

Configuration

Classes

DB Tables

Templates

Layouts

Javascript

CSS

comments powered by Disqus