Search by

cgarciagl / ragnos

cgarciagl

Ragnos Framework - Declarative admin/CRUD framework for PHP built on CodeIgniter 4

Package info

github.com/cgarciagl/Ragnos

Homepage

Documentation

Type:project

pkg:composer/cgarciagl/ragnos

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v1.0.2 2026-11-04 20:50 UTC

This package is auto-updated.

Last update: 2026-11-04 20:50:30 UTC


README

Image

⚑ 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:

English Version VersiΓ³n en EspaΓ±ol

πŸ’‘ 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-dev if 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 in vendor/) and extract it into your web server directory.

Configuration & Database

  1. Configure the environment:
    • Copy .env.example to .env (automatically copied and encryption key generated if installed via composer create-project; never commit .env)
    • Update database credentials and base URL
  2. Create the database (named as in your .env, ragnos by 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.

  3. (Optional) Load the demo β€” a scale-model store with catalogs, reports and a sales dashboard:
    mysql -u root -p ragnos < sampledatabase/demo_classicmodels.sql
  4. Access your application at the configured URL (e.g., http://localhost/mi-proyecto/public) and sign in with admin / admin

For detailed installation instructions, see the Official Documentation or the book Ragnos from Zero to Pro

Create Your First Dataset

  1. 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;
  1. Generate the controller in your terminal:
php spark ragnos:make Modules/Tasks -table tasks
  1. 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']);
    }
}
  1. 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

βš™οΈ Requirements

  • PHP 8.1 or higher, with the intl, mbstring, and mysqli extensions
  • Composer 2.x
  • MariaDB 10.2.1+ or MySQL 8.0+ (RQueryController relies 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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