swift-chat  by aws-samples

Cross-platform AI chat application built with React Native

created 9 months ago
552 stars

Top 58.8% on sourcepulse

GitHubView on GitHub
Project Summary

SwiftChat is a cross-platform AI chat application designed for personal AI assistance, offering fast, private, and real-time streaming conversations. It supports multiple AI model providers including Amazon Bedrock, Ollama, DeepSeek, and OpenAI, along with AI image generation and multimodal capabilities. The application targets users seeking a versatile and responsive AI chat experience on Android, iOS, and macOS.

How It Works

SwiftChat leverages React Native for its cross-platform UI and performance. The backend architecture defaults to AWS App Runner for hosting a FastAPI server, prioritizing high performance and scalability. An alternative, more cost-effective deployment using AWS Lambda with Function URLs is also provided. This dual-backend approach offers flexibility in deployment and cost management.

Quick Start & Requirements

  • Installation: Clone the repository, navigate to the react-native directory, and run npm i && npm start.
  • Build:
    • Android: npm run android
    • iOS: cd ios && pod install && cd .. && npm run ios
    • macOS: Open ios/SwiftChat.xcworkspace in Xcode, set destination to "My Mac (Mac Catalyst)", and run.
  • Prerequisites: AWS account with access to Amazon Bedrock foundation models (or API keys for Ollama, DeepSeek, OpenAI). For Bedrock, parameters must be set up in AWS Systems Manager Parameter Store.
  • Resources: Deployment via CloudFormation takes approximately 3-5 minutes.
  • Documentation: Getting Started with Amazon Bedrock

Highlighted Details

  • Supports multiple AI providers: Amazon Bedrock, Ollama, DeepSeek, OpenAI, and OpenAI Compatible models.
  • Features real-time streaming chat, AI image generation, and multimodal support (text, image, document, video).
  • Offers rich Markdown support including tables, code blocks, and LaTeX.
  • Optimized for performance with fast launch, request, render, and storage speeds.

Maintenance & Community

This is an AWS sample project. Community contributions are welcome via the standard GitHub pull request process.

Licensing & Compatibility

  • License: MIT-0 License.
  • Compatibility: Permissive license allows for commercial use and integration with closed-source applications.

Limitations & Caveats

iOS availability is currently limited to local builds via Xcode. Some animated images in the showcase may appear sped up and are best viewed on desktop browsers if experiencing lag.

Health Check
Last commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
6
Issues (30d)
5
Star History
157 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.