Repository navigation
Releases
Releases · Franklyn-R-Silva/supabase_in_app_messaging
v0.1.0
The first release: Firebase-style in-app messaging for Flutter, with the campaigns in your Supabase Postgres.
- Campaign schema:
iam_campaigns(layout, content, buttons, trigger events, schedule, priority and audience) andiam_campaigns_for, which returns the campaigns eligible for the caller (#2). - Widgets:
InAppMessage.tryParsereads a campaign fromiam_campaigns_for, andshowInAppMessageshows it as a banner, modal or card themed fromTheme, with a builder to replace any layout, swipe, back and tap-outside dismissal, and screen-reader, large-text, safe-area and tablet support (#4). - An example app in
example/that shows a campaign as a banner, a modal and a card, and a README with the reference indocs/(#20). - Campaigns:
max_app_versionshows a campaign only below that version (exclusive), for an update prompt; it must be abovemin_app_versionwhen both are set (#11). - Client:
InAppMessaging.initializefetches the campaigns for the signed-in user fromiam_campaigns_for, again on every sign-in, sign-out or user switch, andtrigger(event)shows the highest-priority one for the event, withapp_openon start and resume, one message at a time,messagesSuppressedand ashouldShowveto (#19, #3). - Frequency caps:
max_impressions,min_intervalandstop_after_clickper campaign, held on the server for signed-in users throughiam_eventsandiam_track, and on the device per project and user (#5). - Offline cache and metrics: the campaigns last fetched are cached per project and user, so
app_openshows one at an offline launch, and their images are warmed in memory after each fetch; events wait in a queue on the device (the newest 100 per user) and go in batches toiam_track(p_events jsonb), which keeps the device's time within the last 7 days, skips bad elements and keeps at most 300 events per user per hour; theiam_campaign_statsview sums impressions, clicks, click-through rate, dismissals and unique users per campaign and UTC day, andiam_prune_eventsdeletes old events (#7, #8). - Translations:
translationsholds a campaign's title, body and button texts per locale, andiam_campaigns_forpicks the one for thelocalethe client sends (the exact tag, then its language, then the campaign's own, per field), never sending the map (#14). service_roleis granted what it needs by name: writing campaigns, reading and deleting events, reading the stats and callingiam_campaigns_forandiam_prune_events, so a project without Supabase's default grants works too; the SQL tests run with and without them.- Live updates: each change to
iam_campaignssends an empty "changed" signal on the private Realtime topicin_app_messaging, which clients can receive and not send, and the client fetches again a random 1 to 5 seconds later; it also fetches when the app is shown again and when the channel joins again after a drop, anddispose()leaves the channel (#6). FakeInAppMessaginginpackage:supabase_in_app_messaging/testing.dart: an in-memoryInAppMessagingfor widget tests of apps that show messages;triggerfollows the client's rules andeventsholds the recorded impressions, clicks and dismissals (#12).
What's Changed
Other changes
- feat: campaign schema with audience, schedule and priority by @Franklyn-R-Silva in #10
- feat: banner, modal and card widgets by @Franklyn-R-Silva in #16
- docs: README in the tidy_imports layout, with the reference in docs/ by @Franklyn-R-Silva in #25
- ci: workflows, Dependabot and contributor docs by @Franklyn-R-Silva in #24
- feat: maximum app version in the audience by @Franklyn-R-Silva in #26
- feat: campaign client and event triggers by @Franklyn-R-Silva in #27
- docs: README and docs for the client, triggers and max_app_version by @Franklyn-R-Silva in #28
- feat: frequency caps and campaign events by @Franklyn-R-Silva in #29
- docs: recipes, the Firebase guide, and publishing from a tag by @Franklyn-R-Silva in #30
- feat: offline cache, event queue and campaign metrics by @Franklyn-R-Silva in #31
- feat: localized campaign content by @Franklyn-R-Silva in #32
- fix: grant service_role what it needs by name by @Franklyn-R-Silva in #33
- docs: offline cache, metrics and translations in the README, index and llms.txt by @Franklyn-R-Silva in #34
- chore: CODEOWNERS by @Franklyn-R-Silva in #35
- feat: live campaign updates over Realtime by @Franklyn-R-Silva in #36
- feat: FakeInAppMessaging testing fake (#12) by @Franklyn-R-Silva in #37
- chore: context7.json for AI assistants by @Franklyn-R-Silva in #38
- docs: match the docs to the code before 0.1.0 by @Franklyn-R-Silva in #44
- fix: SQL bugs before 0.1.0 by @Franklyn-R-Silva in #48
- fix: client bugs before 0.1.0 by @Franklyn-R-Silva in #55
- chore: release 0.1.0 by @Franklyn-R-Silva in #58
New Contributors
- @Franklyn-R-Silva made their first contribution in #10
Full Changelog: https://github.com/Franklyn-R-Silva/supabase_in_app_messaging/commits/v0.1.0