PHPackages                             rudrax/boot - 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. [API Development](/categories/api)
4. /
5. rudrax/boot

ActiveLibrary[API Development](/categories/api)

rudrax/boot
===========

Suporting library for Rudrax

0.0.21(5y ago)02.5k32MITPHP

Since Sep 19Pushed 5y ago3 watchersCompare

[ Source](https://github.com/rudraks/boot)[ Packagist](https://packagist.org/packages/rudrax/boot)[ Docs](http://api.spamjs.org)[ RSS](/packages/rudrax-boot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (24)Used By (2)

boot
====

[](#boot)

Simple and Light weight MVC framework in PHP, it serves all stable functionalties like routing (native), caching (phpFastCache), database (Redbeans &amp; PDO), templating (Smarty), authentication (Basic,SSO &amp; Custom), Session/Roles etc.

Setup
-----

[](#setup)

### Prerequisites

[](#prerequisites)

- XAMP : [instructions](https://github.com/boilerplatez/docs/blob/master/markdown/xampp/ENV.md)
- PHP/Copmoser : [instructions](https://github.com/boilerplatez/docs/blob/master/markdown/php/ENV.md)

### Setup New RudraX Project

[](#setup-new-rudrax-project)

If you are starting a fresh project simply follow these steps

- Go to directoy where you want to create your project lests say "/Users/Lucas/Projects/" and run this command

```
$ composer create-project rudrax/project my_project
```

Or you can Manually Setup RudraX project or install RudraX in your existing project

### Install in existing project

[](#install-in-existing-project)

```
$ composer install rudrax/boot --save

```

### Folder Structure

[](#folder-structure)

If you have used create-project command then this directory structure will be automatically created for you. Otherwise create it manually. and make sure build folder has correct permisson 0777

```
-app
  L controller  // Controller/URL Mapping for Project, name of file and class should match
  L model       //Models being Used in Porject
  L view        //Smart Templates
-config
  L project.properties //Project Properties
-build          // Build/Temporary Files created by Framwork, need write permissions
-src            // Folder for static files like javascript,html,css
-lib            // composer library folder
-index.php
.htaccess
-composer.json  // set config->vendor-dir = lib

```

### index File \[index.php\]

[](#index-file-indexphp)

This file also gets created automatically if you have used create-project. Otherwise create it and copy the code in file, also copy [.htaccess](.rudraks/boot/master/root.htaccess) in you project.

```
ini_set('display_errors', 'On');
ini_set('error_reporting', E_ALL);
error_reporting(E_ALL);
error_reporting(E_ALL & ~E_DEPRECATED);

require("./lib/autoload.php");
require_once("./lib/rudrax/boot/RudraX.php");

RudraX::invoke(array(
    'RX_MODE_MAGIC' => TRUE,
    'RX_MODE_DEBUG' => FALSE,
    'PROJECT_ROOT_DIR' => "./"
));

```

Documentaion
------------

[](#documentaion)

Now we are done with setup, lets start with how to write code in our project.

Sample Controller \[app/controller/MyController.php\]
-----------------------------------------------------

[](#sample-controller-appcontrollermycontrollerphp)

```
namespace app\controller {

    class MyController extends AbstractController
    {
        /**
         * @RequestMapping(url="login",method="GET",type="template")
         * @RequestParams(true)
         */
        public function login($model,$username,$password)
        {
            if($username == "user1" && $password == "xDddfdfd"){
              $this->user->setValid(TRUE);
              $this->user->role = "USER";
              $model->assign("username", $username);
              return "welcome"; // 'welcome' is path of smarty tempalte file in view folder
            } else {
              $this->user->setValid(FALSE);
               $model->assign("error", "Wrong credentials");
              return "login"; // 'login' is path of smarty tempalte file in view folder
            }
        }

        /**
         * @RequestMapping(url="myprofile",method="GET",type="template")
         * @RequestParams(true)
         */
        public function myprofile($model)
        {
            if($this->user->isValid()){
              $model->assign("username", $this->user->uname);
              return "user/myprofile"; // 'user/myprofile' is path of smarty tempalte file in view folder
            } else {
              $this->user->setValid(FALSE);
               $model->assign("error", "You need to login to view this page");
              return "login"; // 'login' is path of smarty tempalte file in view folder
            }
        }

        /**
         * @RequestMapping(url="info/school/{category}",method="GET",type="json")
         * @RequestParams(true)
         */
        public function schoolinfo($category)
        {
            if($this->user->isValid()){
              return array( "success" => true, "id" => 23,"name"=>"DAV Public School");
            } else {
              return array("success" => false,"error"=> "You need to login to view this info");
            }
        }

    }
}
```

Controller Annotation Options
-----------------------------

[](#controller-annotation-options)

All are method level annotations

- **@RequestMapping** - URL info - *url* - url pattern to match - *method* - request method \[GET|POST|PUT|DELETE\] - used only if mentioned - *type* - response type \[template|json|data\] - data - *auth* - if url acccess requires basic auth \[TRUE|FALSE\] - FALSE - *cache* - if response is cacheable by server \[TRUE|FALSE\] - FALSE - *guestcache* - cacheable only if guest user (user not valid) \[TRUE|FALSE\] - FALSE
- **@RequestParams** - if query params to be fetched and used in controller. \[TRUE|FALSE\] - FALSE
- **@Role** - \[user defined values\] - used only if mentioned, users with matching $user-&gt;{role} will have access to api.

Model Annotation Options
------------------------

[](#model-annotation-options)

Class Level Annotations

- **@Model** - \[sessionUser\] -
    - *sessionUser* - if used then that model will be used as default Session user, Class must extend app\\model\\AbstractUser

Tweakings
---------

[](#tweakings)

To build project/clear cache/rebuild annotations - Hit this URL from Browser

```
    http://localhost/?RX_MODE_BUILD=TRUE&RX_MODE_DEBUG=TRUE

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 79.9% 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 ~81 days

Recently: every ~273 days

Total

22

Last Release

2171d ago

### Community

Maintainers

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

---

Top Contributors

[![lnt](https://avatars.githubusercontent.com/u/5462166?v=4)](https://github.com/lnt "lnt (135 commits)")[![rahugee](https://avatars.githubusercontent.com/u/7886794?v=4)](https://github.com/rahugee "rahugee (30 commits)")[![avikarshaaertrip](https://avatars.githubusercontent.com/u/32539724?v=4)](https://github.com/avikarshaaertrip "avikarshaaertrip (2 commits)")[![avikarshasaha](https://avatars.githubusercontent.com/u/7456546?v=4)](https://github.com/avikarshasaha "avikarshasaha (1 commits)")[![improm](https://avatars.githubusercontent.com/u/10056427?v=4)](https://github.com/improm "improm (1 commits)")

---

Tags

apicontrollersmartyrudra

### Embed Badge

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

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

###  Alternatives

[d-scribe/laraquick

A collection of classes to be extended/used in laravel applications for quick development

371.8k1](/packages/d-scribe-laraquick)

PHPackages © 2026

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