PHPackages                             michaelyousrie/batframe-skeleton - 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. [Templating &amp; Views](/categories/templating)
4. /
5. michaelyousrie/batframe-skeleton

ActiveProject[Templating &amp; Views](/categories/templating)

michaelyousrie/batframe-skeleton
================================

A skeleton to bootstrap a new Batframe application with `composer create-project`.

v1.2.0(1mo ago)025↓75%MITPHPPHP ^8.1

Since Jul 12Pushed 1mo agoCompare

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

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

Batframe Skeleton
=================

[](#batframe-skeleton)

A starting point for a new [Batframe](https://github.com/michaelyousrie/batframe)application. It gives you the same layout as the framework's example app, ready to run.

Create a project
----------------

[](#create-a-project)

```
composer create-project michaelyousrie/batframe-skeleton my-app
cd my-app
php batbelt serve
```

Then open . `composer create-project` installs the dependencies and copies `.env.example` to `.env` for you.

Layout
------

[](#layout)

```
batbelt              # your project's CLI (see below)
public/index.php     # front controller (document root)
src/App.php          # your app class, extends Batframe
src/Routes/          # route traits, grouped by feature
views/               # Blade templates
pages/               # auto-routed static pages
storage/cache/       # compiled Blade cache (writable)
.env                 # environment (copied from .env.example)

```

Add a route
-----------

[](#add-a-route)

Every verb-prefixed public method becomes an endpoint, with the route inferred from the method name. Put them on your `App` class, or group them into a trait under `src/Routes/` and `use` it, the way `PageRoutes` already is.

`php batbelt makeRoute Product` creates the trait and wires it in for you:

```
// src/Routes/ProductRoutes.php
public function getProducts(): array        // GET /products
{
    return ['products' => []];
}

public function getProduct(int $id): array  // GET /product/{id}
{
    return ['id' => $id];
}
```

`php batbelt routes` shows you everything the app answers, pages included.

See the [Batframe documentation](https://github.com/michaelyousrie/batframe) for the full routing convention, request and response helpers, views, and config.

Batbelt
-------

[](#batbelt)

`batbelt` is your project's command line tool. It is a single file with no dependencies, and it is yours: open it and edit it.

```
php batbelt                      # list every command
php batbelt  --help     # what a command takes

php batbelt serve                # http://localhost:1939 (alias: server)
php batbelt serve --port=4000    # somewhere else
php batbelt routes               # every route your app resolves
php batbelt makeRoute Product    # scaffold src/Routes/ProductRoutes.php and wire it in
php batbelt makePage pricing     # scaffold pages/pricing.blade.php, live at /pricing
php batbelt clearCache           # empty storage/cache
```

`composer serve` still works and runs `php batbelt serve`.

### Add a command

[](#add-a-command)

Batbelt works the way Batframe works. Batframe turns the public methods of your `App` class into routes; Batbelt turns the public methods of its `Batbelt` class into commands. So a new command is a new public method, named exactly as you want to type it:

```
// batbelt
final class Batbelt extends Belt
{
    /**
     * Say hello.
     *
     * @param string $name  Who to greet.
     * @param bool   $shout Use your outside voice.
     */
    public function greet(string $name, bool $shout = false): int
    {
        $this->line($shout ? strtoupper("hi $name") : "hi $name");

        return 0;
    }
}
```

```
php batbelt greet Ada --shout
```

That is the whole thing. The parameters became arguments: one without a default is positional, one with a default becomes an optional `--flag` starting from that default, and the declared type does the casting, so `--port=abc` on an `int` is a clean error instead of a crash. The docblock became the help text. Private methods are helpers rather than commands, which is where `--help` and the exit code came from without you writing either.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~1 days

Total

6

Last Release

45d ago

Major Versions

v0.1.1 → v1.0.02026-07-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/392cca19e7a31dcf8e05a21eac63da15ebcfe3536d1fb14504dc30d7637f09ac?d=identicon)[michaelyousrie](/maintainers/michaelyousrie)

---

Top Contributors

[![michaelyousrie](https://avatars.githubusercontent.com/u/22775923?v=4)](https://github.com/michaelyousrie "michaelyousrie (6 commits)")

---

Tags

batframemicroframeworkphpskeletonstartertemplatemicroframeworkSkeletonstarterbatframe

### Embed Badge

![Health badge](/badges/michaelyousrie-batframe-skeleton/health.svg)

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

###  Alternatives

[tightenco/jigsaw-blog-template

Blog starter template for Jigsaw static site generator by Tighten

9468.0k](/packages/tightenco-jigsaw-blog-template)[tightenco/jigsaw-docs-template

Documentation starter template for Jigsaw static site generator by Tighten

5027.9k](/packages/tightenco-jigsaw-docs-template)

PHPackages © 2026

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