Inspiration

  • Sleep science shows memory consolidation strengthens during slow-wave cycles, especially when cues reactivate recent learning. Studies from labs like Northwestern and MIT show targeted memory reactivation can boost recall by 10‑30%.
  • We figured: why waste those hours just doomscrolling when we can turn bedtime into a calm, ritualized review?
  • We also grew up on narrated bedtime stories, so we blended that soothing aesthetic with modern AI voices and adaptive spacing.

What it does

  • Import or create flashcards, auto-summarize them into concise cues, then run a “Sleep Mode” that loops background ambience plus narrated cues. Next morning you get a quick retention quiz, dashboards showing cue counts, topics reviewed, streaks, etc. All powered by local storage so it works offline.
  • The same works for study sets, story snippets, affirmations, anything short-form that benefits from spaced repetition.

How we built it

  • Front-end: Expo + React Native + Expo Router, custom theming, AppButton primitives, shadow helpers, safe-area padding.
  • State & Storage: Typed Zustand stores + AsyncStorage; helper factories in lib/storage.ts keep topics/items/cues consistent.
  • Import Pipeline: expo-document-picker and expo-file-system load PDFs/TXT; Gemini stub summarizes into cue text and short headers; automatic topic naming/shortName generation.
  • Audio Stack: expo-av everywhere. Sleep Mode queues cue MP3s from ElevenLabs, loops ambient tracks, ducks background audio during TTS, and supports tap-to-preview for both voices and ambience.
  • Analytics & Quiz: Logs sessions + cue events, surfaces them in Dashboard and Quiz Mode with simple charts (bar/line) and generates the content for the quiz using Gemini.

Challenges we ran into

  • Audio mixing: Synced ambient music and voice cues with real-time ducking and fades. We cached MP3s with base64 streaming, reverted to native sessions for stability, and fine-tuned background playback, lock-screen persistence, and volume balance.
  • UI consistency: We oscillated between designs (shadows clipped, chips overflowing cards, inconsistent headers). Keeping cards, buttons, and preview controls visually aligned across tabs required a dedicated styling sweep.
  • Data churn: Topics/materials were coming from different teammates with conflicting schemes (manual flashcards, Gemini import, quiz mocks). Normalizing Topic→Item→Cue relationships and avoiding infinite Zustand re-renders was surprisingly tricky.

Accomplishments that we're proud of

  • A polished Sleep Mode UX: scrollable ambience picker, selectable voices, one-tap previews, real-time status, and graceful cleanup. It feels like a product, not a demo.
  • The import-to-play pipeline actually works end-to-end: pick a doc, auto-generate short headers/cues, save a topic, then immediately rehearse it in Sleep Mode and quiz it the next morning.
  • Adaptive analytics: Dashboard summarizes recent sessions and cue usage so users can see real progress, not just raw logs.
  • Collaborative velocity: three people editing the same file tree at 3 AM without losing work—thanks to strict hooks, linting, and a shared design language.

What we learned

  • Audio UX is unforgiving; even small state bugs (not clearing refs, mis-ducking volumes) break trust immediately.
  • Users need clear affordances—buttons that visibly toggle, consistent header placements, preview labels that tell you what will happen.
  • Sleep science is nuanced: you can’t bombard someone with long content at night; it’s about bite-sized cues, calm ambience, and respecting their bedtime routine.
  • Typed stores and helper factories saved us from a lot of “undefined property” crashes when juggling asynchronous imports/quizzes.

What's next for DreamScape

  • Beyond Bedtime: Sleep Mode is just one channel. DreamScape could schedule micro-reviews on commutes—auto-generate “Transit Mode” playlists, send push reminders for quick quizzes while walking to class, or even deliver narrated story chapters.
  • Smarter Personalization: Use Gemini to craft topic headers, difficulty tags, and context-aware quizzes; combine with spaced-repetition algorithms to prioritize weaker cues.
  • Community Templates: Share topic packs (language vocab, case law, med mnemonics) and let creators monetize high-quality sets.
  • Wellness Tie-ins: Integrate sleep tracking APIs to auto-adjust cue intervals based on sleep stage estimates, and pair cues with gentle breathing prompts.
Share this project:

Updates