pointfreeco / swift-composable-architecture
git clone https://github.com/pointfreeco/swift-composable-architecture.git
1.26.2 · 1mo ago
🔥 on GitHub Trending today
A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
+0
stars, 24h · #660
—
stars, 7 days
—
stars, 30 days
15k
★ total
1.7k
forks · 26 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageSwift
LicenseMIT
Created2020-05-03 (6y ago)
Last push14d ago
Watchers218
OwnerOrganization
Seen on GitHub Trending
- 2026-10-20 — #9 daily in swift
GitHub topics
Links
- GitHub: github.com/pointfreeco/swift-composable-architecture
- Homepage: https://www.pointfree.co/collections/composable-architecture
- Releases · Issues · Hacker News mentions
README excerpt
# The Composable Architecture The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, iPadOS, visionOS, tvOS, and watchOS). * What is the Composable Architecture? * Learn more * Examples * Basic usage * Documentation * FAQ * Community * Installation * Translations ## What is the Composable Architecture? This library provides a few core tools that can be used to build applications of varying purpose and complexity. It provides compelling stories that you can follow to solve many problems you encounter day-to-day when building applications, such as: * **State management** How to manage the state of your application using simple value types, and share state across many screens so that mutations in one screen can be immediately observed in another screen. * **Composition** How to break down large features into smaller components that can be extracted to their own, isolated modules and be easily glued back together to form the feature. * **Side effects** How to let certain parts of the application talk to the outside world in the most testable and understandable way possible. * **Testing** How to not only test a feature built in the architecture, but also write integration tests for features that have been composed of many parts, and write end-to-end tests to understand how side effects influence your application. This allows you to make strong guarantees that your business logic is running in the way you expect. * **Ergonomics** How to accomplish all of the above in a simple API with as few concepts and moving parts as possible. ## Learn More The Composable Architecture was designed over the course of many episodes on [Point-Free][pointfreeco], a video series exploring advanced programming topics in the Swift language, hosted by [Brandon Williams][mbrandonw] and [Stephen Celis][stephencelis]. You can watch all of the episodes [here][tca-episode-collection], as well as a dedicated, [multipart tour][tca-tour] of the architecture from scratch. ## Examples This repo comes with _lots_ of examples to demonstrate how to solve common and complex problems with the Composable Architecture. Check out this directory to see them all, including: * Case Studies * Getting started * Effects * Navigation * Higher-order reducers * Reusable components * Location manager * Motion manager * Search * Speech Recognition * SyncUps app * Tic-Tac-Toe * Todos * Voice memos Looking for something more substantial? Check out the source code for [isowords][gh-isowords], an iOS word search game built in SwiftUI and the Composable Architecture. ## Basic Usage > [!Note] > For a step-by-step interactive tutorial, be sure to check out [Meet the Composable > Architecture][meet-tca]. To build a feature using the Composable Architecture you define some types