Skip to main content

Prism Architecture

Clarity through separation, flexibility through flow

Docs Version Dropdown

Overview​

Prism Architecture is a modern software architecture pattern that balances the structure and discipline of established architectural approaches with the practicality and flexibility needed for contemporary application development. Drawing inspiration from Clean Architecture, Domain-Driven Design, and other proven patterns, Prism provides a comprehensive framework for organizing your application, from core domain logic to user interface.

Key Principles​

Prism Architecture is built on three fundamental principles:

  1. Separation of Concerns: Each layer has a distinct responsibility, creating clear boundaries that make applications easier to understand, test, and maintain.

  2. Dependency Rule: Dependencies always point inward, with outer layers depending on inner layers but never the reverse—protecting your core business logic from external implementation details.

  3. Intent-Based Communication: Components communicate through explicit intent declarations rather than direct method calls, creating a traceable flow of information throughout the system.

Layer Structure​

Prism Architecture organizes an application into clearly defined layers:

  • Core Layer: Contains domain entities and value objects—the heart of your application.
  • Common Layer: Provides definitions for communication objects and cross-cutting utilities used by all layers.
  • Domain Layer: Houses domain services and business logic, independent of external frameworks.
  • Orchestration Layer: Coordinates the flow of operations through Use Cases, Orchestration Services, and Workflows.
  • Infrastructure Layer: Handles external concerns like databases, networking, and third-party APIs.
  • Presentation Layer: Manages UI through a hierarchical presenter structure following the PrismUI pattern.

Additionally, there are optional layers that can be implemented for projects requiring more specialized separation:

  • Security Layer: Manages authentication, authorization, and other security concerns when these require dedicated isolation.
  • Configuration Layer: Handles application settings, feature toggles, and environment-specific configurations.

These optional layers aren't required for every implementation but provide additional separation when projects demand higher levels of specialization or compliance requirements.

Distinctive Features​

What sets Prism Architecture apart:

  • Hierarchical Organization: Components in key layers follow a hierarchical structure that manages complexity naturally.
  • GraphQL Optimization: Specialized data access patterns for efficient GraphQL operations.
  • Declarative UI Support: Seamless integration with modern UI frameworks like SwiftUI and Jetpack Compose.
  • Flexible Implementation: Scalable from smaller applications (Prism Lite) to enterprise systems.
  • Developer Experience: Intuitive mental model with consistent patterns and naming conventions.

When to Use Prism​

Prism Architecture is ideal for:

  • Medium to large applications with complex domain logic
  • Projects built with modern UI frameworks and GraphQL
  • Long-lived applications that will evolve over time
  • Teams that value maintainability and structured development

Getting Started​

To begin using Prism Architecture:

  1. Explore the documentation starting with the Introduction section
  2. Understand the core concepts and layer definitions
  3. Follow the Getting Started guide for practical implementation steps
  4. Reference the examples for real-world implementation patterns

Prism Architecture provides the structure you need while maintaining the flexibility you want—bringing clarity to your code through separation while enabling the natural flow of data and operations throughout your application.