Inspiration

When I moved to Australia in 2008, email created a natural archive. Long-form communication with my family created memory trails.

Then:

Text replaced email

WhatsApp replaced long paragraphs

Voice notes replaced reflection

Everything became ephemeral

We gained speed. We lost narrative.

Before You Die is a way to preserve the moments that modern communication stopped preserving.

What it does

Before You Die is a private space to reflect on moments that would otherwise disappear.

You speak a memory. The system rewrites it in first person — proportionate to what you actually said — and then asks one gentle follow-up question. The goal isn’t to summarize. It’s to help you go one layer deeper.

After three turns, the memory feels complete. You can keep it locally, download it, or let it go.

In a world of fragmented communication and disappearing text messages, Before You Die helps preserve the kinds of reflections we used to write in long emails — intentionally and privately.

How we built it

The application is built as a lightweight, privacy-first web app using:

Next.js (App Router) for the frontend and API routes

Client-side audio recording via the MediaRecorder API

Speech-to-text processing through Venice APIs

A structured prompt architecture for narrative rewriting and follow-up generation

In-memory React session state (no database)

LocalStorage for optional saved memories

Client-side file generation (Blob + anchor download) for .txt / .md exports

The system uses two API routes:

/api/structure — rewrites the initial transcript into a first-person narrative and generates one contextual follow-up question.

/api/continue — integrates new responses into the evolving story and generates the next gentle question.

We intentionally limited the flow to three turns to keep the experience focused and emotionally contained.

No accounts, no backend persistence, and no external storage are required. Privacy is preserved by design.

Challenges we ran into

Stabilizing the audio recording flow across recording / stopping / processing states.

Avoiding “melodramatic AI syndrome” — ensuring the system stayed proportionate to the user’s tone and did not over-embellish simple memories.

Maintaining a calm, minimal interface while iterating quickly.

Designing something that felt intentional rather than like a generic AI wrapper.

We also had to carefully manage session state so that turn progression only advanced after the agent successfully responded, preventing UI inconsistencies.

Accomplishments that we're proud of

Creating a coherent emotional tone — the interface feels like a space, not a tool.

Designing a constrained 3-turn reflective loop that feels complete rather than endless.

Maintaining privacy-first architecture without adding unnecessary complexity.

Implementing clean client-side export without backend storage.

Building something stable, intentional, and demo-ready within hackathon constraints.

Most importantly, we built something that feels calm in a noisy ecosystem of AI tools.

What we learned

Simplicity is harder than feature density.

Adding more intelligence isn’t about more prompts or more UI — it’s about proportion, tone, and restraint.

We learned that the emotional framing of a product matters as much as its technical implementation. Small interface decisions — like wording a button as “Begin” or “A gentle question” — dramatically change how the experience feels.

We also learned that privacy and clarity can coexist with AI-driven reflection.

What's next for Before You Die

Future directions include:

Optional life-context scaffolding (birth year, geography) to enable historically contextual prompts.

Small-group or family sharing modes with explicit consent.

Structured memory collections organized by themes (migration, work, family, place).

Long-term archive formats suitable for digital legacy preservation.

More nuanced narrative calibration to match personality and emotional tone over time.

The long-term vision is to use AI not to replace memory — but to help preserve the kinds of reflections modern communication stopped preserving.The next section is which tools we used. It's actually built with what languages, frameworks, platforms, cloud services, databases, APIs or other technologies that you use.

Built With

  • nextjs
  • react
  • tailwind
  • venice
Share this project:

Updates