This application is the code powering the Joomla! Framework website.
- PHP 7.0+
- PDO with MySQL support
- Composer
- Apache with mod_rewrite enabled
- If changing web assets, NPM is required
- Clone this repo on your web server
- Run the
composer install
command to install all dependencies - Copy
etc/config.dist.json
toetc/config.json
and configure your environment - Run
vendor/bin/phinx migrate
to set up the database - Run
npm install
to install dependencies - Run
npm run prod
to compile assets (SCSS, JS) for production
The web assets (CSS, JavaScript, and images) are compiled and processed with Laravel Mix which is a wrapper around webpack. The primary source for all assets is the assets
directory, running Mix will place production assets into the www/media
directory.
The use of Mix requires NPM as hinted at in the Installation section. NPM 5+ and Node 8+ are suggested. Three scripts are available:
npm run prod
will compile assets for production, which includes compression and minification; code must be committed to this repository with the production configurationnpm run dev
will compile the assets without production optimizationsnpm run watch
is the same as thedev
script but with the--watch
flag passed
The database schema is managed through Phinx. The phinx.php
file at the root of this repo configures the Phinx environment. Please see their documentation for more information.
The application's configuration is defined as follows:
- Database - The
joomla/database
package is used to provide a database connection as requireddatabase.driver
- Defines the active driver, must bemysql
database.host
- The address of the database serverdatabase.user
- The user to connect to the database asdatabase.password
- The password for the database userdatabase.name
- The name of the database to usedatabase.prefix
- The prefix to use for the database's tables
- Template - The
twig/twig
package is used for the application's templatestemplate.debug
- Flag to enable Twig's debug functionality, when enabled the caching functionality is not availabletemplate.cache.enabled
- Flag to enable Twig's caching functionalitytemplate.cache.path
- The path relative to the repo root where cached Twig files should be stored
- Analytics - The API of this site supports sending basic data to Google Analytics
analytics.enabled
- Flag to enable this featureanalytics.account
- The UA code of the Analytics account to send data to
- Router - The
joomla/router
package is used to handle the application's routingrouter.cache
- Flag to enable the use of a compiled router file
- Logging - The
monolog/monolog
package is used for logging functionalitylog.level
- The default logging level to use for all application loggers, this defaults to theERROR
levellog.application
- The logging level to use specifically for themonolog.handler.application
logger; defaults to thelog.level
value
- Error Reporting - The
errorReporting
configuration key can be set to a valid bitmask to be passed into theerror_reporting()
function - Debug - The
debug
key allows enabling the application's debug mode, this also makes the PHP Debug Bar available