Skip to content

Repository files navigation

Streaks

A calm habit tracker built with Expo SDK 57, local reminders, and push-notification deep links.

What it does

  • Create, edit, and delete habits
  • Schedule local reminder notifications for daily or weekly habits
  • Mark habits done and keep a streak count
  • Open a habit detail screen from a notification tap
  • Register for Expo push tokens in a dev build on a physical device
  • Copy the push token from Settings for test sends

Setup

  1. Install dependencies
npm install
  1. Start the app
npm run start
  1. Run on a device or emulator
npm run android
# or
npm run ios

Push notifications

Push registration and push delivery require a development build or a supported simulator.

Expo Go can still show local reminders, but it cannot receive push notifications.

If getExpoPushTokenAsync complains about a missing project id, make sure the Expo project is linked in EAS and that Constants.easConfig.projectId or expoConfig.extra.eas.projectId is available in the build.

Send a test push

  1. Open Settings in the app and copy the Expo Push Token.
  2. Run the helper script:
EXPO_PUSH_TOKEN="ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]" \
HABIT_ID="demo-habit" \
TITLE="Hydrate now" \
BODY="Tap to open the habit detail screen." \
node scripts/send-test-push.mjs

The payload uses this shared data contract:

{
  "screen": "/habit",
  "habitId": "demo-habit"
}

Writeup

Local vs push notifications

Local notifications are scheduled by the device and do not need a server. Push notifications are sent remotely through Expo's push service and require a token plus a dev build.

Push ticket vs receipt

A push ticket is the immediate response from Expo after you submit a push. A receipt is the later delivery result for that ticket. Tickets confirm acceptance; receipts confirm whether delivery succeeded.

What DeviceNotRegistered means

The device token is no longer valid for push delivery. In practice, remove that token from your backend and stop sending pushes to it.

Why Expo Go cannot be used for push testing

Expo Go does not support remote push notifications for SDK 53+ on Android, and the same limitation applies for this project's push workflow. Local notifications still work in Expo Go.

Why the Android channel must exist first

Android notification channels define importance, sound, and behavior before the permission flow and scheduling happen. Creating the custom high-importance channel first avoids the fallback Miscellaneous channel and keeps reminder behavior consistent.

Suggested screenshots or screen recording

Capture these flows for the final review:

  1. Create a habit with daily and weekly schedules
  2. Edit a habit and reschedule reminders
  3. Mark a habit done and show the streak update
  4. Delete a habit and confirm its reminders are removed
  5. Permission denied state in Settings with the open-settings action
  6. Local notification tap opening a habit detail screen
  7. Push notification tap opening the same habit detail screen
  8. Foreground push banner vs background tap behavior

Notes

  • Habits are stored locally with AsyncStorage.
  • Reminder scheduling only cancels the specific habit's notification IDs.
  • The shared notification tap handler routes both local and push payloads.

About

Streak is a modern habit tracker app that helps users build positive habits, stay consistent, and achieve their goals with daily streaks, progress tracking, reminders, and insightful statistics.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages