1 · Core Architecture & Technology Stack
WebPies is an enterprise-grade digital product studio and software commerce platform engineered with Laravel 13 and PHP 8.4. The architecture combines high-performance server-side rendering with reactive micro-components and a decoupled visual page builder.
Architectural Pillars
- Server-Side Rendering (SSR) & Blade: All public store pages, product hubs, and marketing layouts render on the server using Blade templates, achieving sub-50ms Time to First Byte (TTFB) and maximum SEO crawlability.
- Reactive Client Micro-Components: Powered by Alpine.js for lightweight interactivity (such as multi-currency selectors, interactive licensing modals, cart drawers, and live chat widgets) without the bundle overhead of heavyweight SPA frameworks.
- Tailwind CSS v4 Engine: Contemporary utility-first styling with native CSS variables for seamless light/dark mode transitions and automated viewport responsiveness.
- Modular PageBuilder Engine: Pages are stored as structured JSON layout trees (Sections → Rows → Columns → Widgets). On save, the
PageAssetCompilerextracts and compiles widget-specific CSS and JS assets to public storage, eliminating runtime asset bloat. - Dynamic Custom Post Types (CPT): A schema-less content modeling layer that allows administrators to declare arbitrary custom entities, taxonomies, and meta fields without writing migrations or modifying core codebase.
2 · Software Licensing & Remote Verification REST API
The WebPies Licensing Server manages digital activations, site domain bindings, and automatic software updates. License keys follow the standardized format WEBPIES-XXXX-XXXX-XXXX-XXXX.
REST Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/license/activate |
Registers and locks a domain to a license key. Increments activation count. |
| POST | /api/license/verify |
Validates license status, expiration date, and domain authorization. |
| POST | /api/license/deactivate |
Releases domain binding, freeing up an activation slot. |
| GET/POST | /api/plugin/update |
Queries release manifests for new version availability. |
| GET/POST | /api/plugin/download |
Fetches signed, time-limited ZIP download packages for active licenses. |
Sample Activation Request
POST /api/license/activate HTTP/1.1
Host: webpies.com
Content-Type: application/json
{
"key": "WEBPIES-A1B2-C3D4-E5F6-G7H8",
"product": "easy-media-optimiser-pro",
"domain": "client-site.com",
"site_title": "Production Store",
"wp_version": "6.7.1",
"php_version": "8.4.0"
}
Sample JSON Response
{
"success": true,
"code": "activated",
"message": "License key activated successfully.",
"data": {
"license_key": "WEBPIES-A1B2-C3D4-E5F6-G7H8",
"status": "active",
"domain_limit": 5,
"activations_count": 1,
"expires_at": "2027-05-01T23:59:59Z",
"product_name": "Easy Media Optimiser Pro"
}
}
3 · WordPress Plugin & Theme Client Integration
Integrating WebPies license validation into client WordPress themes and plugins is straightforward using the built-in HTTP API and transient caching.
PHP Verification Snippet
function webpies_verify_license($license_key, $product_slug) {
$transient_key = "webpies_lic_" . md5($license_key . $product_slug);
$cached = get_transient($transient_key);
if ($cached !== false) {
return $cached;
}
$resp [
"timeout" => 15,
"headers" => ["Content-Type" => "application/json"],
"body" => wp_json_encode([
"key" => $license_key,
"product" => $product_slug,
"domain" => home_url(),
"site_title" => get_bloginfo("name"),
"wp_version" => get_bloginfo("version"),
"php_version" => PHP_VERSION,
]),
]);
if (is_wp_error($response)) {
return false;
}
$data = json_decode(wp_remote_retrieve_body($response), true);
$is_valid = !empty($data["success"]) && ($data["data"]["status"] ?? "") === "active";
// Cache verification state for 12 hours to avoid remote overhead
set_transient($transient_key, $is_valid, 12 * HOUR_IN_SECONDS);
return $is_valid;
}
Automated Update Hook
To register automatic updates with the WordPress core updater, hook into pre_set_site_transient_update_plugins and query the WebPies release endpoint. When an update is detected, deliver the signed download package returned by /api/plugin/download.
4 · Custom PageBuilder Widget Development
The PageBuilder utilizes an object-oriented widget architecture. All widgets extend App\Services\PageBuilder\Widgets\WidgetBase and are automatically registered by the WidgetRegistry singleton.
Widget Class Boilerplate
<?php
namespace App\Services\PageBuilder\Widgets;
use App\Services\PageBuilder\Controls;
class FeatureBoxWidget extends WidgetBase
{
public function name(): string { return "feature_box"; }
public function label(): string { return "Feature Box"; }
public function icon(): string {
return "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"/></svg>";
}
public function get_categories(): array { return ["basic"]; }
public function get_stylesheets(): array { return ["/frontend/widgets/css/feature-box.css"]; }
protected function registerControls(): void
{
$this->startSection("content", ["label" => "Content"]);
$this->addControl("heading", [
"type" => Controls::TEXT,
"label" => "Heading",
"default" => "High-Velocity Engine",
"language" => true, // Enables EN/DE tabbed inputs
]);
$this->addControl("description", [
"type" => Controls::WYSIWYG,
"label" => "Description",
"language" => true,
]);
$this->endSection();
}
public function render(array $props): string
{
$p = $this->props($props);
$title = $this->escSafe($p["heading"] ?? "");
$body = $p["description"] ?? "";
return "<div class=\"p-6 rounded-2xl border border-line bg-[var(--cream)]\">" .
"<h3 class=\"font-serif text-2xl font-bold\">{$title}</h3>" .
"<div class=\"mt-2 text-muted\">{$body}</div></div>";
}
}
5 · Global Shortcodes Engine & Syntax
WebPies provides a unified shortcode processor via App\Support\Shortcode. Shortcodes can be embedded within blog posts, custom post type content, page builder text areas, and legal policy sections.
Standard Built-in Shortcodes
[button url="/pricing" text="View Plans" variant="primary|secondary|outline" target="_blank"]— Renders a styled interactive button.[callout type="tip|warning|info" title="Pro Tip"]Content message here[/callout]— Renders a highlighted editorial box.[license_box key="WEBPIES-..." product="..."]— Displays an interactive licensing status badge with activation details.[product_grid category="wordpress-plugins" limit="6" order="desc"]— Injects a dynamic product showcase grid.[pricing_table id="12"]— Renders a responsive pricing tier comparison component.[tooltip text="Extended explanation"]Hover term[/tooltip]— Renders an accessible interactive definition tooltip.
Registering Custom Shortcodes
use App\Support\Shortcode;
Shortcode::register("github_repo", function ($atts, $c {
$repo = htmlspecialchars($atts["repo"] ?? "webpies/core");
return "<a href=\"https://github.com/{$repo}\" target=\"_blank\" class=\"inline-flex items-center gap-2 font-mono text-xs px-3 py-1.5 rounded-lg border border-line bg-[var(--cream-2)]\">GitHub: {$repo}</a>";
});
6 · Custom Post Types & Dynamic Prefix Routing
Content modeling in WebPies supports limitless custom post types (e.g. Portfolios, Case Studies, Courses, Testimonials, Documentation articles) declared via database records (CustomPostType) rather than static hardcoded config files.
Routing Hierarchy
- Single Post:
/{slug_prefix}/{post_slug}— Maps directly to the published post belonging to that CPT. - CPT Archive:
/{slug_prefix}— Auto-generates an index archive with pagination, search, and sorting. - Taxonomy Term Filter:
/{slug_prefix}?tax> — Filters archive posts by term slug.
Eloquent Query Scopes
use App\Models\Post;
// Fetch active case studies with their terms
$caseStudies = Post::ofType("case-studies")
->published()
->with(["author", "terms", "meta"])
->latest("published_at")
->paginate(12);
7 · Checkout, Subscriptions & Payment Webhooks
WebPies handles digital orders, software license generation, plan upgrades, and recurring renewals through a resilient checkout and payment webhook pipeline.
Supported Gateways
- Stripe: Direct card checkout, Apple Pay, Google Pay, and SEPA Direct Debit. Listens for
checkout.session.completedandinvoice.payment_succeededwebhooks to auto-issue software licenses. - Paddle (Merchant of Record): Automated global sales tax / VAT remittance, handling
subscription_created,subscription_updated, andsubscription_cancelledevents. - SSLCommerz: Regional South Asian transaction routing with server-to-server IPN validation.
Multi-Currency Architecture
Prices are stored in base currency (USD) and dynamically converted via MultiCurrencyService. Exchange rates are refreshed via background scheduled tasks and cached in Redis/Cache. Customer currency preferences persist across sessions via client cookies.
8 · Internationalization (i18n) & Translation Engine
WebPies features native, zero-join multilingual support for content and user interfaces.
Dual Localization Strategy
- Content-Level Suffixing: PageBuilder widget controls and post fields store language variants directly in the payload (e.g.
title__enandtitle__de). This enables immediate locale resolution without supplementary database joins. - Dictionary Storage (
LanguageLine): Global UI labels, button texts, form validation feedback, and email notification templates are managed in the central language registry. - Auto-Translation Engine: Integrated with
AutoTranslateServiceto offer one-click automated translation from English to German across all content blocks.
9 · SEO Engine, OpenGraph & Structured Schema
The platform generates comprehensive search engine optimization markup automatically for every page, product, and post.
Automated Features
- OpenGraph & Twitter Card Generation: Custom social preview cards with automated fallback to high-resolution studio banner images (1200x630px).
- Schema.org JSON-LD: Context-aware structured metadata including
WebPage,SoftwareApplication,Product,Organization, andBreadcrumbListschemas. - Canonical & Alternate Hreflang Tags: Proper cross-language canonical tags (
enandde) to prevent duplicate content penalties across regional search indexes. - Dynamic XML Sitemap: Automatically serves up-to-date sitemaps at
/sitemap.xmlwith change frequencies and priority weights.
10 · Code Standards, Testing & Developer Support
All code contributed to WebPies adheres to rigorous code quality and automated testing protocols.
Coding & Testing Standards
- Formatting with Laravel Pint: All PHP code must pass Pint formatting using the studio preset before merging:
vendor/bin/pint --dirty --format agent. - PHP 8.4 Best Practices: Explicit return types, property promotion, strict type declarations, and curly braces on all control structures.
- Comprehensive Test Suite: High-coverage PHPUnit tests verify all business logic, license checks, checkout webhooks, and routing contracts:
php artisan test --compact.
Developer Inquiries & Support
For custom API partnerships, enterprise licensing limits, or technical questions, reach out to our engineering team at [email protected] or open a ticket in your customer portal under Account → Support.