Skip to content

πŸƒ A modern WordPress framework powered by Tempest, featuring attribute-based auto-discovery for hooks, post types, blocks, and more.

License

Notifications You must be signed in to change notification settings

studiometa/foehn-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

249 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸƒ FΓΈhn

A modern WordPress framework powered by Tempest, featuring attribute-based auto-discovery for hooks, post types, blocks, and more.

Latest Version PHP Version Tests License

Warning

AI-Generated Project β€” This project was primarily built by AI coding agents (Claude). While functional and tested, it may contain bugs, security issues, or unexpected behavior. Use at your own risk, especially in production environments.

Packages

This monorepo contains the following packages:

Package Description Packagist
studiometa/foehn Core framework β€” auto-discovery, DI, blocks, hooks Latest
studiometa/foehn-installer Composer plugin β€” generates web root, symlinks, wp-config Latest
studiometa/foehn-starter Starter theme β€” complete example with create-project support Latest

Quick Start

New project

composer create-project studiometa/foehn-starter my-project

Add to existing theme

composer require studiometa/foehn
<?php
// functions.php
use Studiometa\Foehn\Kernel;

Kernel::boot(__DIR__ . '/app');

Features

  • πŸš€ Zero configuration β€” Auto-discovery of components via PHP 8 attributes
  • 🎯 Modern DX β€” Type-safe, IDE-friendly, testable
  • πŸ”Œ WordPress native β€” Works with Timber, ACF, and Gutenberg blocks
  • ⚑ Minimal boilerplate β€” One line to boot your theme
  • πŸ“¦ Project generator β€” Full web root generation via Composer plugin
  • πŸ—οΈ Starter theme β€” Complete example with models, hooks, templates

Available Attributes

Attribute Description
#[AsAction] Register a WordPress action hook
#[AsFilter] Register a WordPress filter hook
#[AsPostType] Register a custom post type
#[AsTaxonomy] Register a custom taxonomy
#[AsBlock] Register a native Gutenberg block
#[AsAcfBlock] Register an ACF block
#[AsBlockPattern] Register a block pattern
#[AsContextProvider] Add data to specific views
#[AsTemplateController] Handle template rendering
#[AsShortcode] Register a shortcode
#[AsRestRoute] Register a REST API endpoint
#[AsCliCommand] Register a WP-CLI command
#[AsTimberModel] Register a Timber class map
#[AsMenu] Register a navigation menu
#[AsImageSize] Register a custom image size

Architecture

my-project/                     # What is VERSIONED
β”œβ”€β”€ theme/                      # The WordPress theme
β”‚   β”œβ”€β”€ app/                    # PHP classes (auto-discovered)
β”‚   β”œβ”€β”€ templates/              # Twig templates
β”‚   β”œβ”€β”€ functions.php           # Single Kernel::boot() call
β”‚   └── style.css               # Theme header
β”œβ”€β”€ config/                     # Configuration files
β”œβ”€β”€ mu-plugins/                 # Custom mu-plugins (if needed)
β”œβ”€β”€ .env                        # Environment variables
└── composer.json               # Dependencies

web/                            # GENERATED (100% gitignored)
β”œβ”€β”€ wp/                         # WordPress core
β”œβ”€β”€ wp-content/
β”‚   β”œβ”€β”€ themes/my-theme β†’ symlink to /theme
β”‚   β”œβ”€β”€ plugins/                # Composer-managed plugins
β”‚   └── mu-plugins/             # Auto-loaded mu-plugins
β”œβ”€β”€ index.php                   # Generated front controller
└── wp-config.php               # Generated from config/

Documentation

πŸ“– Full Documentation

For AI Agents

This package includes an Agent Skill at packages/foehn/skills/foehn/SKILL.md with comprehensive usage reference. Compatible agents will discover it automatically.

Development

# Install dependencies
composer install
npm install

# Run tests
composer test

# Lint & fix
composer lint
composer fix

# Format markdown
npm run fmt

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting a PR.

License

MIT License β€” see LICENSE for details.

Credits

About

πŸƒ A modern WordPress framework powered by Tempest, featuring attribute-based auto-discovery for hooks, post types, blocks, and more.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages