Download the PHP package rudra/framework without Composer

On this page you can find all versions of the php package rudra/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
rudra/framework
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package framework

Maintainability CodeFactor PHP Version

Rudra Framework

A lightweight, transparent PHP framework built on the principles of simplicity and clarity.

~15 MB · Lightweight Query Builder · No hidden dependencies · No magic · PHP 8.3 Attributes · Porto Architecture

Philosophy

Rudra follows the KISS principle — every tool is visible, every dependency is explicit, and every layer does exactly one thing. No "magic" happens behind the scenes: if you see it in the code, that's all there is.

Who is this for?

Rudra is built for developers who:

If you're looking for a batteries-included framework with built-in ORM, pre-configured queue workers, and ready-made broadcast drivers — Rudra is not for you.
If you want a lightweight, transparent foundation with simple primitives that you can extend exactly as needed — you're in the right place.

Requirements

🚀 Getting started

Via Composer (stable)

Via Composer (dev)

Via Git + DDEV (stable)

Via Git + DDEV (dev)

🔑 Secret Keys

Secret keys are automatically generated during Composer installation for all environments (local, ddev, production). If you need to regenerate them (e.g., after cloning the repository), simply run:

⚙️ Configuration

Rudra uses environment-specific configuration files. The framework automatically loads the appropriate file based on your environment: Environment Config File
DDEV config/setting.ddev.yml
Local development config/setting.local.yml
Production config/setting.production.yml

These files contain database credentials, container paths, debug settings, and other environment-specific values.

🗄️ Database Configuration

Rudra uses a simple, explicit YAML configuration for database connections. There is no hidden magic or auto-guessing: you define exactly which driver and credentials to use for each environment.

Local Development (config/setting.local.yml):

DDEV Environment (config/setting.ddev.yml):

Production (config/setting.production.yml):

💡 Tip: The framework's Query Builder (Rudra-Model) automatically reads these settings based on the active environment. Simply uncomment the dsn line for your preferred database engine (MySQL, PostgreSQL, or SQLite).

🌐 Web Environment (auto-detected)

For web requests, Rudra automatically detects the environment in index.php:

🖥️ Console Environment

For CLI commands (like php rudra migrate), the framework cannot auto-detect the environment as it does in index.php. Instead, it relies on the app_env.php file to determine which configuration file to load (e.g., 'local' → config/setting.local.yml).

🚀 Quick Setup (Recommended)

Use the built-in interactive command to set or change your environment. It will automatically create or update the app_env.php file for you, preserving all comments and structure:

Follow the interactive prompt to select 1 (local), 2 (ddev), or 3 (production).

⚙️ Manual Setup

If you prefer, you can manually create or edit the app_env.php file in your project root:

ℹ️ Note: If app_env.php is missing (e.g., if you cloned the repository directly instead of using composer create-project), the framework defaults to 'local' for CLI commands. This is safe for local development but should not be relied upon in production — always create the file manually or set the APP_ENV server variable explicitly.

💡 Tip: When adding new containers or settings during development, update config/setting.local.yml. For production deployment, copy the relevant sections to config/setting.production.yml.

Run the development server

🚀 Creating Your First Page

Let's create a simple /hello/:name page that greets the user. This example shows the full flow: container → controller → route → browser.

1. Create a container

This creates the App\Containers\Web\ namespace and registers it in config/setting.local.yml.

💡 Don't forget to also register it in config/setting.ddev.yml and config/setting.production.yml if needed.

2. Create a controller

This generates App/Containers/Web/Controller/HelloController.php.

3. Define the route and action

Open the controller and add a method with the #[Routing] attribute:

That's it. The route is registered automatically via the attribute — no separate routes.php needed.

4. Open in browser

You should see: Hello, world! Your lucky number is: 42


Alternative: routes.php

If you prefer to keep routes separate from controllers, create (or edit) App/Containers/Web/routes.php:

⚠️ When using routes.php for manual routing, make sure the file returns an empty array to disable automatic attribute-based route registration:

Alternative: closure route

For quick prototyping, you can even skip the controller entirely:

Then open http://127.0.0.1:8000 in your browser.

📦 Ecosystem Components

Rudra is built on a modular component architecture. Each component is a standalone Composer package — use only what you need, or install everything via rudra/framework.

Component Description Package
📦 Container DI container with 5 binding patterns (string, object, factory string, factory object, closure) rudra/container
🧭 Router HTTP router with PHP 8 attributes, middleware pipeline, REST resources, method spoofing rudra/router
🎯 Controller MVC controller abstraction with lifecycle hooks (init, before, after) rudra/controller
💾 Model Lightweight Query Builder + Repository pattern (not a heavy ORM) rudra/model
🔐 Auth Authentication, session management, RBAC, "Remember Me" rudra/auth
🔗 OAuthClient OAuth 2.0 client (Yandex, VK, custom providers) rudra/oauth-client
🎧 EventDispatcher Events system with Listeners (pub/sub) and Observers (stateless notifications) rudra/event-dispatcher
✅ Validation Fluent validation with CSRF, sanitization, custom rules, field aliases rudra/validation
🖼️ View Template engine (PHP + Twig support) with file-based caching rudra/view
🛡️ Exception HTTP error handling with custom error pages and DebugBar integration rudra/exception
🔀 Redirect HTTP redirection with status codes (1xx-5xx) rudra/redirect
📄 Pagination SQL OFFSET/LIMIT calculator with page links generator rudra/pagination
📜 Annotation Metadata reader for PHP 8 attributes + legacy docblock annotations rudra/annotation
🖥️ Cli CLI component with command routing rudra/cli
📝 Docs Auto-generates Markdown API documentation from source code rudra/docs

🔑 Key Features in Action

🔐 Authentication & RBAC

🎧 Event Dispatcher (Listeners + Observers)

✅ Fluent Validation

🧭 RESTful Resources

Registers standard CRUD routes with explicit plural and singular URL patterns. No magic pluralization — you define exactly what the URLs look like.

This creates the following routes:

Method URL Controller Method Description
GET api/users index List all users
GET api/user/:id read Get single user
POST api/users create Create new user
PUT api/user/:id update Full update of user
PATCH api/user/:id update Partial update of user
DELETE api/user/:id delete Delete user

The default action names are ['index', 'read', 'create', 'update', 'delete'].

Custom Method Names

You can override the default action names by passing a custom array of 5 methods:

The array order is fixed: [index, read, create, update, delete].

🖼️ View with Caching

💾 Data Access Layer (Rudra-Model)

Rudra includes a lightweight, transparent data access layer — not a heavy ORM, but a simple Query Builder with Repository pattern.

Architecture: Entity → Model → Repository

A predictable delegation chain with automatic fallback:

If you don't create a Model or Repository, the base Repository handles standard CRUD automatically.

Zero Boilerplate

Custom Repository Logic

Fluent Query Builder

Schema Builder

File-Based Caching

Simple, reliable JSON file caching — no Redis/Memcached required:

Why Not a Heavy ORM?

🛠️ CLI Tools

Rudra ships with a rich set of CLI utilities following the Porto architecture. Run php rudra help to see the full list.

🚀 Launch & Help

Command Description
php rudra serve Start the built-in dev server (alias: run)
php rudra help List all available commands

🛠️ Generators (make:*)

Command Description
php rudra make:container 📦 Scaffold a new Porto container
php rudra make:controller 🧭 Generate a controller class
php rudra make:contract 📜 Generate an interface (contract)
php rudra make:factory 🏭 Generate a factory class
php rudra make:listener 👂 Generate an event listener
php rudra make:middleware 🛡️ Generate a middleware class
php rudra make:migration 🗄️ Generate a database migration
php rudra make:model 🧱 Generate Entity + Repository pair
php rudra make:observer 👁️ Generate an event observer
php rudra make:seed 🌱 Generate a database seeder
php rudra make:docs 📝 Generate documentation from source

🗄️ Database

Command Description
php rudra migrate 🛤️ Run pending migrations (with duplicate protection)
php rudra seed 🌾 Execute seeders (with duplicate protection)

🔍 Debug

Command Description
php rudra debug:router 🗺️ List all registered routes
php rudra debug:router:container 🔍 List routes for a specific container
php rudra debug:listeners 🎧 List registered event listeners
php rudra debug:observers 🔭 List registered event observers

🔐 Security

Command Description
php rudra bcrypt 🔐 Hash a password with bcrypt
php rudra secret 🔑 Generate a cryptographic secret (APP_KEY)

🧹 Maintenance & Utils

Command Description
php rudra cache:clear 🧹 Clear application cache
php rudra convert:array-to-yml 🔄 Convert a PHP array config to YAML (alias: to:yml)

License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0) — a free, open-source license that:

📄 Full license text: LICENSE
🌐 Official MPL-2.0 page: https://mozilla.org/MPL/2.0/


All versions of framework with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filp/whoops Version ^2.9
ext-fileinfo Version *
ext-pdo Version *
phpmailer/phpmailer Version v7.1.1
symfony/var-dumper Version v8.1.1
symfony/yaml Version v8.1.1
php-debugbar/php-debugbar Version ^2.1
rudra/annotation Version self.version
rudra/auth Version self.version
rudra/cli Version self.version
rudra/container Version self.version
rudra/controller Version self.version
rudra/event-dispatcher Version self.version
rudra/exception Version self.version
rudra/model Version self.version
rudra/oauth-client Version self.version
rudra/pagination Version self.version
rudra/redirect Version self.version
rudra/router Version self.version
rudra/validation Version self.version
rudra/view Version self.version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rudra/framework contains the following files

Loading the files please wait ...