Inspiration

It's 2:07 AM. You've been in bed for an hour, and your brain, quiet all day, suddenly remembers everything: the project idea you never wrote down, the midterm tomorrow, the text you never sent. Racing thoughts at bedtime are one of the most common reasons people can't fall asleep, and the usual advice ("write it down") means picking up a bright phone and typing.

We wanted the opposite: say it out loud in the dark, let it go, and wake up to something useful. And because the same worries come back night after night, sometimes even into dreams, we wanted NyteNyte to remember them for you and show you the pattern.

What it does

NyteNyte is an iOS app with two halves: a dark Nyte side for winding down and a light Day side for the morning.

  • Talk, don't type. Tap the mic and ramble, or stay in bed and say "Hey Siri, Nyte Nyte brain dump." You can still type to add something you forgot.
  • Tomorrow, planned in seconds. NyteNyte pulls out what you're worried about, what you're considering, and what you've committed to, then turns it into a short to-do list. Say "it's due by 12" and every reminder tied to it lands before noon.
  • Reminders that sound like they were listening. Each one quotes your own words back to you (You said "we don't even have a pitch deck") and arrives as a notification in the morning.
  • Log dreams the moment you wake. Speak or type a dream; NyteNyte maps its people, places, things, actions, and feelings.
  • See the patterns. The Patterns tab shows your 15 most recurring thoughts and dream symbols, fuller in color the more often they come back, and how they connect: what leads to a decision, what competes for your time, and which worries followed you into a dream.
  • Watch stress ease. Check off a task and the worry it came from fades on the map.
  • Habits with streaks for the small things you're building.

One rule runs through all of it: NyteNyte never invents a connection. Every link, echo, and reminder points back to something you actually said, and it never tells you what your dreams "mean."

How we built it

  • Pipeline: Voice $\rightarrow$ ElevenLabs $\rightarrow$ FastAPI $\rightarrow$ Grok $\rightarrow$ Knowledge graph in Neon $\rightarrow$ Back to the app.
  • iOS (Swift, SwiftUI): While you talk, Apple's on-device speech shows a live transcript and AVFoundation records the audio; when you stop, the recording goes to ElevenLabs for a cleaner transcript. Siri support uses App Intents, reminders are local notifications, and both graphs are drawn with SwiftUI Canvas, with a small force-directed layout so links don't run behind unrelated nodes.
  • Speech to text: ElevenLabs Scribe, called from our backend so API keys never ship in the app.
  • Backend: FastAPI + SQLModel, hosted on Railway with health checks and restart on failure, so it's always on.
  • Database: Neon Postgres for tasks, habits, and the knowledge graph.
  • AI: Grok (grok-4.20 non-reasoning, temperature 0) with JSON-schema structured outputs, so every response matches the shape our code expects. Gemini is wired in as an automatic fallback if Grok is unavailable.

Each night makes three AI calls: one extracts the thoughts (worry, idea, or intention; past, present, or future; committed or only considering), then two run in parallel—one linking them to each other and to earlier nights, and one writing tomorrow's steps.

The knowledge graph: Thoughts, dream symbols, and tasks are nodes. Edges are leads to, competes, related, said together, echo (a thought showing up in a dream), and becomes (a thought becoming a task). Every node keeps its evidence: which entry it came from and a short quote. Recurrence drives the shading: for a thought mentioned on $c$ nights, among items mentioned between $c_{\min}$ and $c_{\max}$ nights,

$$s = 0.25 + 0.75 \cdot \frac{c - c_{\min}}{c_{\max} - c_{\min}}$$

so the rarest item is still visible and the most recurring is fully saturated. A worry counts as eased once every task it became is done.

Trust is enforced in code, not just prompts. The server drops any link, echo, task, or reminder that doesn't name a real thought, never links a thought to itself, and won't let something already in the past "compete" for your time. 52 backend tests run with fake AI providers, so every rule is checked without spending credits.

Challenges we ran into

  • Ran out of free AI quota mid-test: Gemini's free tier allows 20 requests per model per day; our testing used them up and a real dream failed. We added a fallback through every Flash model, stopped regenerating reminders on every screen open, then moved to Grok with Gemini as backup, which brought each AI call down to 1–2 seconds from as much as 9.
  • The AI connected too much: In side-by-side tests, Grok linked unrelated thoughts ("gym" to "everything feels heavy" from a different night) and suggested a false dream echo. We tightened the prompts (an earlier thought can only be linked if tonight's words mention it), set temperature to 0, and added a server rule, then re-ran the same test set until it matched Gemini's restraint.
  • Reminders ignored deadlines: "Due by 12" still produced a 2 PM reminder to debug. A deadline-first rule fixed it across repeated runs.
  • Secrets in a public repo: API keys ended up in a committed file. We rotated the database password and the ElevenLabs key and moved every secret into environment variables.
  • Siri and smart speakers: Siri reads "Hey Siri, tell NyteNyte..." as sending a message, so we redesigned the phrases. Google Home no longer lets third-party apps receive voice input, so we focused on Siri.
  • Prototype to production: Our first app was built against a quick Node prototype; moving to FastAPI left screens calling routes that no longer existed, which we rebuilt one by one.
  • Team workflow: Four people, one backend folder. We split ownership by package (API and knowledge graph) with CODEOWNERS and one agreed contract between them.

Accomplishments that we're proud of

  • A sentence spoken in the dark becomes a to-do list, deadline-aware reminders, and an updated map in seconds, hands-free with Siri.
  • A knowledge graph that stays grounded: every star and every line traces back to the user's own words.
  • Choosing our AI by measurement: the same nights and dreams through Grok and Gemini, compared on accuracy, restraint, and speed.
  • An always-on deployment with an automatic AI fallback, so the app doesn't depend on a laptop or a single provider.
  • A Yin/Yang design that makes the switch from wind-down to morning feel physical.

What we learned

  • Structured outputs make an LLM a dependable component; rules in code are what make it trustworthy.
  • "Never invent a connection" is both an ethical choice and a product feature for something this personal.
  • Pick a model by testing it on your own data, not by reputation.
  • Free tiers and secrets need a plan from hour one.
  • Platform limits (Siri phrasing, closed smart speakers) shape the product as much as the code does.

What's next for NyteNyte

  • Weeks, not nights: Trends across sleep, recurring stressors, and task completion.
  • More ways to talk: An Alexa skill and a one-button bedside device, so the phone can stay across the room.
  • Habits from patterns: Suggest a small habit when a worry keeps returning, and track the nightly brain dump automatically.
  • A morning brief in iMessage.
  • Accounts and privacy: Real sign-in, encryption at rest, and one-tap export and delete.

Built With

Share this project:

Updates

Submission history