kachnitel/admin-bundle

Modern Symfony admin bundle powered by LiveComponents for Doctrine entities with extensive customization

Installs: 273

Dependents: 1

Suggesters: 1

Security: 0

Stars: 3

Watchers: 0

Forks: 0

Open Issues: 4

Type:symfony-bundle

pkg:composer/kachnitel/admin-bundle

0.5.2 2026-02-08 00:58 UTC

This package is auto-updated.

Last update: 2026-02-09 06:21:20 UTC


README

Tests Coverage Assertions PHPStan PHP Symfony

A modern Symfony admin bundle powered by LiveComponents. Add one attribute to your entity and get a full CRUD interface with search, filters, pagination, and batch actions.

Why another admin bundle? #### Motivation

I have struggled with keeping my controllers DRY as my applications grew. All my attempts at solving the issue eventually timed perfectly with Live Components growing up into a mature and stable UX system. This bundle is the result of my attempts at previous reusable tables and admin generators, rebuilt on top of Live Components at its core.

While there's excellent admin bundles out there, I felt like defining their configuration replaced my controller problem with a new "configuration problem". I wanted something that was easy to get started with, non-repetitive, but also flexible enough to handle complex use cases while leaning on established patterns.

By leveraging Symfony UX, I was able to create a bundle that provides an admin interface with minimal boilerplate, while still allowing for deep customization through Twig templates and your own components.

Quick Start

1. Install

composer require kachnitel/admin-bundle

2. Add attribute to any entity

use Kachnitel\AdminBundle\Attribute\Admin;

#[Admin]
class Product
{
    // Your existing entity...
}

3. Visit /admin

Your entity appears with auto-detected columns, search, filters, and CRUD.

Manual setup (if not using Symfony Flex)
  1. Enable the bundle in config/bundles.php:
Kachnitel\AdminBundle\KachnitelAdminBundle::class => ['all' => true],
  1. Import routes in config/routes/kachnitel_admin.yaml:
kachnitel_admin:
    resource: '@KachnitelAdminBundle/config/routes.yaml'
    prefix: /admin
  1. Create config in config/packages/kachnitel_admin.yaml:
kachnitel_admin:
    base_layout: 'base.html.twig'  # Your app's base template

What's Next?

Control Your Columns

Level 1: Auto-detection (zero config) - all properties shown automatically

Level 2: Specify columns and order:

#[Admin(columns: ['id', 'name', 'price'])]

Or exclude: excludeColumns: ['costPrice']

Level 3: Role-based visibility:

#[ColumnPermission('ROLE_HR')]
private float $salary;

Level 4: User-toggleable:

#[Admin(enableColumnVisibility: true)]

Details: Configuration Guide | Column Visibility

Customize the Look

Level 1: Use your layout:

kachnitel_admin:
    base_layout: 'base.html.twig'

Level 2: Switch theme (Bootstrap/Tailwind):

kachnitel_admin:
    theme: '@KachnitelAdmin/theme/tailwind.html.twig'

Level 3: Override type templates:

templates/bundles/KachnitelAdminBundle/types/datetime/_preview.html.twig

Level 4: Entity-specific:

templates/bundles/KachnitelAdminBundle/types/App/Entity/Product/price.html.twig

Details: Template Overrides Guide

Features

  • Multi-Layer Permissions - Entity, action, and column-level control
  • Easy start - Add #[Admin] to entity, auto-detects columns
  • Highly Customizable - From cell level templates to entire layout overrides using Symfony's Twig inheritance
  • LiveComponent-Powered - Real-time search, filters, and updates without page reloads
  • Column Visibility - Show/hide columns with session or database-backed preferences
  • DataSource Abstraction - Display data from external APIs, audit logs, or any source

Documentation

Guide Description
Configuration Entity attributes and bundle config
Column Visibility Permissions and user preferences
Filters Automatic filtering and customization
Template Overrides Customize the admin appearance
Batch Actions Multi-select and bulk operations
DataSource Non-Doctrine data sources
Assets AssetMapper and Webpack Encore setup
Development Contributing and running tests
How does this compare to EasyAdmin?

EasyAdmin and SonataAdmin use PHP configuration, while this bundle leans heavily on a single Live Component with Twig templates for customization. This allows for real-time UI updates, and separates configuration (security, columns) from presentation (templates).

Full comparison - philosophy, features, and when to choose each.

Requirements

  • PHP 8.4 or higher
  • Symfony 6.4 / 7.0 / 8.0
  • Doctrine ORM 3.5+

License

MIT License - see LICENSE file for details.