In this page:
This document outlines a comprehensive approach to organizing your WebFiori application files, promoting both maintainability and adherence to best practices.
Public Directory (
public
):
assets
: Houses all static assets utilized by the application, including theme resources.
Application Directory (
app
, customizable)
app
, but you have the flexibility to personalize it using the
APP_DIR
constant.
Subdirectories within the Application Directory
apis
:
This directory houses web services controllers and service managers (also known as Web APIs).
commands
:
This directory accommodates custom-made command-line interface (CLI) commands.
config
:
This directory is responsible for storing application configuration files.
database
:
This directory encompasses classes related to database access and interaction.
entity
:
This directory houses classes representing the core entities of your system.
ini
:
This directory accommodates initialization classes for various aspects of the application, including privileges, background jobs, CLI commands, autoloading directories, and middleware.
routes
:
This subdirectory houses classes responsible for defining different types of routes within your application.
langs
:
This directory stores translation files for internationalization (i18n) support. You can create custom language classes here or extend existing ones.
middleware
:
This directory houses classes implementing middleware functionality. Middleware provides a layer to filter requests before routing occurs.
pages
:
This directory houses classes representing application pages and their components. This directory may also contain HTML template files (views).
tasks
:
This directory houses background jobs, which are code snippets scheduled to execute at specific times.
Framework Core and Libraries (
vendor
)
Theming (
themes
):
public/assets
.
public/assets
folder and leveraging a Content Delivery Network (CDN) to include them.
app
) to adhere to PSR-4 standards.
public/index.php
file using the
APP_DIR
constant.
APP_DIR
to
coolApp
will re-create configuration files at
coolApp/config
.
By adhering to this structure, you can establish a well-organized and maintainable application, fostering efficient collaboration and project scalability.
Previous: Installation
Next: Basic Usage