Skip to content

WebFiori/app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

213 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

WebFiori App Template

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.

About

๐ŸŒธ PHP web development framewrok. Built to help in creating websites.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors