PHPackages                             canvastack/canvastack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. canvastack/canvastack

ActiveLibrary[Security](/categories/security)

canvastack/canvastack
=====================

Modern, high-performance Laravel CMS package with admin and public frontend support

2.2.0(7mo ago)201MITPHPCI failing

Since May 18Pushed 1mo agoCompare

[ Source](https://github.com/canvastack/canvastack)[ Packagist](https://packagist.org/packages/canvastack/canvastack)[ RSS](/packages/canvastack-canvastack/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (10)Used By (0)

CanvaStack - Modern Laravel CMS Package
=======================================

[](#canvastack---modern-laravel-cms-package)

[![Latest Version](https://camo.githubusercontent.com/45d10e67e41eeabc99d82d713b18ca6a1db75d7725347fb65bc30d97346171e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63616e7661737461636b2f63616e7661737461636b)](https://packagist.org/packages/canvastack/canvastack)[![Total Downloads](https://camo.githubusercontent.com/e904789d138124fba6a89f7feede1e3e56e24c310231115a9d87403c00d1202a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63616e7661737461636b2f63616e7661737461636b)](https://packagist.org/packages/canvastack/canvastack)[![PHP Version](https://camo.githubusercontent.com/c9f64f714c636ba27a3bba6dfd52f98426832db1262747efa54b212d16943651/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c7565)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/ec976ad699fb5ffbb43421eabc292424a8b0bc5bed7a28e11e6349c67e2b6599/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531322e302d726564)](https://laravel.com)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![Tests](https://camo.githubusercontent.com/d940ad7f0752e2cbe0d63c50dcebf329078807390051c41fe63258f1b5c4e182/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d70617373696e672d627269676874677265656e)](tests/)[![Coverage](https://camo.githubusercontent.com/dbf85d824d096c1d5f306278923e7d45133e64c082196a4138fc44bbdf036fc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d38302532352d627269676874677265656e)](tests/)

Modern, high-performance Laravel CMS package with admin and public frontend support.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Performance](#performance)
- [Documentation](#documentation)
- [Development](#development)
- [Architecture](#architecture)
- [Technology Stack](#technology-stack)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
- [Support](#support)

---

Features
--------

[](#features)

- 🚀 **High Performance**: 50-80% faster than legacy version
- 🎨 **Modern UI**: Tailwind CSS + DaisyUI with dark mode
- 🔒 **Secure**: Zero SQL injection vulnerabilities, prepared statements
- 🎯 **Flexible**: Admin + Public frontend rendering
- 🔐 **Enhanced RBAC**: Context-aware role-based access control
- ⚡ **Optimized**: Redis caching, query optimization, eager loading
- 🧪 **Well Tested**: 80%+ test coverage
- 📚 **Documented**: Comprehensive documentation and examples

---

Requirements
------------

[](#requirements)

- PHP 8.2 or 8.3
- Laravel 12.x
- MySQL 8.0 or higher
- Redis 7.x (recommended for caching)

### What's New in Laravel 12

[](#whats-new-in-laravel-12)

CanvaStack fully supports Laravel 12 with all new features:

- ✅ New collection methods (`sole()`, `ensure()`, `firstOrFail()`)
- ✅ Enhanced validation rules (`decimal`, `lowercase`, `uppercase`, `ascii`)
- ✅ Improved cache methods (`flexible()`, `missing()`, `pull()`)
- ✅ Better query builder methods (`sole()`, `value()`, `valueOrFail()`)
- ✅ PHP 8.2+ features (readonly classes, constants in traits)

See [Laravel 12 Features Guide](docs/upgrade/laravel-12-features.md) for details.

---

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require canvastack/canvastack
```

Visit [Packagist](https://packagist.org/packages/canvastack/canvastack) for more information.

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --tag=canvastack-config
php artisan vendor:publish --tag=canvastack-views
php artisan vendor:publish --tag=canvastack-assets
```

### Environment Configuration

[](#environment-configuration)

Add these variables to your `.env` file:

```
# Table Engine Configuration
CANVASTACK_TABLE_ENGINE=datatables  # Options: datatables, tanstack

# Cache Configuration
CACHE_DRIVER=redis
CANVASTACK_CACHE_ENABLED=true
CANVASTACK_CACHE_TABLES_TTL=300

# Performance Settings
CANVASTACK_CHUNK_SIZE=100
CANVASTACK_EAGER_LOAD=true
CANVASTACK_QUERY_CACHE=true
```

See [Configuration Guide](docs/getting-started/configuration.md) for all available options.

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

---

Quick Start
-----------

[](#quick-start)

### Form Builder

[](#form-builder)

```
use Canvastack\Canvastack\Components\Form\FormBuilder;

$form = new FormBuilder();

// Basic usage (backward compatible)
$form->text('name', 'Full Name');
$form->email('email', 'Email Address');
$form->select('status', 'Status', ['active' => 'Active', 'inactive' => 'Inactive']);

// Enhanced usage (fluent interface)
$form->text('name', 'Full Name')
    ->placeholder('Enter your name')
    ->icon('user')
    ->required()
    ->maxLength(100);

// Render
echo $form->render();
```

### Table Builder

[](#table-builder)

```
use Canvastack\Canvastack\Components\Table\TableBuilder;

$table = new TableBuilder();

// Basic usage (backward compatible)
$users = User::paginate(100);
$table->format($users);

// Enhanced usage with caching and optimization
$table->format()
    ->cache(300)           // Cache for 5 minutes
    ->chunk(100)           // Process in chunks
    ->eager(['role', 'permissions']);  // Eager load relationships
```

### RBAC System

[](#rbac-system)

```
// Check permission with context
if (auth()->user()->can('edit-user', $user, 'admin')) {
    // Admin context
}

if (auth()->user()->can('edit-profile', $user, 'public')) {
    // Public context
}

// Define policies
Gate::define('edit-user', [UserPolicy::class, 'edit']);
```

---

Performance
-----------

[](#performance)

### Benchmarks

[](#benchmarks)

MetricLegacyCanvaStackImprovementDataTable (1K rows)2000ms&lt; 500ms75% fasterMemory usage256MB&lt; 128MB50% lessForm render (50 fields)200ms&lt; 50ms75% fasterCache hit ratio0%&gt; 80%New feature---

Documentation
-------------

[](#documentation)

### 📚 Complete Documentation

[](#-complete-documentation)

Comprehensive documentation is available in the `docs/` directory:

#### Getting Started

[](#getting-started)

- [Installation Guide](docs/getting-started/installation.md) - Complete installation instructions
- [Quick Start](docs/getting-started/quick-start.md) - 5-minute tutorial
- [Configuration](docs/getting-started/configuration.md) - Configuration reference
- [Upgrade Guide](docs/getting-started/upgrade-guide.md) - Migrate from canvastack/origin

#### Components

[](#components)

- [Table Component](docs/components/table/README.md) - DataTable with caching and optimization
    - [API Reference](docs/components/table/api-reference.md) - Complete API documentation
    - [Examples](docs/components/table/examples.md) - Real-world usage examples
    - [Performance Tuning](docs/components/table/performance.md) - Optimization guide
    - [Troubleshooting](docs/components/table/troubleshooting.md) - Common issues
- [Form Component](docs/components/form/README.md) - Dynamic forms with validation
    - [API Reference](docs/components/form/api-reference.md) - Complete API documentation
    - [Field Types](docs/components/form/field-types.md) - All 13 field types
    - [Validation](docs/components/form/validation.md) - Validation guide

#### Architecture

[](#architecture)

- [Overview](docs/architecture/overview.md) - System architecture
- [Design Patterns](docs/architecture/design-patterns.md) - Patterns used
- [Layered Architecture](docs/architecture/layered-architecture.md) - Layer responsibilities
- [Dependency Injection](docs/architecture/dependency-injection.md) - DI container

#### Features

[](#features-1)

- [Caching System](docs/features/caching.md) - Multi-layer caching strategy
- [Security](docs/features/security.md) - Security features and best practices
- [Performance](docs/features/performance.md) - Performance optimization
- [Dark Mode](docs/features/dark-mode.md) - Dark mode implementation
- [Eager Loading](docs/features/eager-loading.md) - N+1 query prevention

#### Guides

[](#guides)

- [Database Setup](docs/guides/database-setup.md) - Database configuration
- [Redis Setup](docs/guides/redis-setup.md) - Redis installation and setup
- [Testing](docs/guides/testing.md) - Testing guide
- [Deployment](docs/guides/deployment.md) - Production deployment
- [Best Practices](docs/guides/best-practices.md) - Coding best practices

#### Upgrade Guides

[](#upgrade-guides)

- [Laravel 12 Upgrade](docs/upgrade/laravel-12-upgrade-summary.md) - Laravel 12 upgrade summary
- [Laravel 12 Features](docs/upgrade/laravel-12-features.md) - New Laravel 12 features
- [PHP 8.2+ Features](docs/upgrade/php-8.2-features.md) - PHP 8.2+ features adopted

### 📖 Quick Links

[](#-quick-links)

- **[Documentation Index](docs/README.md)** - Complete documentation overview
- **[API Reference](docs/api/README.md)** - API documentation and guides
- **[Component Reference](docs/components/README.md)** - Component API reference
- **[Migration Guide](docs/getting-started/upgrade-guide.md)** - Upgrade from v1.x
- **[Troubleshooting](docs/components/table/troubleshooting.md)** - Common issues and solutions

---

Development
-----------

[](#development)

### Setup

[](#setup)

```
cd packages/canvastack/canvastack
composer install
npm install
```

### Build Assets

[](#build-assets)

```
npm run dev    # Development
npm run build  # Production
```

### Code Quality

[](#code-quality)

```
# Format code (PSR-12)
./vendor/bin/pint

# Static analysis
./vendor/bin/phpstan analyse

# Run tests
php artisan test --coverage
```

---

Architecture
------------

[](#architecture-1)

### Layered Architecture

[](#layered-architecture)

```
Presentation → Application → Service → Repository → Data

```

### Design Patterns

[](#design-patterns)

- Dependency Injection (Service Container)
- Repository Pattern (Data Access)
- Strategy Pattern (Admin/Public Rendering)
- Factory Pattern (Component Creation)
- Observer Pattern (Event-Driven Caching)

---

Technology Stack
----------------

[](#technology-stack)

### Backend

[](#backend)

- PHP 8.2+
- Laravel 12.x
- MySQL 8.0+
- Redis 7.x

### Frontend

[](#frontend)

- Tailwind CSS 3.x
- DaisyUI 4.x
- Alpine.js 3.x
- GSAP 3.x
- Lucide Icons
- ApexCharts

### Development Tools

[](#development-tools)

- PHPUnit 10.x
- Laravel Pint (PSR-12)
- PHPStan Level 8
- Vite 5.x

---

Contributing
------------

[](#contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on:

- Code of Conduct
- Development setup
- Coding standards (PSR-12)
- Testing requirements
- Pull request process
- Reporting bugs
- Suggesting features

### Quick Contribution Steps

[](#quick-contribution-steps)

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests (`php artisan test`)
5. Format code (`./vendor/bin/pint`)
6. Commit changes (`git commit -m 'Add amazing feature'`)
7. Push to branch (`git push origin feature/amazing-feature`)
8. Open a Pull Request

See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.

---

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for a detailed list of changes, new features, and bug fixes in each version.

### Latest Changes

[](#latest-changes)

- ✅ **Laravel 12 Upgrade Complete**: Full support for Laravel 12.x
- ✅ **PHP 8.2+ Features**: Readonly classes, constants in traits, standalone types
- ✅ **New Laravel 12 Features**: Collection methods, validation rules, cache methods
- ✅ **100% Backward Compatible**: All existing API continues to work
- ✅ **Performance Maintained**: No regression, all targets met
- Complete documentation restructure with 22+ comprehensive guides
- Enhanced architecture documentation
- Comprehensive feature guides (caching, security, performance)
- Production-ready deployment guide
- Best practices guide

---

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

---

Credits
-------

[](#credits)

- **Original Package**: canvastack/origin
- **Enhanced Version**: canvastack/canvastack
- **Maintainers**: CanvaStack Team
- **Contributors**: See [CONTRIBUTING.md](CONTRIBUTING.md)

---

Support
-------

[](#support)

- **Documentation**: [docs/](docs/) - Comprehensive guides and API reference
- **Issues**: [GitHub Issues](https://github.com/canvastack/canvastack/issues) - Bug reports and feature requests
- **Discussions**: [GitHub Discussions](https://github.com/canvastack/canvastack/discussions) - Questions and community support
- **Security**: Report security vulnerabilities privately to

---

**Version**: 1.0.0-dev
**Status**: Documentation Complete, Ready for Development
**Documentation**: 22+ comprehensive guides, 100% complete
**Release Date**: TBD

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance82

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~4 days

Total

7

Last Release

233d ago

Major Versions

v1.x-dev → v2.0.02025-09-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2ed8762f8c751a26ffd8878bb546e46f2d8f5d96f4f6640bf0c9cd3264d8f9d?d=identicon)[canvastack](/maintainers/canvastack)

---

Top Contributors

[![wisnuwidi](https://avatars.githubusercontent.com/u/169636?v=4)](https://github.com/wisnuwidi "wisnuwidi (481 commits)")

---

Tags

laravelsecuritylibrarydatatablesenterpriseconfigurablecanvastack

### Embed Badge

![Health badge](/badges/canvastack-canvastack/health.svg)

```
[![Health](https://phpackages.com/badges/canvastack-canvastack/health.svg)](https://phpackages.com/packages/canvastack-canvastack)
```

###  Alternatives

[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

999465.8k2](/packages/akaunting-laravel-firewall)[enlightn/laravel-security-checker

A Laravel package to scan your dependencies for known security vulnerabilities.

51173.4k](/packages/enlightn-laravel-security-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
