Skip to content
Server API

Connect React to Streakfox

Put the streak where your members already look. Count the action from your backend so it always lands.

ReactAny completed in-app action ✓
7day streak
The fox is proud.
M✓
T✓
W✓
T✓
F✓
S✓
S✓

What can keep the streak alive

Pick one action per program. Daily streaks count the first action each day; running totals count distinct completions.

  • Any completed in-app action
  • Daily visit

Set it up in 5 steps

  1. Create a program in Streakfox.
  2. Add the widget snippet to your app shell for signed-in members.
  3. Copy your program's incoming URL and keep it in your backend's private environment.
  4. POST member and completion_id from your backend after the action succeeds.
  5. Pass the same member ID from your auth system as data-member in the widget, with the program's action as data-event.
// Copy your program's incoming URL from Streakfox setup.
// Keep it in a server-only environment variable.
const response = await fetch(process.env.STREAKFOX_INCOMING_URL!, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    member: member.id,
    completion_id: `task_complete:${completion.id}`,
  }),
});
if (!response.ok) throw new Error(await response.text());

Questions

Is there a React component?

@streakdev/react is in private preview. Until it is published, use the hosted widget snippet.

Works well with

If it can send a webhook, it can keep a streak.

Start a program, send one test action and watch the flame light up.

Start free