Seamless FlyDonate overlay integration. Point it at a streamer's overlay feed URL and get live config, goals and donation alerts — no sockets to wire, no auth to manage (the token lives in the URL). Framework-agnostic core, plus a React hook and a Redux Toolkit slice.
yarn add @flysim-apps/flydonate-sdkThe feed URL comes from the streamer's FlyDonate dashboard (or, inside the
FlyAround overlay, is auto-discovered from tower settings):
https://flydonate.com/overlay/{token}.
import { FlyDonateClient } from '@flysim-apps/flydonate-sdk';
const client = new FlyDonateClient({ feedUrl: 'https://flydonate.com/overlay/ABC123' });
const off = client.on((e) => {
if (e.type === 'config') console.log('goal + alert settings', e.config);
if (e.type === 'goal') console.log('goal progress', e.goal);
if (e.type === 'alert') console.log('new tip!', e.alert); // only alerts that arrive while connected
});
client.start();
// ...later
off();
client.stop();The client primes on connect — it won't replay historical donations, only tips that land while it's running.
import { useFlyDonateFeed, formatSalutation } from '@flysim-apps/flydonate-sdk/react';
function Overlay({ feedUrl }: { feedUrl: string }) {
const { config, goal, currentAlert } = useFlyDonateFeed(feedUrl);
return (
<>
{goal && <GoalBar goal={goal} />}
{currentAlert && config && <Alert text={formatSalutation(config, currentAlert)} alert={currentAlert} />}
</>
);
}currentAlert surfaces one donation at a time for config.alertDurationMs,
so you just animate it in/out. config carries the salutation template,
animation, SFX + TTS settings and per-field visibility.
import { flydonateReducer, connectFlyDonateFeed, selectFlyDonateGoal } from '@flysim-apps/flydonate-sdk/features';
// reducer under the `flydonate` key
const store = configureStore({ reducer: { flydonate: flydonateReducer /* … */ } });
const disconnect = connectFlyDonateFeed(store.dispatch, { feedUrl });
// selectors: selectFlyDonateConfig / selectFlyDonateGoal / selectFlyDonateAlerts| Import | What |
|---|---|
@flysim-apps/flydonate-sdk |
FlyDonateClient, createFlyDonateClient, all types |
@flysim-apps/flydonate-sdk/types |
DTOs only (OverlayConfig, Goal, DonationAlert, …) |
@flysim-apps/flydonate-sdk/react |
useFlyDonateFeed hook |
@flysim-apps/flydonate-sdk/features |
RTK slice + connectFlyDonateFeed |
Zero runtime dependencies. React / Redux Toolkit are optional peers — only
needed for the ./react / ./features entry points.
GET {feedUrl}/config→OverlayConfig(goal + alert settings).GET {feedUrl}/alerts?after={cursor}→DonationAlert[].
Published to GitHub Packages on a v*.*.* tag.
© FlyAround Simulations LLC · MIT