Welcome to Boomerang, a proof-of-concept Flutter application that combines the power of AI and Shorebird to enable dynamic UI updates in real-time!
Boomerang allows users to dynamically add widgets to their Flutter app by typing a simple text input. Here's how it works:
tiny.boomerang.demo.mp4
- User Input ✏️: Users specify the widget they want by typing it into a text field.
- AI-Generated Code 🤖: The input is processed by an AI, which generates the corresponding Flutter code for the widget.
- Live App Update 🔄: Shorebird then deploys the update in release mode, allowing the app to immediately reflect the changes without needing a full app store submission.
To try out the Boomerang demo on your local machine, follow these steps:
- Flutter SDK: Make sure Flutter is installed on your machine. Get Flutter
- Node.js: Required to run the backend server. Download Node.js
- Shorebird CLI: For deploying live updates in release mode. Install Shorebird
- OpenAI API Key: Sign up at OpenAI to get your API key.
-
Clone the Repository
git clone https://github.com/yourusername/boomerang.git cd boomerang
-
Configure Shorebird
-
Move to the
boomerang_app
folder:cd boomerang_app
-
Run Shorebird commands to log in and set up your app:
shorebird login shorebird init --force
-
This will configure your
shorebird.yaml
with the necessary app_id.
-
Configure IP Address
- In
boomerang_app/lib/input.dart
, replace the placeholder with your machine’s IP address (for backend communication).
- In
-
Set OpenAI API Key
-
In the
server/server.js
file, insert your OpenAI API key:const apiKey = 'your-openai-api-key';
-
-
Run the Backend Server
-
Move to the
server
folder and start the server:cd server node server.js
-
-
Build shorebird release
-
Create a release with Shorebird:
shorebird release ios
or
shorebird release android
-
-
Run app preview
-
Run app preview:
shorebird preview ios
or
shorebird preview android
The app will open in release mode in your device or simulator.
-
You’re all set! 🎉 The app will now allow you to input widgets and see them updated dynamically, thanks to AI and Shorebird.
If you encounter any issues, feel free to create an issue. Contributions are welcome! If you’d like to improve Boomerang, simply fork the repo, make your changes, and submit a pull request.
Thanks for checking out Boomerang! 🙌