arefshojaei/routex

A minimal PHP framework for base file routing

Maintainers

Package info

github.com/ArefShojaei/Routex

Type:project

pkg:composer/arefshojaei/routex

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-04-09 20:10 UTC

This package is auto-updated.

Last update: 2026-04-10 11:16:03 UTC


README

PHP File based Routing

A lightweight file‑based Routing system inspired by Next.js, built with PHP and structured around the MVC architecture.

Routing patterns

pages/
|
├── index.php                →  /
├── about.php                →  /about
├── auth
|   |     
│   ├── login.php            →  /auth/login
│   └── register.php         →  /auth/register
| 
├── products 
|   |     
│   ├── index.php            →  /products
│   └── [id].php             →  /products/:id
| 
├── admin  
|   |    
│   └── [id]
|       |
│       └── dashboard.php    →  /admin/:id/dashboard
|

Folder structure (MVC)

Project
|
├── app/
│   ├── Controllers/
│   └── Models/
|
├── config/
│   └── app.php
│   └── database.php
│
├── pages/        (Views)
│   └── index.php
│
├── public/
│   ├── assets/
│   └── index.php
│
├── vendor/
├── .gitignore
├── composer.json
└── README.md

Installation

Composer

composer create-project arefshojaei/routex my-app

Github

git clone https://github.com/ArefShojaei/Routex/Routex.git

How to run the App?

You can use two ways for running such as:

Built-in PHP web-server

php -S [host]:[port] -t public/