cgarciagl / ragnos
Ragnos Framework - Declarative admin/CRUD framework for PHP built on CodeIgniter 4
Package info
Type:project
pkg:composer/cgarciagl/ragnos
Requires
- php: ^8.1
- ext-intl: *
- ext-mbstring: *
- codeigniter4/framework: ^4.6.3
- laminas/laminas-escaper: ^2.13
- psr/log: ^3.0
- symfony/yaml: ^6.4
Requires (Dev)
- fakerphp/faker: ^1.9
- mikey179/vfsstream: ^1.6
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^10.5.16 || ^11.2
Suggests
- ext-curl: If you use CURLRequest class
- ext-dom: If you use TestResponse
- ext-exif: If you run Image class tests
- ext-fileinfo: Improves mime type detection for files
- ext-gd: If you use Image class GDHandler
- ext-imagick: If you use Image class ImageMagickHandler
- ext-libxml: If you use TestResponse
- ext-memcache: If you use Cache class MemcachedHandler with Memcache
- ext-memcached: If you use Cache class MemcachedHandler with Memcached
- ext-mysqli: If you use MySQL
- ext-oci8: If you use Oracle Database
- ext-pgsql: If you use PostgreSQL
- ext-readline: Improves CLI::input() usability
- ext-redis: If you use Cache class RedisHandler
- ext-simplexml: If you format XML
- ext-sodium: If you use Encryption SodiumHandler
- ext-sqlite3: If you use SQLite3
- ext-sqlsrv: If you use SQL Server
- ext-xdebug: If you use CIUnitTestCase::assertHeaderEmitted()
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-04 20:50:30 UTC
README
β‘ The Declarative PHP Framework for Modern Development
Build secure, enterprise-grade applications in record time using Configuration over Programming and AI Vibecoding.
Stop writing repetitive code. Ragnos automatically generates APIs, UIs, and complex validations from your data models.
π Official Manual Available Now!
Learn Ragnos from zero to pro with our comprehensive guides:
π‘ What is Ragnos?
Ragnos is a modern, lightweight PHP framework that revolutionizes web application development through declarative programming. Built on the solid foundation of CodeIgniter 4, it integrates Vanilla JavaScript, DataTables 3, and AdminLTE 4 to deliver a complete, efficient development experience.
Core Philosophy
Instead of writing boilerplate code, you define your data structure and business rules onceβRagnos handles the rest. Controllers, views, APIs, validations, and UI components are generated automatically.
β¨ Key Features
| Feature | Benefit |
|---|---|
| πΎ Declarative Datasets | Define data structure once, get a fully functional CRUD module with APIs automatically |
| π Hybrid Core (HTML + API) | Your admin panel automatically serves as a secure RESTful API for mobile and modern frontends |
| π‘οΈ Enterprise Security | RBAC, immutable audit logs, and automatic OWASP Top 10 mitigation out of the box |
| β‘ Zero Configuration | Works instantly with smart defaults; customize only what you need |
| π Advanced Data Tables | Built-in search, filtering, pagination, and sorting with DataTables integration |
| π¨ Beautiful UI | AdminLTE 4 provides a modern, fully responsive interface ready for production |
| π Native REST API | Expose your data to mobile apps and SPAs with integrated token-based security |
| π± Responsive Design | Mobile-first approach ensuring perfect display on all devices |
ποΈ Built on Proven Technology
Ragnos leverages industry-standard technologies:
- CodeIgniter 4 β Ultra-lightweight PHP framework with minimal learning curve
- AdminLTE 4 β Modern dashboard UI built on Bootstrap 5, fully customizable and responsive
- Vanilla JavaScript & DataTables 3 β Robust client-side data manipulation without jQuery or build complexity
- Bootstrap β Responsive design framework for consistent, professional appearance
- MariaDB/MySQL β Powerful relational database support with advanced querying
π Quick Start
Installation
Choose the method that best fits your workflow:
-
Via Composer (Recommended for new projects β ultra-lightweight):
composer create-project --no-dev cgarciagl/ragnos mi-proyecto cd mi-proyecto(Omit
--no-devif you plan to write and run unit tests with PHPUnit). -
Quick Standalone ZIP (No Composer or Git needed):
Download the ready-to-use ragnos.zip (includes CodeIgniter 4 and all dependencies pre-installed invendor/) and extract it into your web server directory.
Configuration & Database
- Configure the environment:
- Copy
.env.exampleto.env(automatically copied and encryption key generated if installed viacomposer create-project; never commit.env) - Update database credentials and base URL
- Copy
- Create the database (named as in your
.env,ragnosby default) and import the system tables:mysql -u root -p ragnos < sampledatabase/ragnos_base.sqlπ‘ Prefer a GUI? Try PyroStudio, the native MariaDB/MySQL client by the author of Ragnos: right-click the database β Backup / Restore β Restore into Existing DB.
- (Optional) Load the demo β a scale-model store with catalogs, reports and a sales dashboard:
mysql -u root -p ragnos < sampledatabase/demo_classicmodels.sql - Access your application at the configured URL (e.g.,
http://localhost/mi-proyecto/public) and sign in withadmin/admin
For detailed installation instructions, see the Official Documentation or the book Ragnos from Zero to Pro
Create Your First Dataset
- Create the database table (SQL):
CREATE TABLE `tasks` ( `id_task` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NULL, `description` text, `status` enum('pending','in_progress','completed') DEFAULT 'pending', PRIMARY KEY (`id_task`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
- Generate the controller in your terminal:
php spark ragnos:make Modules/Tasks -table tasks
- Configure your dataset in
app/Controllers/Modules/Tasks.php:
namespace App\Controllers\Modules; use Ragnos\Controllers\RDatasetController; class Tasks extends RDatasetController { public function __construct() { parent::__construct(); $this->checkLogin(); $this->setTitle('Tasks Management'); $this->setTableName('tasks'); $this->setIdField('id_task'); $this->addField('title', [ 'label' => 'Task Title', 'rules' => 'required|min_length[3]' ]); $this->addField('description', [ 'label' => 'Details', 'type' => 'textarea' ]); $this->addField('status', [ 'label' => 'Status', 'type' => 'select', 'options' => [ 'pending' => 'Pending', 'in_progress' => 'In Progress', 'completed' => 'Completed' ] ]); $this->setTableFields(['title', 'status']); } }
- Access in your browser at
http://localhost/mi-proyecto/public/modules/tasks
That's it! Ragnos automatically generates:
- β Complete CRUD interface
- β RESTful API endpoints
- β Form validations
- β Data security
- β Search and filtering
- β Automated reports and exports
π Documentation & Resources
- π Official Manual β Comprehensive guide to mastering Ragnos
- π Live Demo β See Ragnos in action
- π¬ Discord Community β Connect with developers and get support
- π GitHub Repository β Source code and issue tracking
βοΈ Requirements
- PHP 8.1 or higher, with the
intl,mbstring, andmysqliextensions - Composer 2.x
- MariaDB 10.2.1+ or MySQL 8.0+ (
RQueryControllerrelies on common table expressions,WITH)
π οΈ Available Commands
# List all available Ragnos commands php spark list # Generate a new Dataset Controller from database table php spark ragnos:make Modules/Users -table users # Generate a Query Controller from SQL query php spark ragnos:make:query Dashboard/Reports -query "SELECT * FROM users" # Start development server php spark serve
π― Use Cases
β
Admin Panels β Build feature-rich dashboards in hours, not weeks
β
REST APIs β Generate production-ready APIs automatically
β
Mobile Backends β Serve iOS/Android apps with built-in security
β
MVPs & Prototypes β Rapid application development for startups
β
Enterprise Apps β Scalable, secure, and maintainable applications
π€ Contributing
We welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License β see LICENSE file for details.
π‘ Philosophy: Configuration Over Programming
Ragnos embodies the principle that configuration should be preferred over writing repetitive code. By declaratively describing what you need, the framework handles the implementation details, allowing developers to focus on business logic and user experience.
π Recognition & Community
- β Star us on GitHub
- π¬ Join our Discord community
- π’ Follow us on social media for updates and announcements
Built with β€οΈ for developers who value their time
GitHub β’ Discord β’ Get the Book
