Download the PHP package azaharizaman/nexus-setting without Composer
On this page you can find all versions of the php package azaharizaman/nexus-setting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-setting
More information about azaharizaman/nexus-setting
Files in azaharizaman/nexus-setting
Package nexus-setting
Short Description Framework-agnostic settings management engine with hierarchical resolution across user, tenant, and application layers
License MIT
Informations about the package nexus-setting
Nexus\Setting
Framework-agnostic settings management engine with hierarchical resolution across user, tenant, and application layers.
Overview
Nexus\Setting is a pure PHP package that provides a flexible, secure, and performant settings management system. It implements a three-tier hierarchical resolution system (User → Tenant → Application) with caching, encryption support, and comprehensive validation.
Key Features
- Hierarchical Resolution: Settings cascade through User → Tenant → Application layers
- Framework-Agnostic: Pure PHP with no framework dependencies
- Type-Safe Getters: Dedicated methods for string, int, bool, float, and array types
- Caching Support: Interface-driven caching with automatic invalidation
- Encryption: Support for encrypting sensitive settings at rest
- Schema Registry: Define and validate setting schemas programmatically
- Bulk Operations: Transaction-safe bulk updates and exports
- Read-Only Protection: Mark settings as immutable or protected
- Audit Trail: Track all setting changes with history
- Tenant Isolation: Automatic scoping for multi-tenant applications
Architecture
This package follows the Nexus monorepo architectural principles:
- Logic in Packages: All business logic lives here (framework-agnostic)
- Implementation in Applications: Database, models, and Laravel-specific code in
apps/Atomy
Package Structure
Installation
This package is designed for use within the Nexus monorepo. Add it to your application's composer.json:
Then run:
Usage
Basic Usage
Type-Safe Getters
Bulk Operations
Caching
Schema Registry & Validation
Hierarchical Resolution
Settings are resolved in the following order:
- User Layer: User-specific settings (highest priority)
- Tenant Layer: Tenant-specific settings
- Application Layer: Application/environment defaults (lowest priority, read-only)
Contracts (Interfaces)
SettingRepositoryInterface
Defines the persistence contract for settings at each layer.
SettingsCacheInterface
Defines the caching contract for settings.
SettingsAuthorizerInterface
Defines the authorization contract for settings access control.
Integration with Atomy
In apps/Atomy, you'll implement:
- Migrations: Database schema for
settings,setting_historytables - Models: Eloquent models implementing package interfaces
- Repositories: Concrete implementations of repository interfaces
- Service Provider: Binding contracts to implementations
- API Routes: RESTful endpoints for settings CRUD
See apps/Atomy/app/Providers/SettingsServiceProvider.php for binding examples.
Requirements Fulfilled
This package fulfills the following requirements from REQUIREMENTS.csv:
- Architectural Requirements: ARC-SET-1289 to ARC-SET-1299 (Framework-agnostic design)
- Business Requirements: BUS-SET-1300 to BUS-SET-1314 (Hierarchical resolution, caching, encryption)
- Functional Requirements: FUN-SET-1315 to FUN-SET-1345 (31 functional requirements)
- Performance Requirements: PER-SET-1346 to PER-SET-1350 (Caching, bulk operations)
- Security Requirements: SEC-SET-1351 to SEC-SET-1357 (Audit logging, tenant isolation, encryption)
Testing
Package tests should be unit tests with mocked repository implementations (no database dependencies).
📖 Documentation
Package Documentation
- Getting Started Guide
- Runtime Settings Management - Multi-tenancy aware key resolution and usage patterns
- API Reference
- Integration Guide
- Examples
Additional Resources
IMPLEMENTATION_SUMMARY.md- Implementation progressREQUIREMENTS.md- RequirementsTEST_SUITE_SUMMARY.md- TestsVALUATION_MATRIX.md- Valuation
License
MIT License. See LICENSE for details.
Contributing
This package is part of the Nexus monorepo. Follow the architectural guidelines in ARCHITECTURE.md.
Key Principle: Logic in Packages, Implementation in Applications.