Project Liberty code application skeleton: application

v1.0.1 2024-03-26 00:59 UTC

This package is auto-updated.

Last update: 2024-04-26 01:08:03 UTC


README

Description

LibertyCode application skeleton application contains main components, to create and run basic application.

Requirement

  • Script language: PHP: version 7 || 8

Installation

  1. Requirement

  2. Command: Installation

    Several ways are possible:

  3. Command: Move in project root directory

     cd "<project_root_dir_path>"
    
  4. Command: External libraries installation

    Required only if not installed via composer.

     php composer.phar install
    
  5. Note

    • External libraries installation

      All external libraries are listed on composer file "/composer.json".

      Instruction are set for composer. It's possible to use any way, while all external libraries, listed on composer configuration, are installed and correctly configured, on module configuration file "/config/Module.".

Application structure

Configuration [compulsory]

Configuration directory contains all application configuration. PHP format is used. It's possible to set other available format (JSON, XML, YML, ...), in application bootstrap.

Elements

  • Application mode file

    Stores application modes available.

  • Module file

    Registers modules available in application.

Source [suggested]

Source directory contains all application source code, structured by modules.

Resource [suggested]

Resource directory contains all application front resources, like views, assets, ....

Bin [suggested]

Bin directory contains command line application and other command line executables.

Elements

  • Application file

    Application bootstrap for command line.

Web [suggested]

Web directory contains web application and other web accessible components.

Elements

  • Index file

    Application bootstrap for web.

Variable [suggested/compulsory, generated]

Variable directory contains all temporary and/or flexible components, generated by application.

Elements

  • Cache directories

    Used by caches for application, framework, view ...

  • Log directory

    Store logs.

Module structure

Module configuration [compulsory]

Module file contains module macro information.

Configuration [compulsory]

Configuration directory contains module configuration. By default the application configuration format is used. You can set other available format (JSON, XML, PHP, ...), in application configuration module file.

Elements

  • Parameters file ("/config/Param.")

    Stores module parameters, available in module.

  • Application parameters file ("/config/Param.")

    Stores application parameters, available in application.

  • Auto-loading file ("/config/Autoload.")

    Stores module auto-loading rules, available in application.

  • Dependency injection file ("/config/Di.")

    Stores module dependencies, available in application.

  • Register file ("/config/Register.")

    Stores module key-value pairs, available in application.

  • Events file ("/config/Event.")

    Stores module event, available in application.

  • HTTP routes file ("/config/RouteWeb.")

    Stores module web routes, available in application.

  • Command line routes file ("/config/RouteCommand.")

    Stores module command line routes, available in application.

  • Boot file ("/config/Boot.")

    Stores module bootstrap files, available in application.