Skip to content

Profile, Settings & Streaks

This section explains how DreamStream’s Learn tab, Settings (Profile), and Notifications work from a user perspective, while staying accurate to how the app behaves under the hood.


At a glance

Area What it does Where it lives What gets saved
Learn Guided plans, educational guides, and “Famous Dreams” stories Bottom nav → Learn Plan progress + plan onboarding answers (local-first) + server sync for plans
Profile Settings Personal info + Dream Persona + preferences Bottom nav → Settings Profile fields in Supabase + a few device-only settings
Notifications Morning recall, reality check reminders, AI-ready alerts, streak nudges Settings + plan tools Mix of device-local scheduling + server-triggered push

1) Learn

The Learn tab is organized into three experiences:

  • Dream Basics: short guides that teach fundamentals (science, technique, meaning, wellness).
  • Guided Plans: multi-day programs with checklists, reflections, and optional reminders.
  • Famous Dreams: story cards about well-known dream-inspired ideas.

1.1 Dream Basics (guides)

What users see

  • A horizontal carousel of “Dream Basics” cards.
  • Each card opens a guide viewer with:
  • A cover image
  • A small table-of-contents style outline
  • A formatted article (images, callouts, etc.)

Behavior notes

  • Guides are built into the app (they do not require an internet connection to load).
  • The table of contents items scroll to the matching section in the guide.
  • Inline images can be opened full-screen (lightbox) and closing the lightbox returns you to the same reading position.

1.2 Guided Plans

Guided plans are step-by-step programs designed to be completed over time.

Built-in plans

Plan Plan ID Duration Goal
Lucid Dreaming lucid_4w 28 days Build recall + awareness habits and practice lucid techniques
Nightmare Prevention nightmare_2w 14 days Reduce nightmare distress using calming routines + rewrite exercises
Sleep Paralysis sleep_paralysis_10d 10 days Break the panic loop and reduce episode frequency

What users do inside a plan

  • Start the plan (first-time users may see a short, plan-specific onboarding quiz).
  • Users can close the quiz to return to Learn, or skip it to go straight to the plan.
  • Tap a day to open a detailed “Day” view.
  • Mark the day complete.
  • Optionally write a short reflection for that day.

How progress is saved (local-first)

Plan progress is designed to feel instant and resilient:

  • It is saved on-device immediately.
  • It syncs to the server in the background.
  • If the device is offline, progress continues to work and sync resumes later.
flowchart TD
  A[User opens a plan] --> B[Load local progress instantly]
  B --> C[Fetch server progress if available]
  C --> D[Merge progress safely]
  D --> E[User marks days complete / writes reflection]
  E --> F[Save to local storage immediately]
  F --> G[Debounced sync to Supabase]
Where plan progress is stored
  • On-device: localStorage under a per-user/per-plan key.
  • Server: Supabase table guided_plan_progress (days/reflections + onboarding answers).
  • Flexible onboarding answers are stored as onboarding_answers (JSONB) with an optional onboarding_version.

1.3 Reality Check reminders (optional)

Reality checks are optional reminders that encourage lucid dreaming practice.

What users see

Inside a plan, users can toggle Reality Check reminders on/off.

What happens when enabled

  • DreamStream requests notification permissions (on supported native devices).
  • If local notifications are allowed, DreamStream schedules 4 reminders per day.
  • Target hours: 10:00, 13:00, 16:00, 19:00
  • The minute value is randomized slightly for variety.
Exact scheduling details
  • Notification IDs: 200203 (one per reminder)
  • Stored flag: localStorage['dreamstream:reality_check_enabled']
  • Message library lives in: src/services/nativeService.ts (scheduleRealityCheckReminders)
Reality Check message library (4 templates)
Time Title Message
10:00 Reality Check 🌙 Stop. Look around. Am I dreaming right now?
13:00 Am I Dreaming? ✨ Count your fingers. Do you have the right number?
16:00 Dream Check 👁️ Look at some text, look away, look back. Did it change?
19:00 Question Reality 🔮 Try pushing your finger through your palm. Did it work?

2) Profile Settings

Settings is where users manage identity, personalization, privacy controls, and notification preferences.

2.1 Personal Info

Users can edit:

  • Name
  • Age
  • Appearance description
  • Avatar (image)

2.2 Dream Persona

Dream Persona is a personalization layer that helps DreamStream generate more consistent visuals and better context.

Digital Twin

  • Users can upload a “Digital Twin” image and crop it before saving.
  • When a dream is written in first‑person (or implies “me”), DreamStream uses the Digital Twin to keep AI visuals consistent.
  • If no Digital Twin is set, the Appearance description is used instead.
  • Users can remove or replace it later.

Known People

  • Users can add up to 3 people.
  • Each person includes:
  • Name
  • Relationship
  • Optional aliases (nicknames)
  • Optional reference image
  • When a name or alias appears in a dream, DreamStream can:
  • Show a small Detected chip inside the logger
  • Use the person as grounding context in Deep Insights
  • Match their face in AI visuals only if a reference image exists

2.3 Preferences

Dark Mode

  • Toggling Dark Mode updates the app theme immediately.
Device storage

Dark mode is persisted on-device in localStorage['darkMode'].

Default Analysis Style

  • Users can choose the default analysis style.
  • Options shown in the UI:
  • Jungian (Symbolic)
  • CBT and Spiritual are present but marked Coming Soon.
  • Currently, all analyses still run in the Jungian style; the other options are saved for future expansion.

Biometric Lock (device-only)

If the device supports it, the user can enable biometric lock.

  • When enabled, DreamStream requires Face ID / fingerprint to unlock when opening.
Device storage

Biometric lock is stored on-device in localStorage['biometric_lock_enabled'].


The Profile Gallery shows all AI-generated media from the user's dreams in one place.

Signed media URLs

Gallery items can be sourced from either a stored URL or a stored media path. The app refreshes signed URLs automatically when needed.

What users see

  • A category grid grouped by dream type (Normal, Nightmare, etc.) with item counts
  • After selecting a type, filters for:
  • Emotion (from tags)
  • Stress (low/medium/high)
  • Sort (newest/oldest)
  • Items are labeled Image or Sequence and open in fullscreen lightbox
  • Swipe navigation between items in lightbox

Actions available

  • The gallery is view‑only; sharing or saving happens from Dream Detail.

2.5 Streaks & Celebrations

DreamStream tracks journaling streaks to encourage consistent dream logging.

What users see

  • Streak Card on Home Dashboard showing current streak count
  • Streak Counter on Profile showing days logged

Streak Celebration Modal

When users hit a milestone (e.g., 7 days, 30 days), a celebration modal appears:

  • Confetti animation
  • Encouraging message
  • Haptic feedback (on native)
  • Option to continue or share

How streaks are counted

  • Streaks count unique calendar days (multiple dreams in one day count once).
  • A Didn't remember log counts as a logged day (habit marker), even though it isn’t a dream entry.
  • Every 7 logged days earns one grace day that can protect the streak if a day is missed.
  • Missing more days than your grace resets the streak.

Streak reminder (optional)

Users can enable "Gentle Motivation" push notifications in Settings. The server sends periodic reminders if the user hasn't logged in a while (with a backoff strategy to avoid annoyance).

If the user logs Didn't remember for today, DreamStream treats that as "logged" and skips sending a reminder for that day.


3) Notifications

DreamStream uses two notification systems:

  • Local notifications (scheduled on-device)
  • Push notifications (sent from the server via OneSignal)

3.1 Notification controls in Settings

Setting Type What it does
Dream Recall Local Schedules a morning reminder to log your dream
Analysis Ready Push Notifies when a dream finishes processing
Gentle Motivation Push Periodic reminders if the user hasn’t logged in a while

3.2 Web push “Launch URL” recipes (copy/paste)

When sending a web push from OneSignal, you can set a Launch URL to control what screen opens after a user taps the notification.

These URLs are supported by the app (they use ?action=... query params):

  • Open the dream logger: https://dreamstream.art/?action=open_log
  • Open Deep Insights: https://dreamstream.art/?action=open_deep_insights
  • Open a specific dream: https://dreamstream.art/?action=open_dream&dreamId=YOUR_DREAM_ID

Note

Opening a specific dream requires the user to be logged in. If they aren’t, the app will wait and retry after login (same tab/session).

First‑time notification setup

  • New users see a “Design your Experience” prompt to pick a recall time and toggles.
  • Preferences are stored locally and can be changed later in Settings.

Dream Recall (morning reminder)

  • The user selects a time.
  • When enabled, DreamStream schedules a daily local notification on native devices.
  • Changing the time updates the schedule automatically.
Exact scheduling details
  • Uses notification IDs: 101131 (one per day-of-month template)
  • Scheduling strategy: 31 scheduled reminders, each set to fire on its day-of-month at the chosen time.
  • Months without that day simply won’t fire that template (e.g., Feb won’t fire day 30/31).
  • Message library lives in: src/services/nativeService.ts (scheduleMorningReminder)
Dream Recall message library (31 templates)
Day Title Message
1 If you remember your dream 🌙 Take 30 seconds to capture it before it slips away.
2 Rise and record! ☀️ Your brain just dropped a new story. Check it out?
3 Dream catch of the day 🎣 Hook those memories before they swim away.
4 Wake up call! 📞 Your brain has a message for you. Let's write it down.
5 Midnight Movie 🍿 Action, drama, or sci-fi? Log the plot while it’s fresh!
6 REM-ember? 🧠 If any scene stuck with you, jot it down while it’s fresh.
7 Pillow talk 💤 What were you and your subconscious chatting about?
8 Night shift news 🗞️ Your brain worked hard last night. Give it a high five!
9 Memory vault 🔓 Time to unlock that dream story and save it for later.
10 Sleepy signals 📶 Your mind is broadcasting. Want to tune in and jot a note?
11 Dream Scavenger 🕵️ Spot any familiar signs or faces in your sleep?
12 Shadow stories 🌒 The moon saw it all. Now you tell us!
13 Lucid vibes 👁️ Remembering is the first step toward influencing your dreams.
14 Space Travel? 🚀 Where did you go in your sleep last night?
15 Mid‑month moment ✅ Your dream journal is taking shape. Keep it going at your pace.
16 Brain's art gallery 🎨 What did you visualize last night? Describe the colors.
17 Parallel World 🛸 In which reality did you spend your night?
18 Sleepy scriptwriter 🖋️ If last night was a book, what would the next page say?
19 Morning mindset 🧘 Start your morning by reflecting on your night.
20 Dreamy details 🔍 One small detail can mean a lot. What stands out today?
21 The Sleep Cycle 🚲 Ride those dream waves right into your journal.
22 Narrative news 🎬 Every dream is a story. What's the latest plot twist?
23 Subconscious Spark ✨ Capture that one weird thing you still remember.
24 Pillow Projects 🏗️ Your brain built a whole world last night. Want to save it?
25 Midnight Musings 🌑 The quietest moments have the loudest stories.
26 Journal Journey 🗺️ Another day, another dream. You're doing great!
27 Dream Lens 👁️ Zoom in on one specific symbol from last night.
28 Late‑month note 🧠 What’s one thing you’ve noticed in your dreams lately? Add a quick note.
29 Bonus Vision? 🎁 Whether it was long or short, every dream counts!
30 Dream patterns? ☄️ Your collection is growing. Any themes or repeats showing up yet?
31 One more note 🧩 A month of mysteries. Add one more dream (or fragment) to the pile.

Analysis Ready (push)

  • This is controlled by the Analysis Ready toggle.
  • When enabled, the server may send a push notification when a dream’s processing completes.
  • Deep Insights Ready notifications are sent when a report finishes (currently not tied to this toggle).
Analysis Ready push message
  • Title: Dream Ready
  • Body (if dream has a title): "${dream.title}" is fully visualized and analyzed.
  • Body (fallback): Your dream is fully visualized and analyzed.
  • Source: supabase/functions/process-generation-jobs/index.ts
Deep Insights push message
  • Title: Deep Insights Ready
  • Body: Your personalized dream analysis is complete.
  • Source: supabase/functions/process-generation-jobs/index.ts

Gentle Motivation (streak nudges)

  • This is controlled by a Settings toggle.
  • The server may send periodic reminders when the user has been inactive.
Gentle Motivation message library
Title Message
A gentle check-in If you have a moment tonight, write down anything you remember - even a fragment.
Before you wind down Want to jot a line about your last dream? Future-you will be glad you did.
No need to be perfect Messy notes are welcome. Start with a person, place, or feeling - whatever you recall.
One sentence is enough A small note can keep the thread. Add a quick entry when you're ready.
A small reset Try this: where were you, who was there, and how did it feel? Twenty seconds is plenty.
Your journal is waiting Open DreamStream anytime. A quick entry is plenty - no pressure.
If anything stuck with you A single detail can bring the rest back later. Write down one thing you remember.
Keep the thread Dream recall builds quietly over time. A tiny note today helps tomorrow.

Source: supabase/functions/send-streak-reminders/index.ts

Note

For a deeper explanation of AI completion events and “Dream Ready” behavior, see:


Implementation map (for audits & support)

Client files
  • Learn UI: components/Learn.tsx
  • Plan experience + sync: components/PlanViewer.tsx
  • Settings UI: components/ProfileSettings.tsx
  • Native notifications + permissions: src/services/nativeService.ts
Server (Supabase)
  • Guided plan progress table: guided_plan_progress
  • Generation completion notifications: supabase/functions/process-generation-jobs/index.ts
  • Streak reminder cron: supabase/functions/send-streak-reminders/index.ts


← Home