Skip to content
Skip to content
Goodspeed

Connect OneSignal to your Goodspeed app

Push notification delivery via OneSignal SDK: token registration, Android channels, and server-side send from Edge Functions. Goodspeed wires OneSignal into every app that needs it at generation time, so you start with a working integration, not a blank config and a documentation tab.

WHAT GETS WIRED IN

Built into every OneSignal build

Every app Goodspeed generates with OneSignal includes these wired integrations from the first build. No manual setup required.

ItemDescriptionStrength
OneSignal.initialize() called on app boot with gasConfig.backend.onesignal.appId, guarded by push feature flagOneSignal.initialize() called on app boot with gasConfig.backend.onesignal.appId, guarded by push feature flag01
requestPermission() triggered after the user completes onboarding to maximize opt-in conversionrequestPermission() triggered after the user completes onboarding to maximize opt-in conversion02
Device token stored in the Supabase push_tokens table alongside the platform for segmented sendsDevice token stored in the Supabase push_tokens table alongside the platform for segmented sends03
supabase/functions/send-push/ Edge Function accepts a user ID and message payload, looks up the token, and delivers via OneSignal REST APIsupabase/functions/send-push/ Edge Function accepts a user ID and message payload, looks up the token, and delivers via OneSignal REST API04
Android notification channels created from gasConfig.features.pushNotifications.channels on app initAndroid notification channels created from gasConfig.features.pushNotifications.channels on app init05

Source: gas-template repository · push-notifications

REAL GENERATED CODE

A snippet from a OneSignal integration the pipeline ships

This pattern comes directly from the gas-template codebase. The studio generates OneSignal integration code like this for every app that includes it, not a placeholder you have to fill in yourself.

  1. OneSignal init

    // lib/onesignal.ts
    export function initOneSignal(): void {
      if (isWeb) return;
      if (!gasConfig.features.pushNotifications.enabled) return;
      const appId = gasConfig.backend.onesignal?.appId;
      if (!appId) return;
      OneSignal.initialize(appId);
      OneSignal.Notifications.addEventListener(
        'click',
        (event) => handleNotificationOpen(event),
      );
    }
GDaily Allergens

Today's log

Gluten
Tree nuts
Shellfish
Dairy
HomeScanLogProfile

START WITH ONESIGNAL

Your OneSignal integration, generated