PHPackages                             akirk/wp-app - 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. akirk/wp-app

ActiveLibrary[Framework](/categories/framework)

akirk/wp-app
============

A lightweight framework for building web applications on WordPress with routing, admin bar integration, and theme isolation

v1.3.1(1w ago)52.4k1GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since Jan 23Pushed 1w agoCompare

[ Source](https://github.com/akirk/wp-app)[ Packagist](https://packagist.org/packages/akirk/wp-app)[ RSS](/packages/akirk-wp-app/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (12)Versions (23)Used By (1)

WpApp Framework
===============

[](#wpapp-framework)

Build modern web applications on WordPress with routing, admin bar integration, and theme isolation.

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

[](#quick-start)

Scaffold a new plugin with one command:

```
composer create-project akirk/create-wp-app my-app
```

Which gives you this little wizard:

```
Creating WpApp plugin: my-app
----------------------------------------

Plugin name [My App]:
Namespace [MyApp]:
Author name []:
URL path [my-app]:

Setup type:
  [m] Minimal - simple WpApp setup
  [f] Full - with BaseApp structure
Choose [f]:

✓ Updated plugin-name.php
✓ Updated templates/index.php
✓ Updated src/App.php
✓ Renamed plugin-name.php to my-app.php
✓ Created .gitignore
✓ Updated composer.json
✓ Regenerated autoloader
✓ Updated README.md
✓ Cleaned up setup scripts

Done! Your plugin is ready.

Next steps:

  Option A: Run locally with WordPress Playground
    npx @wp-playground/cli@latest server --auto-mount=my-app --login

  Option B: Install in WordPress
    1. Move this folder to wp-content/plugins/
    2. Activate the plugin in WordPress
    3. Visit /my-app/ to see your app

```

Which gives you something like this:

[![create-wp-app](https://private-user-images.githubusercontent.com/203408/542702942-f0180015-96e9-4ae1-af64-1cec0bae9de1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIU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JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYzMFQwODU0NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iZTZmMjRlMTYwMDI3MjRkZjJkMTExOTIzOTgxYTljNmFiODMwYmYzZDQ4ZmU5YjVmNzZhZGMxNmUxNTE1YWU4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.aLeIpdS-WQgcpofjWjTdsbMA7ZoaNShjsMLsqG8pKtg)Try it Now
----------

[](#try-it-now)

Try the examples instantly in your browser with WordPress Playground:

- [Minimal App](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/akirk/wp-app/main/blueprints/minimal-app.json) - The simplest possible WpApp
- [Community App](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/akirk/wp-app/main/blueprints/community-app.json) - Full-featured example with database, REST API, and admin integration

Why WordPress for Web Applications?
-----------------------------------

[](#why-wordpress-for-web-applications)

WordPress isn't just for blogs. It's a powerful foundation for web applications.

**For developers:**

- **Built-in User Management** - Authentication, roles, and permissions out of the box
- **Admin Interface** - Professional backend without building from scratch
- **Security &amp; Updates** - Automatic security patches and proven practices
- **Global Ready** - Built-in i18n and multisite support

**For users:**

- **Universal Hosting** - Deploy anywhere WordPress runs, from shared hosting to cloud
- **Familiar Environment** - Manage your app alongside your existing WordPress site

Features
--------

[](#features)

- **URL Routing** - Pattern-based routing with WordPress rewrite rules
- **Theme Isolation** - Clean HTML output separate from your WordPress theme
- **Admin Bar Integration** - WordPress-style navigation for your app
- **Admin Color Scheme Tokens** - CSS variables from each user's WordPress admin color profile
- **Access Control** - WordPress capability-based authentication
- **BaseApp Pattern** - Structured architecture for complex applications
- **BaseStorage Pattern** - Database abstraction with schema management using `dbDelta`

Local Development
-----------------

[](#local-development)

Run your plugin locally without a full WordPress installation:

```
npx @wp-playground/cli@latest server --auto-mount --login
```

This starts a local WordPress instance with your plugin mounted and activated.

Documentation
-------------

[](#documentation)

TopicDescription[Getting Started](docs/getting-started.md)Installation, quick start, template functions[Configuration](docs/configuration.md)All configuration options[Routing](docs/routing.md)URL patterns, parameters, templates[Masterbar](docs/masterbar.md)Admin bar customization[Access Control](docs/access-control.md)Capabilities, roles, permissions[BaseApp Pattern](docs/baseapp.md)Structured architecture for larger apps[Tutorial](TUTORIAL.md)Step-by-step guide from minimal to full-featuredClaude Code Integration
-----------------------

[](#claude-code-integration)

Get AI assistance for WpApp development in [Claude Code](https://claude.ai/code):

```
/plugin marketplace add akirk/wp-app
/plugin install wpapp@wp-app
```

Examples
--------

[](#examples)

### Minimal Example

[](#minimal-example)

See `examples/minimal-app/` - The simplest possible WpApp (3 lines of code)

[Try in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/akirk/wp-app/main/blueprints/minimal-app.json)

### Community App Example

[](#community-app-example)

See `examples/community-app/` - Full BaseApp pattern demonstration with:

- BaseStorage with schema management
- User progress tracking
- REST API endpoints
- Admin integration

[Try in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/akirk/wp-app/main/blueprints/community-app.json)

Manual Installation
-------------------

[](#manual-installation)

```
composer require akirk/wp-app
```

The simplest possible WpApp requires just 3 lines:

```
