The default application template for WebFiori Framework.

Maintainers

Package info

github.com/WebFiori/app

Type:project

pkg:composer/webfiori/app

Statistics

Installs: 12 023

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 1

v3.0.0-RC7 2023-04-29 01:44 UTC

README

WebFiori Logo

Build Status Latest Release Downloads

The default application template for WebFiori Framework. Use this as a starting point to create new WebFiori projects.

Requirements

Quick Start

composer create-project webfiori/app my-site
cd my-site
php -S localhost:8080 -t public

Then open http://localhost:8080 in your browser.

Project Structure

├── public/             # Web server document root
│   ├── index.php       # Application entry point
│   ├── .htaccess       # Apache rewrite rules
│   ├── web.config      # IIS rewrite rules
│   └── assets/         # Static files (CSS, JS, images)
├── tests/              # PHPUnit tests
│   ├── bootstrap.php   # Test bootstrap
│   └── phpunit.xml     # PHPUnit configuration
├── composer.json
├── php_cs.php.dist     # PHP CS Fixer configuration
├── webfiori            # CLI entry point (Linux/macOS)
└── webfiori.bat        # CLI entry point (Windows)

After running composer create-project, the framework will generate an App/ directory containing your application code (routes, middleware, commands, etc.).

Customizing the App Directory

By default, the framework uses App/ as the application root directory. To change this, edit the first parameter of App::initiate() in public/index.php:

App::initiate('MyApp', 'public', __DIR__);

Reasons you might want to rename it:

  • Gives your project a distinct identity instead of a generic App/ folder.
  • Avoids naming conflicts if you're integrating WebFiori into an existing project that already has an App/ directory.
  • Makes it easier to distinguish between multiple WebFiori-based projects in the same workspace.

Running Tests

composer test

Code Style

This project uses PHP CS Fixer for code style enforcement.

composer cs-check   # Check for violations (dry run)
composer cs-fix     # Auto-fix violations

CLI Usage

WebFiori includes a CLI tool for common tasks:

# Linux/macOS
php webfiori

# Windows
webfiori.bat

Documentation

Contributing

For information on how to contribute, see the contribution guide.

Reporting Issues

License

This project is licensed under the MIT License.