Download the PHP package azaharizaman/nexus-content without Composer
On this page you can find all versions of the php package azaharizaman/nexus-content. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-content
More information about azaharizaman/nexus-content
Files in azaharizaman/nexus-content
Package nexus-content
Short Description Framework-agnostic knowledge base and content management package with versioning, workflow, and multi-language support
License MIT
Informations about the package nexus-content
Nexus Content
Framework-agnostic knowledge base and content management package with versioning, workflow, and multi-language support.
Overview
Nexus\Content provides a comprehensive, stateless content management engine for building knowledge bases, documentation systems, help centers, and internal wikis. The package implements progressive disclosure across three levels:
- Level 1 (MVP): Basic article creation, publishing, and search integration
- Level 2 (Professional): Version control, review workflow, hierarchical categories
- Level 3 (Enterprise): Scheduled publishing, content locking, multi-language support, access control
Key Features
✨ Comprehensive Version Control
- Immutable version history with full audit trail
- Draft → Pending Review → Published → Archived workflow
- Compare any two versions with built-in diff generator
🌍 Multi-Language Support
- Translation groups linking related articles
- Language-specific content with fallback support
- Search filtering by language
🔒 Enterprise-Grade Access Control
- Public/private visibility toggle
- Party-based access control lists (integration with
Nexus\Party) - Content locking prevents simultaneous editing
📅 Scheduled Publishing
- Set future publish dates for content versions
- Automatic publishing via background workers (application layer)
🔍 Powerful Search Integration
- Framework-agnostic search interface
- Faceted search (category, language, permissions)
- Respects visibility and access control
📊 Hierarchical Organization
- Categories with up to 3 levels of nesting
- Logical content organization
- Category-based filtering
Installation
Quick Start
1. Create Your First Article
2. Publish the Article
3. Update Content (Creates New Version)
4. Review Workflow
Core Concepts
Articles
Articles are the primary content containers. Each article:
- Has a unique slug for permanent URLs
- Belongs to a single category
- Contains multiple content versions (history)
- Can be public or restricted by access control
- Can be part of a translation group
Content Versions
Every change creates a new immutable version:
- Sequential version numbers (1, 2, 3...)
- Tracks author and creation time
- Has a lifecycle status (Draft → Pending Review → Published → Archived)
- Only Draft versions can be edited
- Only one Published version active at a time
Categories
Hierarchical organization up to 3 levels:
Status Lifecycle
Usage Examples
Level 1: Basic Operations
See docs/examples/basic-usage.php for complete examples.
Level 2: Version Control & Workflow
Level 3: Enterprise Features
Available Interfaces
ContentRepositoryInterface
Repository for article persistence. Must be implemented by consuming application.
Key Methods:
saveArticle(Article $article): void- Persist articlefindById(string $articleId): ?Article- Retrieve by IDfindBySlug(string $slug): ?Article- Retrieve by slugfindVersionById(string $versionId): ?ContentVersion- Get specific versionfindTranslations(string $groupId): array- Get all translationsisSlugAvailable(string $slug): bool- Check slug uniqueness
ContentSearchInterface
Search engine integration. Implement with Elasticsearch, Algolia, Meilisearch, etc.
Key Methods:
indexArticle(Article $article): void- Add/update search indexremoveArticle(string $articleId): void- Remove from indexsearch(SearchCriteria $criteria): array- Faceted searchreindexAll(): int- Batch reindexing
ArticleManager
Main service for article operations.
Key Methods:
createArticle(...)- Create new articleupdateContent(...)- Update (creates new version)publish(...)- Publish draftsubmitForReview(...)- Request approvalarchive(...)- Archive published articlelockForEditing(...)- Prevent concurrent editscompareVersions(...)- Generate diffsearch(...)- Search articlesgetTranslations(...)- Get language versions
Application Layer Integration
Laravel Example
See docs/integration-guide.md for complete examples.
Configuration
The package is stateless and requires no configuration files. All behavior is controlled via:
- Repository Implementation - How articles are stored
- Search Implementation - Which search engine to use
- Optional Integrations - Audit logging, metrics, etc.
Testing
Progressive Disclosure
The package implements three levels of functionality:
| Level | Features | Use Case |
|---|---|---|
| L1: MVP | Create, publish, search | Simple knowledge base |
| L2: Professional | Version control, review workflow, categories | Content team collaboration |
| L3: Enterprise | Scheduled publish, locking, multi-language, ACL | Large organizations |
You can adopt features progressively as your needs grow.
Package Architecture
Value Objects (Immutable)
Article- Aggregate rootContentVersion- Immutable versionArticleCategory- Hierarchical categoryEditLock- Concurrent editing preventionSearchCriteria- Faceted search parameters
Services
ArticleManager- Main business logic orchestrator
Contracts (Interfaces)
ContentRepositoryInterface- Persistence abstractionContentSearchInterface- Search engine abstraction
Enums
ContentStatus- Lifecycle states with transition validation
Exceptions
ArticleNotFoundExceptionInvalidStatusTransitionExceptionContentLockedExceptionDuplicateSlugExceptionInvalidContentExceptionInvalidCategoryException
Integration with Other Nexus Packages
Nexus\Party- Access control via Party IDs (L3.5)Nexus\AuditLogger- Audit trail for all changes (optional)Nexus\Telemetry- Metrics tracking (optional)Nexus\Tenant- Multi-tenant scoping (via repository)
License
MIT License. See LICENSE file for details.
Documentation
- Getting Started Guide
- API Reference
- Integration Guide
- Basic Usage Examples
- Advanced Usage Examples
Requirements
- PHP 8.3+
- No external dependencies (pure PHP package)
Package Status: ✅ Production Ready
Version: 1.0.0
Last Updated: 2025-11-24