npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-php-starter

v2.2.0

Published

Unified PHP + Laravel project scaffolding CLI. Scaffold raw PHP (Vanilla/MVC/API) or a full Laravel app with optional React frontend, auth, Docker, CI, and testing.

Readme

create-php-starter

npm version License: MIT Node.js

Unified PHP + Laravel project scaffolding CLI. Scaffold raw PHP (Vanilla / MVC / API) or a full Laravel app with optional React frontend, auth, Docker, CI, and testing — in seconds.


Install & Quick Start

npx create-php-starter

Or install globally:

npm install -g create-php-starter
create-php-starter

Startup Experience

Every run opens with an animated ASCII bat character that draws itself line-by-line, followed by the Wayne Manor banner — showing your saved presets and quick-tip panel alongside a greeting. Then the interactive prompt flow begins.

Animation is skipped automatically in non-TTY environments (pipes, CI).


Modes

The CLI opens with a mode selector:

  • Custom PHP — Vanilla SPA, MVC, or API-only (raw PHP, no framework)
  • Laravel — Framework-based app with optional React/Inertia frontend, Sanctum/Passport auth, Docker, CI, and testing

Usage

create-php-starter [project-name] [options]
create-php-starter add <feature>

Core Options

| Flag | Values | Description | |------|--------|-------------| | --mode | php | laravel | Project mode (default: interactive prompt) | | --stack | vanilla | mvc | api (php) | PHP stack | | | api | web | full | minimal (laravel) | Laravel app type | | --frontend | none | react-vite | inertia | Frontend setup (Laravel only) | | --auth | sanctum | passport | none (laravel) | Auth driver | | | yes | no (php) | Include auth scaffolding | | --db | mysql | pgsql | mongodb | sqlite | Database driver (default: mysql) |

Extra Flags

| Flag | Description | |------|-------------| | --docker | Add Docker setup (docker-compose.yml, Dockerfile) | | --ci | Add GitHub Actions CI/CD workflow | | --testing | Add testing setup (Pest / PHPUnit / Vitest) | | --ts | Use TypeScript for the React frontend | | --preset <name> | Load a saved preset from ~/.webstarterrc.json | | --no-git | Skip git initialization | | --yes | Accept all defaults, skip optional prompts | | --dry-run | Show what would be created without writing anything | | --verbose | Print every shell command as it runs |

add Subcommand

Retrofit features into an existing project:

create-php-starter add sanctum
create-php-starter add docker
create-php-starter add github-actions
create-php-starter add pest

Examples

# Fully interactive
create-php-starter

# Laravel API with PostgreSQL + Sanctum
create-php-starter my-api --mode=laravel --stack=api --db=pgsql --auth=sanctum

# Laravel full stack with Inertia + React (TypeScript) + Docker + CI
create-php-starter my-app --mode=laravel --frontend=inertia --ts --docker --ci

# PHP MVC project
create-php-starter my-app --mode=php --stack=mvc --db=mysql

# Load a saved preset
create-php-starter my-app --preset=my-api

# Preview without writing files
create-php-starter my-app --mode=laravel --dry-run

PHP Mode — Project Structures

Vanilla

Full SPA-ready structure with HTML shell, CSS layers, modular JS, and optional PHP backend.

project-name/
├── assets/
│   ├── css/          main, layout, components, animations
│   ├── js/           app.js, router.js, components/, pages/public|user|admin/
│   ├── fonts/
│   └── images/
├── api/              PHP endpoints
├── config/           env.php, constants.php, response.php
├── includes/         header.php, helpers.php, rate-limiter.php
├── pages/
│   ├── public/       login.php, forgot-password.php, reset-password.php
│   ├── user/         dashboard.php
│   └── admin/        dashboard.php
├── database/         schema.sql (Complex only)
├── index.php
├── .env
├── .env.example
├── .htaccess
├── composer.json
├── README.md
└── ARCHITECTURE.md

Complexity scaling:

  • Simple — base folders only
  • Medium — adds utils/, auth pages, admin panel option
  • Complex — adds database/, auth + admin always included, full SPA page set

MVC

PHP MVC structure routed through a single front controller.

project-name/
├── app/
│   ├── Controllers/  BaseController.php stub
│   ├── Models/       BaseModel.php stub
│   └── Views/
├── routes/
│   └── web.php
├── public/
│   └── index.php     Front controller
├── config/
└── includes/

API

PHP-only backend with no frontend assets.

project-name/
├── api/
├── config/           env.php, constants.php, response.php
├── includes/         helpers.php, rate-limiter.php
├── database/         schema.sql (if selected)
├── uploads/
├── index.php         JSON health-check endpoint
├── .env
└── .env.example

Laravel Mode — What Gets Scaffolded

Depending on your selected options, the Laravel scaffold can include:

  • Fresh Laravel installation via Composer
  • React (Vite) or Inertia.js frontend
  • TypeScript support
  • Sanctum or Passport authentication
  • MySQL, PostgreSQL, MongoDB, or SQLite configuration
  • Docker setup (docker-compose.yml, Dockerfile)
  • GitHub Actions CI/CD workflow
  • Pest or PHPUnit testing setup

Presets

Save your answers on first run and reuse them:

create-php-starter my-app --preset=my-api

Presets are stored in ~/.webstarterrc.json. Your author name is also saved on first run — you won't be asked again.


Requirements

| Requirement | Version | |-------------|---------| | Node.js | >= 16 | | PHP (optional) | >= 7.4 | | Composer (optional) | Any | | Git (optional) | Any |

PHP, Composer, and Git are only required when scaffolding features that use them. The CLI checks for these at startup and will guide you if anything is missing.


License

MIT — mrwayne-dev