quellabs / canvas-skeleton
Application skeleton for Quellabs Canvas framework
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.2
- quellabs/canvas: ^1.0
- quellabs/canvas-smarty: ^1.0
Requires (Dev)
- pestphp/pest: ^2.0
README
A PHP application skeleton for the Quellabs Canvas Framework.
Quick Start
Create a new Canvas application using Composer:
composer create-project quellabs/canvas-skeleton my-app
cd my-app
That's it! The skeleton will automatically:
- Set up the complete directory structure
- Copy configuration files
- Install all dependencies
- Configure proper permissions
What's Included
Directory Structure
my-app/
├── src/ # Application logic
│ ├── Controllers/ # Request controllers
│ └── Aspects/ # Aspect-Oriented Programming aspects
├── config/ # Configuration files
├── public/ # Web server document root
│ ├── index.php # Application entry point
│ └── .htaccess # Apache URL rewriting
├── templates/ # Views
├── storage/ # Application storage
└── .env # Environment configuration
Pre-configured Features
- URL Rewriting: Clean URLs with Apache
.htaccess
- Environment Configuration:
.env
file for application settings - Autoloading: PSR-4 autoloading ready for your application classes
- Directory Structure: Organized folders for a clean project layout
Getting Started
1. Configure Your Environment
Edit the .env
file to match your setup:
APP_NAME="My Canvas App"
APP_URL=http://localhost:8000
DSN=mysql://root:root@localhost:3306/database_name?charset=utf8mb4
2. Start the Development Server
php -S localhost:8000 -t public
Visit http://localhost:8000 to see your application running.
3. Start Building
Create your application logic in the src/
directory and controllers in the src/Controllers/
directory according to the Canvas framework documentation.
Requirements
- PHP: 8.2 or higher
- Composer: For dependency management
- Web Server: Apache (with mod_rewrite), Litespeed or Nginx
Framework Documentation
For detailed documentation about the Canvas framework features:
- Canvas Framework Repository
- Canvas Documentation (coming soon)
Development
Refer to the Canvas Framework documentation for details on:
- Creating controllers
- Defining routes
- Working with views
- Database integration
- Testing your application
Optional Canvas Packages
Enhance your Canvas application with these optional packages:
Templating:
composer require quellabs/canvas-smarty
Adds Smarty templating engine support for powerful template rendering.
ORM:
composer require quellabs/objectquel
Provides ObjectQuel ORM for elegant database interactions and object-relational mapping.
Deployment
Apache Configuration
The included .htaccess
file handles URL rewriting for Apache. Ensure mod_rewrite
is enabled.
Nginx Configuration
For Nginx, add this to your server block:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Production Environment
- Update your database DSN for production
- Set proper file permissions:
chmod -R 755 storage/ chown -R www-data:www-data storage/
Contributing
This skeleton is maintained by the Canvas team. If you find issues or have suggestions:
- Check the Canvas Framework Issues
- Submit issues to the Canvas Skeleton Repository
License
The Canvas Application Skeleton is open-sourced software licensed under the MIT license.
Support
- Documentation: Canvas Docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions