chiron/app

Chiron Application Example

Fund package maintenance!
ncou

Installs: 55

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 1

Type:project

2.0.21 2022-06-06 17:39 UTC

README

[Chiron Framework] is a light framework designed to allow developpers to quickly start a new console or web application.

Chiron Framework

This repository contain an App Skeletton intended to show the basic Chiron features. Your first step to build amazing projects !

Latest Stable Version Total Downloads Build Status

Requirements

Make sure that your web server is configured with following PHP version and extensions:

  • PHP >= 7.2
  • intl PHP Extension
  • mbstring PHP Extension

Installation

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install this project template using the following command:

$ composer create-project chiron/app [my-app-name]

Replace [my-app-name] with the desired directory name for your new application.

Cloning

This section applies only if you cloned this repo with git clone, not when installed with composer create-project ....

Make sure to properly configure your app project after cloning this repository.

$ composer install                      # Install the projet composer dependencies

$ bin/chiron dotenv:copy -d .env        # Create the .env file at the root path
$ bin/chiron dotenv:key -m .env         # Update the security key in .env file
$ bin/chiron package:discover           # Auto-discover the module bootloaders

Web Server

You can launch a development web server to quickly test you application.

$ php -S localhost:8000 -t public/

or

$ bin/chiron serve

Now you should be able to access the application through the URL printed in the console.

Directory structure

The application template has the following structure:

config/                   #Configuration files.
docs/                     #Documentation.
public/                   #Files publically accessible from the Internet.
    assets/               #Published assets.
    index.php             #Entry script.
resources/                #Application resources.
    assets/               #Asset bundle resources.
    layout/               #Layout view templates.
    view/                 #View templates.
runtime/                  #Files generated during runtime.
src/                      #Application source code.
    Asset/                #Asset bundle definitions.
    Controller/           #Web controller classes.
    Provider/             #Providers that take configuration and configure services.
tests/                    #A set of Codeception tests for the application.
vendor/                   #Installed Composer packages.

Testing

To test an application:

$ ./vendor/bin/phpunit

or

$ composer phpunit

License

This package is open-sourced software licensed under the MIT license.