PHPackages                             ldaidone/frankenforge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ldaidone/frankenforge

ActiveProject[Utility &amp; Helpers](/categories/utility)

ldaidone/frankenforge
=====================

Minimal FrankenPHP worker-mode kernel for building HTMX-first applications in raw PHP 8.3

0.1.1-beta1(3w ago)03Apache-2.0PHPPHP ^8.3

Since Apr 12Pushed 3w agoCompare

[ Source](https://github.com/ldaidone/frankenforge)[ Packagist](https://packagist.org/packages/ldaidone/frankenforge)[ RSS](/packages/ldaidone-frankenforge/feed)WikiDiscussions main Synced 1w ago

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

[![FrankenForge](public/assets/logo.jpg)](public/assets/logo.jpg)FrankenForge
============

[](#frankenforge)

**Minimal FrankenPHP worker-mode kernel for building HTMX-first applications in raw PHP 8.3**

Persistent runtime • Explicit architecture • No framework boot cycle

[![PHP](https://camo.githubusercontent.com/495d65685fb02a60994142fb45d699a16a3267496cdb9e574179be587bf096e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d2532333737374242343f6c6f676f3d706870)](https://php.net)[![FrankenPHP](https://camo.githubusercontent.com/857542d08fa81a76ddd1a99d7f52da65c0817697d1c98f5cecc34ee617b8d720/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4672616e6b656e5048502d776f726b65722d2532333444344434443f6c6f676f3d646174613a696d6167652f7376672b786d6c3b6261736536342c50484e325a79423462577875637a30696148523063446f764c336433647935334d793576636d63764d6a41774d43397a646d6369494864705a48526f505349784e694967614756705a326830505349784e694967646d6c6c64304a76654430694d43417749444930494449304969426d6157787350534a756232356c4969427a64484a766132553949694e6d5a6d596949484e30636d39725a53313361575230614430694d69492b5048427662486c736157356c4948427661573530637a30694d5449674d6941794d69413349444979494445334944457949444979494449674d5463674d69413349444579494449694c7a34386347397365577870626d556763473970626e527a50534979494463674d5449674d5449674d6a49674e794976506a78776232783562476c755a53427762326c7564484d39496a45794944457949444579494449794969382b5043397a646d632b)](https://frankenphp.dev)[![HTMX](https://camo.githubusercontent.com/b688b3ebfdf5ca92ee41f45dd6d464c7c6972440240d58a3806bc1b926a81d7e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f48544d582d322d253233333336364343)](https://htmx.org)[![Tailwind](https://camo.githubusercontent.com/a2d0f22e484f06d2e46567fbe865c2d8fe10c4bfa0d650d261758fc3fd5ddccf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e642d342d2532333036423644343f6c6f676f3d7461696c77696e64637373)](https://tailwindcss.com)[![License](https://camo.githubusercontent.com/5cbe8e3913ece794dd5394e8c7db4c24c7d70384f2044f42d4e0f1aecec602a9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d253233413331463334)](LICENSE)[![Roadmap](https://camo.githubusercontent.com/8db02136698bcbe0cd7c51dee3b99dcf298abe72e8aefe30932b5d785d53e7dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526f61646d61702d536565253230524f41444d41502e6d642d253233413331463334)](ROADMAP.md)

---

What is FrankenForge?
---------------------

[](#what-is-frankenforge)

FrankenForge is a lightweight backend kernel designed around **FrankenPHP worker mode**.

Instead of bootstrapping an entire framework on every request, FrankenForge keeps your application container, configuration, and services resident in memory while handling fresh requests inside a persistent worker loop.

It combines:

- **FrankenPHP** for persistent PHP workers
- **HTMX** for server-driven interactivity
- **Raw PHP templates** for rendering
- **DDD-friendly structure** for maintainable applications
- **Minimal abstractions** and explicit dependency wiring

The goal is simple:

> Give developers a fast and structured backend foundation without hiding application behavior behind deep framework layers.

---

Status
------

[](#status)

FrankenForge is currently in beta.

The core runtime and demo application are functional and usable for experimentation, internal tools, and lightweight applications, but APIs and internal conventions may still evolve.

Feedback and contributions are welcome.

---

Why FrankenForge?
-----------------

[](#why-frankenforge)

### Persistent Runtime

[](#persistent-runtime)

Traditional PHP applications restart large parts of the application lifecycle for every request.

FrankenForge uses FrankenPHP worker mode:

```
Worker boots once
 ├── Container
 ├── Config
 ├── Database connection
 └── Shared services

Each request:
 ├── Fresh Request object
 ├── Fresh Response object
 └── Route dispatch
```

This reduces:

- repeated bootstrapping
- runtime overhead
- unnecessary allocations

---

### HTMX-first Development

[](#htmx-first-development)

FrankenForge is designed around server-rendered HTML and hypermedia interactions.

You can build:

- dashboards
- admin panels
- internal tools
- lightweight SaaS products
- JSON APIs

without introducing:

- SPA complexity
- frontend build pipelines
- Node.js runtimes

---

### Explicit Architecture

[](#explicit-architecture)

FrankenForge favors:

- constructor injection
- stateless services
- immutable entities
- isolated domain logic
- readable request flow

No magic containers. No hidden runtime behavior.

---

Quick Start
-----------

[](#quick-start)

### Install

[](#install)

```
composer create-project ldaidone/frankenforge my-app --stability=beta
```

### Start the application

[](#start-the-application)

```
cp .env.example .env
touch storage/app.db

make dev
make migrate_up
make seed
```

Open:

```
http://localhost
```

[![FrankenForge Landing](public/assets/docs/landing.png)](public/assets/docs/landing.png)

Default login:

```
admin@frankenforge.dev
changeme
```

 [![FrankenForge Login](public/assets/docs/login.png)](public/assets/docs/login.png)

---

Included Demo Application
-------------------------

[](#included-demo-application)

FrankenForge ships with a complete demo/showcase application to help developers explore the architecture and runtime model quickly.

### Admin Dashboard

[](#admin-dashboard)

[![Dashboard Overview](public/assets/docs/overview.png)](public/assets/docs/overview.png)

Included features:

- Authentication
- Profile management
- Database browser
- Migration runner
- Environment editor
- Log viewer
- HTMX-powered dashboard widgets
- Server-sent events (SSE)
- Flash messages
- JSON API endpoints

The demo is intentionally practical and designed as:

- a learning resource
- a reference architecture
- a real starting point for internal tools

---

Architecture Overview
---------------------

[](#architecture-overview)

 ```
graph TD
    Browser["🌐 Browser"]
    Worker["🐘 FrankenPHP Worker"]
    Router["🔀 Router"]
    Middleware["🛡️ Middleware"]
    Action["⚡ Action"]

    Infrastructure[("🗄️ Infrastructure")]

    Browser --> Worker
    Worker --> Router
    Action --> AppService
    AppService --> Domain
    Domain --> Infrastructure

    subgraph IO ["I/O & Entry"]
        direction LR
        Router --> Middleware
        Middleware --> Action
    end

    subgraph Core ["Core Logic"]
        AppService["📦 Application Service"]
        Domain["🧩 Domain Layer"]
    end

    style Browser fill:#ffffff,stroke:#0055ff,stroke-width:2px
    style Worker fill:#ffffff,stroke:#4F5B93,stroke-width:2px
    style Router fill:#ffffff,stroke:#d4a017,stroke-width:2px
    style AppService fill:#ffffff,stroke:#d4a017,stroke-width:2px
    style Domain fill:#ffffff,stroke:#d4a017,stroke-width:2px
    style Action fill:#ffffff,stroke:#d4a017,stroke-width:2px
    style Middleware fill:#ffffff,stroke:#d4a017,stroke-width:2px
    style Infrastructure fill:#ffffff,stroke:#2d572d,stroke-width:2px
    style Core fill:#fff,stroke:#333,stroke-dasharray:5 5
    style IO fill:#fff,stroke:#333,stroke-dasharray:5 5
    classDef default color:#969696,font-weight:bold
```

      Loading ### Core Principles

[](#core-principles)

PrincipleDescriptionExplicit DIDependencies wired manually through constructorsStateless servicesShared safely across requestsImmutable entitiesDomain entities use readonly structuresIsolated domainsBusiness logic separated from infrastructureWorker-aware designRuntime optimized for persistent execution---

Project Structure
-----------------

[](#project-structure)

```
src/
├── Core/          # Reusable kernel components
├── Domains/       # Application domains
└── Shared/        # Shared infrastructure
```

### Kernel Components

[](#kernel-components)

ComponentPurposeContainerLightweight dependency injectionRouterFastRoute-based dispatcherRequest / ResponseHTTP abstractionViewNative PHP templatingValidatorRequest validationResponderHTML / HTMX / JSON negotiationCSRFSession-bound token protectionLoggingJSON-line loggerErrorHandlerError rendering---

Example Worker Loop
-------------------

[](#example-worker-loop)

```
while (frankenphp_handle_request(function () use ($container): void {
    session_start();

    $container
        ->get('router')
        ->dispatch();
})) {
    // Application boot happens once
}
```

---

Included Tooling
----------------

[](#included-tooling)

### Development Commands

[](#development-commands)

```
make dev
make stop
make shell
make test

make migrate_up
make migrate_down
make migrate_status

make seed
make clean
```

### Manual CLI

[](#manual-cli)

```
php bin/migrate.php up
php bin/migrate.php down
php bin/migrate.php status

php bin/seed.php all -f
```

---

Technology Stack
----------------

[](#technology-stack)

ComponentChoiceWhyRuntime**FrankenPHP** (worker mode)Persistent in-memory state, no per-request bootstrappingLanguage**PHP 8.3+**Typed properties, readonly classes, enums, named argumentsRouting**nikic/fast-route**Fast, simple, no magic — just route matchingTemplating**Native PHP** (output buffering)No learning curve, no compilation step, maximum performanceFrontend**HTMX 2**Server-rendered HTML, hypermedia-driven interactivityStyling**Tailwind CSS 4** (CDN)Utility-first, no build step, no Node.jsDatabasePDO-compatible (SQLite included by default)Zero-config, WAL mode for concurrency, file-basedAuth**Session-based** + Argon2idSimple, secure, no external dependenciesTesting**PHPUnit 13**Standard PHP testing framework---

Good Fit For
------------

[](#good-fit-for)

Use FrankenForge if...Probably not if...You like explicit backend architectureYou want large plugin ecosystemsYou enjoy server-rendered appsYou prefer SPA-first workflowsYou want low runtime overheadYou prefer heavy convention systemsYou like HTMX and hypermediaYou want full-stack frontend toolingYou want control over application structureYou want batteries-included frameworks---

Philosophy
----------

[](#philosophy)

FrankenForge is not trying to replace every PHP framework.

It is optimized for developers who want:

- explicit control
- persistent runtimes
- low abstraction overhead
- server-driven applications
- understandable request flow

The project intentionally stays small, readable, and close to raw PHP.

---

Contributing
------------

[](#contributing)

Issues, discussions, and pull requests are welcome.

The project is still evolving and feedback is valuable — especially around:

- worker lifecycle patterns
- HTMX workflows
- performance
- developer experience
- architectural decisions

---

Support
-------

[](#support)

If you find FrankenForge useful, consider supporting the project:

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/leodaido)

---

Built for developers who enjoy understanding their runtime.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance94

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

27d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bd0f2bae2cfbb34ebb1e5baeb9003c5469b6e67c824e8dcd5d68ca38d904118?d=identicon)[ldaidone](/maintainers/ldaidone)

---

Top Contributors

[![ldaidone](https://avatars.githubusercontent.com/u/1054693?v=4)](https://github.com/ldaidone "ldaidone (37 commits)")

---

Tags

phpfrankenphpkernelhtmxworker-mode

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ldaidone-frankenforge/health.svg)

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

PHPackages © 2026

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