{"id":18131527,"url":"https://github.com/cooler333/highway","last_synced_at":"2025-03-30T18:31:24.756Z","repository":{"id":41473787,"uuid":"507390269","full_name":"cooler333/Highway","owner":"cooler333","description":"Fast and simple multi-store Redux-like architecture framework for iOS/OSX applications  ","archived":false,"fork":false,"pushed_at":"2023-11-04T15:33:30.000Z","size":898,"stargazers_count":42,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T02:21:49.183Z","etag":null,"topics":["architecture","composable","flux","ios","multistore","osx","redux","state-machine","swift","swiftui","tea","testability","udf","unidirectional-data-flow"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cooler333.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-25T18:38:33.000Z","updated_at":"2025-03-20T10:37:52.000Z","dependencies_parsed_at":"2023-02-09T22:00:44.804Z","dependency_job_id":"891eb3f7-c9da-4793-b253-5cca0209683d","html_url":"https://github.com/cooler333/Highway","commit_stats":{"total_commits":174,"total_committers":2,"mean_commits":87.0,"dds":"0.011494252873563204","last_synced_commit":"94263c806c7da7d166e37ff5461376aa15a6ecc4"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooler333%2FHighway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooler333%2FHighway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooler333%2FHighway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooler333%2FHighway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cooler333","download_url":"https://codeload.github.com/cooler333/Highway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246363615,"owners_count":20765322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","composable","flux","ios","multistore","osx","redux","state-machine","swift","swiftui","tea","testability","udf","unidirectional-data-flow"],"created_at":"2024-11-01T12:07:52.121Z","updated_at":"2025-03-30T18:31:19.736Z","avatar_url":"https://github.com/cooler333.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Highway - create more product value in less time\n\nHighway is an Redux-like architecture pattern implementation with Swift.\n\n\u003cimg src=\"Resources/jared-murray-NSuufgf-BME-unsplash.jpg\" alt=\"Highway\" width=\"400\"/\u003e\n\n## Table of contents\n\n- [Features](#features)\n- [Tutorials (Step by step guide)](#tutorials-step-by-step-guide)\n- [Examples](#examples)\n- [Requirements](#requirements)\n- [Installation (Cocoapods / SPM)](#installation-cocoapods--spm)\n- [Schemes](#schemes)\n- [Alternatives](#alternatives)\n- [Tools used in project](#tools-used-in-project)\n- [Author](#author)\n- [Credits and thanks](#credits-and-thanks)\n\n## Features\n\n- Child stores\n- Fast state updates\n- 100% business logic code coverage\n- Lightweight\n- Do not use 3rd party libraries\n- Can be used with SwiftUI\n- Support structs \u0026 classes for state (structs preferred)\n- Thread safe\n- Can be used with async/await\n```swift\ncreateMiddleware({ dispatch, getState, action in\n    switch action {\n    case .randomize:\n        Task.init {\n            let rand = await generateRandomValue()\n            dispatch(.receiveRandomValue(Int(rand)))\n        }\n    }\n})\n```\n\n## Tutorials (Step by step guide)\n- [Basic: Create simple counter app with asynchronous actions](Docs/Basic/Tutorial.md)\n- [Advanced: Share state between modules](Docs/Advanced/Tutorial.md)\n\n## Examples\n\n#### Integration\n- [Cocoapods integration](https://github.com/cooler333/Highway/tree/main/Examples/PodExample)\n- [Swift Package Manager integration](https://github.com/cooler333/Highway/tree/main/Examples/SPMExample)\n\n#### Swift UI\n- [SimpleView](https://github.com/cooler333/Highway/blob/main/Examples/Counter/Counter/UILayer/Main/View/MainView.swift): SwiftUI View with updates\n- [ListWithAimations](https://github.com/cooler333/Highway/blob/main/Examples/Animation/Animation/UILayer/Root/SwiftUIView/RootView.swift): Data Driven UI using SwiftUI List \n\n#### Tests\n- [Snapshot testing](https://github.com/cooler333/Highway/tree/main/Examples/InfiniteScroll/InfiniteScrollTests/Stories/Mail/SnapshotListTests.swift): Snapshot tests based on fast unit tests\n- [Unit testing business logic](https://github.com/cooler333/Highway/tree/main/Examples/InfiniteScroll/InfiniteScrollTests/Stories/Mail/LogicListTests.swift): Custom logic tests / Integration tests for Model Layer\n\n#### Light/Small Apps\n- [Counter](https://github.com/cooler333/Highway/tree/main/Examples/Counter): Lighweight multi store app (Single view controller with multiple child view controller)\n- [SocketPingPong](https://github.com/cooler333/Highway/tree/main/Examples/SocketPingPong): An app with stream of events (like web socket or server side events)\n- [ReusableViewControllers](https://github.com/cooler333/Highway/tree/main/Examples/ReusableViewControllers): Reuse view controller or view which was written with imperative style and similar example using ViewStore\n- [Animation](https://github.com/cooler333/Highway/tree/main/Examples/Animation): Animation inside TableView cells using DiffableDataSource \u0026 SwiftUI List views(items)\n- [TableViewsSync](https://github.com/cooler333/Highway/tree/main/Examples/TableViewsSync): TableView with animations (deletions/insertions) and syncronisation\n\n#### Heavy Apps\n- [InfiniteScroll](https://github.com/cooler333/Highway/tree/main/Examples/InfiniteScroll): Enterprise solution app (with Dependency Injection, Flow Coordinator e.t.c.)\n\nhttps://user-images.githubusercontent.com/2772537/177874199-1ba154f8-7982-4016-8618-dc59f76a5d6f.mov\n\n## Requirements\n\n- iOS: 13.0\n- Swift: 5.4\n\n## Installation (Cocoapods / SPM)\n\nHighway is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Highway'\n```\n\nAlso you can integrate framework as SPM package\n\n## Schemes\n\n#### Simple unidirectional data flow\n\n\u003cimg src=\"Resources/arch_animation.gif\" alt=\"General\" width=\"600\"/\u003e\n\n1. UI generate Action\n1. Action goes to Store\n1. Store mutate State (if needed)\n1. new State goes to UI\n1. Action goes to Middleware\n1. Middleware generate new action (if needed)\n1. new Action from Middleware goes to Store\n1. Store mutate State (if needed)\n1. new State goes to UI\n\n#### Single shared state\n\n\u003cimg src=\"Resources/ChildStoreScheme.png\" alt=\"Child\" width=\"400\"/\u003e\n\n- Multiple Stores share single State\n- State not copied for each new SubStore\n- State mutation goes down to parent store\n\n## Alternatives\n\n- [Mobius.swift](https://github.com/spotify/Mobius.swift)\n- [ReSwift](https://github.com/ReSwift/ReSwift)\n- [ReCombine](https://github.com/ReCombine/ReCombine)\n- [Swift Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture)\n- [Tea In Swift](https://github.com/chriseidhof/tea-in-swift)\n- [SwiftRex](https://github.com/SwiftRex/SwiftRex)\n- [Katana](https://github.com/BendingSpoons/katana-swift)\n- [ReactorKit](https://github.com/ReactorKit/ReactorKit)\n- [Tempura](https://github.com/BendingSpoons/tempura-swift)\n- [RxFeedback](https://github.com/NoTests/RxFeedback.swift)\n- [More](https://github.com/onmyway133/awesome-ios-architecture#unidirectional-data-flow)\n\n## Tools used in project\n\n- [rbenv](https://github.com/rbenv/rbenv): Manage your app's Ruby environment (quote from rbenv github web page)\n- [Bundler](https://bundler.io): The best way to manage a Ruby application's gems (quote from Bundler web page)\n- [Git LFS](https://git-lfs.github.com): An open source Git extension for versioning large files (quote from git-lfs web page)\n\n## TODO\n\n- Add pros and cons to alternatives\n- Add area of responsibility for Highway types\n\n## Author\n\nDmitrii Cooler, coolerov333@gmail.com\n\n## Credits and thanks\n\nThe following people gave feedback on the library at its early stages and helped make the library what it is today:\n\nSpecial thanks to:\n\n- [Aleksey Alekseev](https://github.com/joyalex) who helped me to improve library performance\n- [Dmitii Bobrov](https://github.com/dimabobrov) with major feedback on early concepts \n\n## License\n\nHighway is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcooler333%2Fhighway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcooler333%2Fhighway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcooler333%2Fhighway/lists"}