PHPackages                             rifatxtra/feature-based-laravel - 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. rifatxtra/feature-based-laravel

Abandoned → [rifatxtra/laravel-featurekit](/?search=rifatxtra%2Flaravel-featurekit)Project

rifatxtra/feature-based-laravel
===============================

A feature-based Laravel template with Inertia.js, React, Tailwind, Breeze, and Sanctum for scalable modular web applications.

v1.0.0(7mo ago)010MITPHPPHP ^8.2

Since Oct 10Pushed 7mo agoCompare

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

READMEChangelog (1)Dependencies (13)Versions (2)Used By (0)

Feature-Based Laravel Template
==============================

[](#feature-based-laravel-template)

This Laravel template uses **feature-based architecture** for clean, modular, and scalable development.

---

Project Overview
----------------

[](#project-overview)

- Each feature has its own **Controllers, Models, Requests, Services, Routes**.
- Web and API routes are **auto-loaded** via `RouteServiceProvider`.
- Frontend pages are organized by feature under `resources/js/Features/`.
- Uses **Breeze + React + Tailwind + Inertia** for SPA pages.
- Default `routes/` folder is removed.

---

Installation / How to Use
-------------------------

[](#installation--how-to-use)

### Step 1: Clone the Template

[](#step-1-clone-the-template)

```
git clone https://github.com/rifatxtra/feature-based-laravel my-project
cd my-project
```

### Step 2: Install PHP Dependencies

[](#step-2-install-php-dependencies)

```
composer install
```

### Step 3: Install Node Dependencies

[](#step-3-install-node-dependencies)

```
npm install
```

### Step 4: Create .env File

[](#step-4-create-env-file)

```
cp .env.example .env
php artisan key:generate
```

### Step 5: Run Migrations (Optional)

[](#step-5-run-migrations-optional)

```
php artisan migrate
```

### Step 6: Start the Development Server

[](#step-6-start-the-development-server)

```
php artisan serve
npm run dev
```

Adding New Features
-------------------

[](#adding-new-features)

1.Create a feature folder inside app/Features/:

```
app/Features/FeatureName/
 ├── Controllers/
 ├── Models/
 ├── Requests/
 ├── Services/
 ├── routes.php
 └── api.php
```

2.Create frontend pages in:

```
resources/js/Features/FeatureName/
```

3.Define web routes in routes.php and API routes in api.php. These are auto-loaded via RouteServiceProvider.

4.Create Controllers extending App\\Http\\Controllers\\Controller.

5.Optionally create Requests and Services for validation and business logic.

Using Inertia Pages
-------------------

[](#using-inertia-pages)

Frontend pages live in:

resources/js/Features/FeatureName/PageName.jsx

In the controller:

```
return Inertia::render('FeatureName/PageName', [
    'title' => 'My Page',
]);
```

Routes automatically map to this page.

Notes
-----

[](#notes)

No routes/ folder is needed — all routes are in features.

Web and API routes are separated.

Middleware, Jobs, Mailables are kept global (not per feature).

Fully compatible with Laravel route caching:

php artisan route:cache
-----------------------

[](#php-artisan-routecache)

What We Changed from Default Laravel
====================================

[](#what-we-changed-from-default-laravel)

🧩 Feature-Based Architecture
----------------------------

[](#-feature-based-architecture)

- Converted Laravel to **feature-based structure**.
- Removed default `routes/` folder.
- Added `app/Features/` for Controllers, Models, Requests, Services, and feature-specific routes.
- Frontend pages moved to `resources/js/Features/` instead of `Pages`.

---

🛣️ Routing
----------

[](#️-routing)

- All web and API routes are **auto-loaded** via `RouteServiceProvider`.
- No need to manually update `bootstrap/app.php`.
- Web routes use `'web'` middleware, API routes use `'api'` prefix.

---

🎨 Frontend
----------

[](#-frontend)

- Pages folder renamed from `Pages` → `Features`.
- Fully compatible with **Inertia + React + Tailwind**.
- Each feature can contain multiple pages and components.

---

⚙️ Global Resources
-------------------

[](#️-global-resources)

- Middleware, Jobs, and Mailables remain **global**.
- Feature folders contain only **feature-specific logic**.
- Shared resources remain untouched.

---

🚀 Scalability
-------------

[](#-scalability)

- Each feature is **modular** (backend + frontend).
- Easy to add new features without touching unrelated code.
- Supports converting features into **reusable packages**.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance65

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

215d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/32150f5ce6177a6b83f819fbb6ad6c7dff782c488e12a5a7a72ff3d7769a4357?d=identicon)[rifatxtra](/maintainers/rifatxtra)

---

Tags

feature-based-laravelinertiajsinertiajs-reactlaravellaravel-templatescalable-laravel-templatespatailwindcsslaravelsanctumtailwindreactmodularinertiajsbreezeSPAfeature-based

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rifatxtra-feature-based-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/rifatxtra-feature-based-laravel/health.svg)](https://phpackages.com/packages/rifatxtra-feature-based-laravel)
```

PHPackages © 2026

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