PHPackages                             reqiler/reqziel - 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. reqiler/reqziel

ActiveProject

reqiler/reqziel
===============

Reqziel PHP Starter Project

v1.0.1(3mo ago)012MITPHPPHP &gt;=8.0

Since Jan 22Pushed 3mo agoCompare

[ Source](https://github.com/reqiler/reqziel)[ Packagist](https://packagist.org/packages/reqiler/reqziel)[ RSS](/packages/reqiler-reqziel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Reqziel
=======

[](#reqziel)

### App Router–Style PHP Framework

[](#app-routerstyle-php-framework)

**Reqziel** is a lightweight PHP framework inspired by modern App Router concepts. It brings **file-based routing, nested layouts, middleware, and API routes** to PHP — without Laravel or heavy abstractions.

> 🚀 Built for learning, experimentation, and lightweight production
> 🧠 Designed to understand how modern frameworks work under the hood

---

📦 Create Project
----------------

[](#-create-project)

```
composer create-project reqiler/reqziel my-reqziel-app
```

Start the development server:

```
composer dev
```

or

```
php cli/app.php dev
```

Open in browser:

```
http://localhost:8000

```

---

✨ Features
----------

[](#-features)

- 📁 File-based Routing
- 🔀 Dynamic Routes using `[param]`
- 🧩 Route Groups using `(group)` (not affecting URL)
- 🧱 Nested Layout System
- 🔐 Middleware / Route Guards
- 🔌 API Routes under `/api`
- ⚙️ Dev Command similar to modern frameworks
- ❌ No Laravel, No heavy framework

---

📂 Project Structure
-------------------

[](#-project-structure)

```
my-reqziel-app/
├─ app/
│  ├─ page.php              # /
│  ├─ layout.php            # root layout
│  ├─ post/
│  │  └─ [id]/
│  │     └─ page.php        # /post/123
│  └─ (auth)/
│     └─ admin/
│        ├─ layout.php
│        └─ page.php        # /admin (protected)
│
├─ api/
│  └─ users.php             # /api/users
│
├─ bootstrap/
│  ├─ app.php               # bootstrap
│  ├─ router.php            # file-based router
│  └─ middleware.php        # middleware handler
│
├─ public/
│  ├─ index.php             # front controller
│  ├─ router.php            # dev router (php -S)
│  └─ .htaccess             # Apache rewrite
│
├─ cli/
│  └─ app.php               # CLI commands
│
├─ storage/
├─ composer.json
└─ README.md

```

---

🧱 Layout System
---------------

[](#-layout-system)

Layouts are resolved automatically based on directory hierarchy.

Rules:

- The closest `layout.php` wraps the page
- Root `app/layout.php` wraps everything
- Layouts receive rendered page content via `$content`

Example:

```
app/layout.php
app/(auth)/admin/layout.php

```

Inside `layout.php`:

```
DOCTYPE html>

```

---

🧠 Metadata (Title &amp; Description)
------------------------------------

[](#-metadata-title--description)

Reqziel uses a **layout-based metadata system**.

- `` and `` tags live in `layout.php`
- Pages can override metadata using the `$metadata` array
- Pages should not render `` or `` tags

### Example

[](#example)

**app/page.php**

```

Welcome
```

**app/post/\[id\]/page.php**

```

Post
