# Module Basics

# Getting Started

In this guide, we follow Joomla's Creating a simple module/Developing a Basic Module (opens new window) steps to create the module structure.

The source code of the module can be found in this repository: https://github.com/PHP-Prefixer/hello-joomla-world (opens new window)

# The Composer Schema of the Joomla Module

In this version of the Hello World Module, the module shows the date and hour before the "Hello, World!" message. To do this, the module calls on the Carbon (opens new window) library, a dependency of the Laravel illuminate/support (opens new window) library.

The module has the following composer.json to declare the project, the illuminate/support library, and the prefixer service configuration:

{
    "name": "php-prefixer/hello-prefixed-world-for-joomla",
    "description": "Hello Prefixed World module for Joomla. A module to showcase the PHP-Prefixer service. Install any library freely. PHP-Prefixer will manage your namespaces.",
    "require": {
        "illuminate/support": "^8.10"
    },
    "extra": {
        "php-prefixer": {
            "project-name": "Hello Prefixed World for Joomla",
            "namespaces-prefix":: "PPP",
            "global-scope-prefix": "PPP_",

            "exclude-paths": [
                "bin/",
                "doctrine/inflector/docs",
                "voku/portable-ascii/build"
            ]
        }
    },
    "autoload": {
        "psr-4": {
            "ModHelloWorld\\": "src/"
        }
    }
}

In particular, this schema has the attribute excludePaths to help package the module for distribution. The excludePaths remove folders that should not be included in the target prefixed module (commands, unit tests, library documentation, etc.).

The prefixed project ZIP file will be ready for installation on Joomla once it is processed and available for downloaded.