PHPackages                             baremetalphp/baremetalphp - 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. baremetalphp/baremetalphp

ActiveProject[Framework](/categories/framework)

baremetalphp/baremetalphp
=========================

A new project built with Bare Metal PHP

v0.2.1(5mo ago)211MITHackPHP &gt;=8.0

Since Dec 6Pushed 5mo agoCompare

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

READMEChangelogDependencies (1)Versions (9)Used By (0)

🚀 Bare Metal PHP
================

[](#-bare-metal-php)

### A modern PHP framework with a Go-powered application server

[](#a-modern-php-framework-with-a-go-powered-application-server)

BareMetalPHP is a lightweight, high-performance PHP framework designed around a simple idea:

**PHP should run fast by default — without FPM, without heavy stacks, and without hacks.**

Instead of relying on traditional PHP-FPM, BareMetalPHP includes an optional **Go application server** that manages persistent PHP workers. This provides:

- Huge performance gains over cold-start PHP
- True parallelism (fast + slow worker pools)
- Zero-config hot reload
- Static asset offloading
- A fast, modern DX similar to Node, Go, or Rust

If you want Laravel’s experience but not Laravel’s overhead, this is your framework.

---

✨ Key Features
--------------

[](#-key-features)

### 🟨 1. Go-Powered App Server (the BareMetal Runtime)

[](#-1-go-powered-app-server-the-baremetal-runtime)

BareMetalPHP includes a Go runtime that functions like a lightweight alternative to Swoole or Laravel Octane:

- Persistent PHP worker pool
- Fast + slow request classification
- Hot reload for PHP &amp; routes
- Static file serving
- Efficient Go→PHP bridge protocol

Enable it with:

```
APPSERVER_ENABLED=true
```

Start it with:

```
php mini go:serve
```

Dry run:

```
php mini go:serve --dry-run
```

### 🎯 2. A modern, minimal PHP framework

[](#-2-a-modern-minimal-php-framework)

BareMetalPHP provides:

- Simple router
- Controller + method resolution
- PSR-7-style Request &amp; Response
- Lightweight dependency injection container
- View layer
- Migrations + SQLite testing utilities
- `mini` CLI (generators, migrations, test tools)

It is intentionally small, readable, and fast.

### ✔️ 3. Fully tested

[](#️-3-fully-tested)

The framework is covered by a deterministic test suite:

- Routing, container, HTTP kernel
- Database + migrations + rollback
- Go app server installer
- Go -&gt; PHP worker bridge

Run all tests:

```
vendor/bin/phpunit
```

### 🧰 Installation

[](#-installation)

Create a new BareMetalPHP project:

```
composer create-project baremetalphp/baremetalphp my-app
cd my-app
```

Run the built-in PHP server:

```
php mini serve
```

#### Install the Go application server

[](#install-the-go-application-server)

```
php mini go:install
go mod tidy
php mini go:serve
```

Default Go server URL:

```
http://localhost:8080
```

### ⚙️ Configuration `(config/appserver.php)`

[](#️-configuration-configappserverphp)

```
return [
    'enabled'      => env('APPSERVER_ENABLED', false),
    'fast_workers' => (int) env('APPSERVER_FAST_WORKERS', 4),
    'slow_workers' => (int) env('APPSERVER_SLOW_WORKERS', 2),
    'hot_reload'   => (bool) env('APPSERVER_HOT_RELOAD', true),

    'static' => [
        ['prefix' => '/assets/', 'dir' => 'public/assets'],
        ['prefix' => '/build/',  'dir' => 'public/build'],
        ['prefix' => '/css/',    'dir' => 'public/css'],
        ['prefix' => '/js/',     'dir' => 'public/js'],
        ['prefix' => '/images/', 'dir' => 'public/images'],
        ['prefix' => '/img/',    'dir' => 'public/img'],
    ],
];
```

The Go installer generates a matching `go_appserver.json` automatically.

### 🧩 Architecture Overview

[](#-architecture-overview)

```
                   ┌──────────────────────────────┐
                   │        Go HTTP Server         │
                   │  - static files               │
     Request ─────▶│  - routing fallback           │──────────┐
                   │  - hot reload watcher         │          │
                   └──────────────────────────────┘          │
                                                             ▼
                                               ┌──────────────────────────┐
                                               │   PHP Worker Pool        │
                                               │  (persistent processes)  │
                                               └──────────────────────────┘
                                                             │
                                                             ▼
                                               ┌──────────────────────────┐
                                               │ BareMetalPHP Framework  │
                                               │  - routing               │
                                               │  - container             │
                                               │  - controllers           │
                                               │  - views                 │
                                               │  - database/migrations   │
                                               └──────────────────────────┘

```

### 📦 Commands

[](#-commands)

```
php mini serve
php mini make:controller Foo
php mini make:migration create_users
php mini migrate
php mini migrate:rollback

php mini install:go-appserver
php mini go:serve
php mini go:serve --dry-run
```

### 🔖 Version 0.2.0 Release Notes

[](#-version-020-release-notes)

- Go application server is now a first-class feature
- `go:serve` command added
- `go:install` scaffolding generator added
- `go_appserver.json` generated from PHP config
- Persistent PHP worker bridge implemented
- Better migration rollback logic
- Higher overall test coverage

### 🛣 Roadmap

[](#-roadmap)

- Zero-downtime worker recycling
- WebSockets via Go
- Cache subsystem
- Async jobs via Go sidecar
- API rate limiting
- Events + Subscribers
- Optional queue runner

### 🤝 Contributing

[](#-contributing)

Contributions, ideas, and issues are welcome.

### 📄 License

[](#-license)

MIT

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance72

Regular maintenance activity

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.2% 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

8

Last Release

161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ad5e577ed76ebd259d353dd03d434b5e835d43786398314ea4876fa75138796?d=identicon)[elliota43](/maintainers/elliota43)

---

Top Contributors

[![eanderson43](https://avatars.githubusercontent.com/u/153352537?v=4)](https://github.com/eanderson43 "eanderson43 (13 commits)")[![elliota43](https://avatars.githubusercontent.com/u/42547861?v=4)](https://github.com/elliota43 "elliota43 (5 commits)")

---

Tags

baremetalphpframeworkphp

### Embed Badge

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

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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