PHPackages                             godfreybwaira/shani - 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. [Framework](/categories/framework)
4. /
5. godfreybwaira/shani

ActiveFramework[Framework](/categories/framework)

godfreybwaira/shani
===================

an open source web framework created with &amp;hearts; for you and I so that we can develop a fast, robust, scalable, secure web application with no hustles. Try It!

v1.0.0(1y ago)34GPL-3.0-onlyPHPPHP &gt;=7.4

Since Aug 4Pushed 1w ago1 watchersCompare

[ Source](https://github.com/godfreybwaira/shani-php)[ Packagist](https://packagist.org/packages/godfreybwaira/shani)[ Docs](https://github.com/godfreybwaira/shani-php)[ RSS](/packages/godfreybwaira-shani/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

```
# Shani Web Application Framework

```

**Shani** is an open source web framework designed to enable fast application development with minimal efforts while performance, security, creativity and modern web application development practices coexists.

Use Cases
---------

[](#use-cases)

Use **Shani** to build cilent-side or server-side application. You can also use your favorite front-end framework while **Shani** stands on back-end, or vice versa.

Main Features
-------------

[](#main-features)

1. Scalability
2. Robust (Error torelancy)
3. Secure (CSRF, Session Mgt, Authentication &amp; Authorization)
4. Fast
5. Multiprosess
6. Multithreaded
7. Event driven
8. Non-blocking
9. HMVC
10. Zero dependency
11. Dynamic Routing
12. Built-in web server
13. Web socket supports
14. State Management
15. Third-party library support
16. Best practices API supports
17. Supports JSON, XML, YAML, CSV and HTML
18. Load balancing (Round robin, preemptive, fixed)
19. Memory Management
20. Asynchronous

System requirements
-------------------

[](#system-requirements)

**Shani** runs well on Linux and Mac OS, However for Windows users they can use Windows Subsystem for Linux (WSL).

Installation
------------

[](#installation)

No installation is required.

Usage
-----

[](#usage)

To start **Shani** application web server, run the following command on terminal:

```
$ php index.php
```

### 1.0 Project Structure

[](#10-project-structure)

Shani Application has the following project structure

```
/root
	apps/ (Contains user applications. Create your applications here)
	config/ (Contains important server and hosts configurations)
		hosts/ (Contains host configurations files (hostname.yml). Register your application here)
			localhost.yml (can be customized)
		ssl/ (Contains server ssl certificate files for)
		mime.yml
		server.yml (Server configuration are written here, and can be customized.)
	gui/ (Contains support for GUI building)
		assets/ (Contains static files e.g: .css, .js,fonts etc shared by all applications)
		html/ (Contains html templates comes with framework)
	library/ (Contains files comes with framework that can be used directly by user application)
	shani/ (Contains core framework files)
	index.php (The entry point of a Shani application)

```

#### 1.0.1 User Application Structure

[](#101-user-application-structure)

All folders below can be renamed. A typical user application folder structure may appear as the following:

```
apps/
	demo/
        modules/
            module1_name/ (Can be any desired module name)
                data (Data layer)
                    dto (Data transfer object)
                    models (Application models)
                logic (Business logic layer)
                    services
                    controllers/
                        get/ (This is the request method as directory)
                            Resource.php (Can be any resource file)
                presentation (Presentation layer)
                    views/
                        resource/ (All lowercase, must match resource file name)
                    lang/
                        resource/ (All lowercase, must match resource file name)
                    breadcrumb/
                        resource/ (All lowercase, must match resource file name)
                            functions/
                                function-name.php (Must match function name in resource file class)
                            resource.php (must match module name)
                        module1_name.php (must match module name)

```

Let's assume we want to create an application called `demo`, our application has one module called `school` and one resource file called `Hello.php`.

Now, look at the following example of a resource file:

```
