Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prism.byescaleira.com/llms.txt

Use this file to discover all available pages before exploring further.

Prism ships as a Swift package with seven independent modules that you can import individually or all at once. Each module has a clearly defined responsibility—from zero-dependency utilities at the bottom to rich UI components and on-device intelligence at the top. You can adopt only the layers your app needs, keeping binary size and compile times under control.

Module dependency diagram

┌─────────────────────────────────────────────────┐
│                    Prism                        │  ← umbrella re-export
├──────────┬──────────┬───────────┬───────────────┤
│ PrismUI  │PrismVideo│PrismIntel.│PrismArchitect.│  ← feature modules
├──────────┴──────────┴───────────┴───────────────┤
│                PrismNetwork                     │  ← transport layer
├─────────────────────────────────────────────────┤
│               PrismFoundation                   │  ← zero-dep core
└─────────────────────────────────────────────────┘
PrismFoundation sits at the base and has no dependencies on other Prism modules. PrismNetwork builds on top of it. The four feature modules—PrismUI, PrismVideo, PrismIntelligence, and PrismArchitecture—each depend on PrismNetwork and/or PrismFoundation. The Prism umbrella target re-exports everything.

Module reference

ModuleRoleImport
PrismFoundationEntities, logging, analytics, locale, resources, defaults, formattingimport PrismFoundation
PrismNetworkHTTP client, caching, retry, GraphQL, multipart upload, offline queueimport PrismNetwork
PrismArchitectureUnidirectional data flow — store, reducer, effects, middleware, routerimport PrismArchitecture
PrismUIToken-driven design system — 80+ components, 4 themes, Apple HIGimport PrismUI
PrismVideoVideo download helpers and media entitiesimport PrismVideo
PrismIntelligenceCreateML training, CoreML inference, Apple Intelligence, remote LLMimport PrismIntelligence
PrismUmbrella — re-exports all modules aboveimport Prism

Modules at a glance

PrismFoundation

Zero-dependency core types: entities, logging, analytics protocol, locale management, user defaults, date formatting, error protocol, bundle helpers, and file management.

PrismNetwork

Type-safe HTTP endpoints, actor-based LRU cache, exponential and linear retry policies, GraphQL client, multipart upload, request deduplication, and offline queue.

PrismArchitecture

Unidirectional data flow with PrismStore, PrismReducer, PrismEffect, and PrismMiddleware. Includes type-safe navigation via PrismRouter and state persistence.

PrismUI

Token-driven design system with 80+ SwiftUI components, four built-in themes, full accessibility support, and reduce-motion-aware animations.

PrismVideo

Download videos from remote URLs with real-time progress streaming via AsyncStream. Includes typed resolution and error enumerations.

PrismIntelligence

Train models from any Codable type, run on-device Core ML inference, call Apple Intelligence, or integrate a remote LLM—through one unified client.

Installation

Add Prism as a Swift package dependency, then choose the modules you need in your target’s dependencies list.
// Package.swift
dependencies: [
    .package(url: "https://github.com/rafaelesantos/prism.git", from: "1.0.0")
]
import Prism
Prism requires Swift 6.3, Xcode 16.4+, and targets iOS 26, macOS 26, tvOS 26, watchOS 26, or visionOS 26.