Nm Archetypes Architecture Paradigm Layered
by @athola
Applies layered n-tier architecture with enforced boundaries
clawhub install nm-archetypes-architecture-paradigm-layeredπ About This Skill
name: architecture-paradigm-layered description: | Layered (n-tier) architecture with enforced layer boundaries and separation of concerns version: 1.9.4 triggers: - architecture - layered - n-tier - separation-of-concerns - monolith metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/archetypes", "emoji": "\ud83c\udfd7\ufe0f"}} source: claude-night-market source_plugin: archetypes
> Night Market Skill β ported from claude-night-market/archetypes. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Table of Contents
The Layered (N-Tier) Architecture Paradigm
When to Employ This Paradigm
When NOT To Use This Paradigm
Adoption Steps
1. Define the Layers: Establish a clear set of layers. A common stack includes: Presentation -> Application/Service -> Domain -> Data Access. 2. Enforce Dependency Direction: Code in a given layer may only depend on the layer immediately below it. Forbid any "upward" dependencies or imports. 3. Centralize Cross-Cutting Concerns: Implement concerns like logging, authentication, and validation as centralized middleware or policies, rather than duplicating this logic in each layer. 4. Test Each Layer Appropriately: Apply testing strategies suitable for each layer, such as unit tests for the domain layer, service-layer tests for orchestration logic, and integration tests for persistence adapters. 5. Document and Enforce Interactions: Maintain up-to-date dependency diagrams and use automated architecture tests to prevent developers from creating "shortcut" dependencies that violate the layering rules.Key Deliverables
Technology Guidance
Layer Implementation Patterns:
Architecture Enforcement Tools:
Common Layer Stacks:
Real-World Examples
Enterprise ERP Systems: SAP and Oracle ERP use layered architecture to separate user interfaces from business logic and database operations, enabling different frontend applications to share the same business rules.
Banking Applications: Financial institutions employ layered architecture to maintain strict separation between customer-facing interfaces, transaction processing, and secure data storage for regulatory compliance.
E-commerce Platforms: Traditional e-commerce sites use layered architecture to separate product catalogs, shopping cart logic, order processing, and payment handling into distinct layers.
Risks & Mitigations
Troubleshooting
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
π Tips & Best Practices
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag