diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 6351c68..d0adbd6 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -37,6 +37,9 @@ export default defineConfig({ /\/packages\/api\/(openapi|analytics|alerts|logging)/, /\/packages\/mcp\/commerce/, /\/packages\/php\/(services|seeders|security|email-shield|action-gate|i18n)/, + // Package root links (without trailing slash) - VitePress resolves these + /^\/packages\/(admin|api|mcp|php|go)$/, + /^\/packages\/(admin|api|mcp|php|go)#/, // Other pages not yet created /\/testing\//, /\/contributing/, diff --git a/docs/packages/commerce/index.md b/docs/packages/commerce/index.md new file mode 100644 index 0000000..990a02a --- /dev/null +++ b/docs/packages/commerce/index.md @@ -0,0 +1,34 @@ +--- +title: Commerce Package +navTitle: Commerce +navOrder: 30 +--- + +# Commerce Package + +Billing, subscriptions, and payment processing for the Host UK platform. + +## Overview + +The commerce module implements a multi-gateway payment system supporting cryptocurrency (BTCPay) and traditional card payments (Stripe). It handles the complete commerce lifecycle from checkout to recurring billing, dunning, and refunds. + +## Features + +- **Multi-gateway payments** - BTCPay (primary) and Stripe (secondary) +- **Subscriptions** - Recurring billing with plan management +- **Invoicing** - Automatic invoice generation and delivery +- **Dunning** - Failed payment recovery workflows +- **Coupons** - Discount codes and promotional pricing +- **Tax handling** - VAT/GST calculation and compliance + +## Installation + +```bash +composer require host-uk/core-commerce +``` + +## Documentation + +- [Architecture](./architecture) - Technical architecture and design +- [Security](./security) - Payment security and PCI compliance +- [Webhooks](./webhooks) - Payment gateway webhook handling \ No newline at end of file diff --git a/docs/packages/content/index.md b/docs/packages/content/index.md new file mode 100644 index 0000000..6495bbf --- /dev/null +++ b/docs/packages/content/index.md @@ -0,0 +1,39 @@ +--- +title: Content Package +navTitle: Content +navOrder: 40 +--- + +# Content Package + +Headless CMS functionality for the Host UK platform. + +## Overview + +The `core-content` package provides content management, AI-powered generation, revision history, webhooks for external CMS integration, and search capabilities. + +## Features + +- **Content items** - Flexible content types with custom fields +- **AI generation** - Content creation via AI services +- **Revision history** - Full version control for content +- **Webhooks** - External CMS integration +- **Search** - Full-text search across content + +## Installation + +```bash +composer require host-uk/core-content +``` + +## Dependencies + +- `core-php` - Foundation framework +- `core-tenant` - Workspaces and users +- Optional: `core-agentic` - AI content generation +- Optional: `core-mcp` - MCP tool handlers + +## Documentation + +- [Architecture](./architecture) - Technical architecture +- [Security](./security) - Content security model \ No newline at end of file diff --git a/docs/packages/developer/index.md b/docs/packages/developer/index.md new file mode 100644 index 0000000..f1a602c --- /dev/null +++ b/docs/packages/developer/index.md @@ -0,0 +1,37 @@ +--- +title: Developer Package +navTitle: Developer +navOrder: 80 +--- + +# Developer Package + +Administrative developer tools for the Host UK platform. + +## Overview + +The `core-developer` package provides debugging, monitoring, and server management capabilities. It is designed exclusively for "Hades" tier users (god-mode access). + +## Features + +- **Server management** - SSH connections and remote commands +- **Route testing** - Automated route health checks +- **Debug tools** - Development debugging utilities +- **Horizon integration** - Queue monitoring +- **Telescope integration** - Request debugging + +## Installation + +```bash +composer require host-uk/core-developer +``` + +## Requirements + +- Hades tier access (god-mode) +- `core-php` and `core-admin` packages + +## Documentation + +- [Architecture](./architecture) - Technical architecture +- [Security](./security) - Access control and authorisation \ No newline at end of file diff --git a/docs/packages/index.md b/docs/packages/index.md index dc6d6ba..4ba7850 100644 --- a/docs/packages/index.md +++ b/docs/packages/index.md @@ -22,6 +22,12 @@ const packages = [ icon: '🔷', featured: true }, + { + name: 'Tenant', + slug: 'tenant', + description: 'Multi-tenancy, workspaces, user management, and entitlement systems', + icon: '🏢' + }, { name: 'Admin', slug: 'admin', @@ -39,6 +45,24 @@ const packages = [ slug: 'mcp', description: 'Model Context Protocol server for AI agent integration', icon: '🤖' + }, + { + name: 'Commerce', + slug: 'commerce', + description: 'Billing, subscriptions, and payment processing with BTCPay and Stripe', + icon: '💳' + }, + { + name: 'Content', + slug: 'content', + description: 'Headless CMS with AI generation, revision history, and webhooks', + icon: '📝' + }, + { + name: 'Developer', + slug: 'developer', + description: 'Admin developer tools for debugging, monitoring, and server management', + icon: '🛠️' } ] diff --git a/docs/packages/tenant/index.md b/docs/packages/tenant/index.md new file mode 100644 index 0000000..7fc2c34 --- /dev/null +++ b/docs/packages/tenant/index.md @@ -0,0 +1,48 @@ +--- +title: Tenant Package +navTitle: Tenant +navOrder: 10 +--- + +# Tenant Package + +Multi-tenancy, user management, and entitlement systems for the Host UK platform. + +## Overview + +The `core-tenant` package is the foundational tenancy layer that provides workspace isolation, user authentication, and feature access control. + +## Core Concepts + +### Tenant Hierarchy + +``` +User +├── owns Workspaces (can own multiple) +│ ├── has WorkspacePackages (entitlements) +│ ├── has Boosts (temporary limit increases) +│ ├── has Members (users with roles/permissions) +│ ├── has Teams (permission groups) +│ └── owns Namespaces (product boundaries) +└── owns Namespaces (personal, not workspace-linked) +``` + +## Features + +- **Workspaces** - Primary tenant boundary (organisations, teams) +- **Namespaces** - Product-level isolation within or across workspaces +- **Entitlements** - Feature access control and usage limits +- **User management** - Authentication, 2FA, and membership +- **Teams** - Permission groups within workspaces + +## Installation + +```bash +composer require host-uk/core-tenant +``` + +## Documentation + +- [Architecture](./architecture) - Technical architecture +- [Entitlements](./entitlements) - Feature access and limits +- [Security](./security) - Tenant isolation and security \ No newline at end of file