Full-stack blocks

Blocks can define their own database, server functions, scheduled tasks, and CLI commands. Everything lives in one folder, works without a build step, and deploys by copying files.

Read the guide →

db.php

Define schema, get CRUD endpoints

return [
    'storage'    => 'sqlite',
    'userScoped' => true,
    'capability' => [
        'create' => true,
        'read'   => true,
        'update' => true,
        'delete' => true,
    ],
    'fields' => [
        'text' => [
            'type'     => 'string',
            'required' => true,
        ],
        'done' => [
            'type'    => 'boolean',
            'default' => false,
        ],
    ],
];

rpc.php

Custom server functions

return [
    'toggle' => function (array $params): array {
        $db   = Db::get('my-theme/todo');
        $todo = $db->get_record((int) $params['id']);
        $db->update((int) $params['id'], [
            'done' => !$todo['done'],
        ]);
        return ['success' => true];
    },
    'clear_done' => function (array $params): array {
        $db    = Db::get('my-theme/todo');
        $todos = $db->list();
        foreach ($todos as $todo) {
            if ($todo['done']) {
                $db->delete((int) $todo['id']);
            }
        }
        return ['cleared' => true];
    },
];

Every capability is a file

Each file adds a capability. No configuration, no registration code.

Application Block
blockstudio/
└── my-app/
├── block.jsonBlock definition
├── index.phpTemplate + Interactivity API
├── style.cssScoped styles
├── script-inline.jsClient logic (auto block detection)
├── db.phpData model with CRUD endpoints
├── rpc.phpServer functions via bs.fn()
├── cron.phpScheduled tasks via WP Cron
└── db/
└── default.sqlitePortable database
Plus

The official extension kit

Premium site templates, AI system instructions, and a private Discord community. One-time purchase, lifetime updates.

  • 450+ site templates
  • AI system instructions
  • Lifetime updates
  • Private Discord community
Get Plus →
block.json
{"name": "starter/hero","title": "Hero","blockstudio": { ... }}
index.php
style.css
450+ templates includedPlus