Anderson-Hyl/FoundationModelsChat
a exploration with Foundation Models framework
FoundationModelsChat
A modern, local AI chat application built with SwiftUI, Swift Concurrency, and The Composable Architecture (TCA), leveraging Apple Foundation Models for efficient local LLM interactions on macOS and iOS.
recording.mp4
๐ Features
โ
Local LLM Chat using Apple Foundation Models
โ
Streaming responses with smooth TCA-based state management
โ
Adaptive, Apple Intelligence-inspired UI with dynamic gradients and glass effects
โ
Structured local database with sharing-grdb for chat history
โ
Cross-platform macOS and iOS support with efficient window management
โ
Minimal, clear architecture optimized for extension and experimentation
๐งฉ Architecture
The project utilizes The Composable Architecture (TCA) for clear, testable, and modular state management. The following diagram illustrates the current reducer structure:
%%{ init : { "theme" : "default", "flowchart" : { "curve" : "monotoneY" }}}%%
graph LR
AppReducer ---> AppDelegateReducer
AppReducer ---> OnboardingReducer
HomeReducer ---> DialogsListReducer
HomeReducer -- optional --> MessageListReducer
MessageListReducer ---> MessageListInputReducer
AppDelegateReducer(AppDelegateReducer: 1)
DialogsListReducer(DialogsListReducer: 1)
MessageListInputReducer(MessageListInputReducer: 1)
MessageListReducer(MessageListReducer: 1)
OnboardingReducer(OnboardingReducer: 1)