There is no license information available for the latest version (v3.0.0) of this package.

The default application template for WebFiori Framework.

Maintainers

Package info

github.com/WebFiori/app

Type:project

pkg:composer/webfiori/app

Statistics

Installs: 12 031

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

v3.0.0 2026-06-14 12:32 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

  • PHP >= 8.1
  • Extensions: json, mbstring, fileinfo, openssl
  • Composer

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)
├── App/                # Application source code
│   ├── Apis/           # REST API services
│   ├── Commands/       # Custom CLI commands
│   ├── Config/         # Configuration files (auto-generated)
│   ├── Database/       # Migrations, seeders, tables
│   ├── Domain/         # Domain entities
│   ├── Health/         # Health check implementations
│   ├── Ini/            # Initialization and route definitions
│   ├── Langs/          # Internationalization files
│   ├── Middleware/     # Custom middleware
│   ├── Pages/          # Page controllers and views
│   ├── Policies/       # ABAC policy classes
│   ├── Storage/        # Sessions, logs, uploads (not web-accessible)
│   └── Tasks/          # Background jobs and scheduled tasks
├── tests/              # PHPUnit tests
├── composer.json
├── webfiori            # CLI entry point (Linux/macOS)
└── webfiori.bat        # CLI entry point (Windows)

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

Common commands:

php webfiori create:service       # Create a new API service
php webfiori create:middleware    # Create a new middleware
php webfiori create:migration    # Create a database migration
php webfiori create:command      # Create a custom CLI command
php webfiori migrations:run      # Run pending migrations
php webfiori migrations:step     # Interactively apply/skip migrations
php webfiori routes:cache        # Build route cache for production
php webfiori services:list       # List auto-discovered API services
php webfiori help                # Show all available commands

Documentation

Contributing

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

Reporting Issues

License

This project is licensed under the MIT License.