Installation

Get Canvas Framework up and running in just a few minutes with Composer.

System Requirements

  • PHP 8.2 or higher
  • Composer for dependency management
  • Web server (Apache, Nginx, or PHP built-in server)

Create a New Project

Create a new Canvas application using the skeleton project:

composer create-project quellabs/canvas-skeleton my-canvas-app
cd my-canvas-app

Add Canvas to Existing Project

To add Canvas to an existing project, install it via Composer:

composer require quellabs/canvas

Create a `public` folder and copy essential files

To create a public folder with the main driver file index.php and a .htaccess file, run:

composer require quellabs/canvas-apache

Project Structure

Canvas follows a conventional directory structure:


my-canvas-app/
├── public/
│   ├── index.php          # Application entry point
│   └── .htaccess          # Apache configuration with URL rewriting
├── src/
│   ├── Controllers/       # Your controllers
│   ├── Entities/          # Entity classes
│   └── Aspects/           # AOP aspects
├── templates/             # Templates (usually Smarty)
├── storage/               # Runtime files
├── migrations/            # Database migrations
├── config/                # Configuration files
└── vendor/                # Composer dependencies