Inspiration

I’ve always believed that journaling can be a powerful tool for self-reflection, but I found that sticking with a daily habit—even when life gets busy—can be tough. Then one evening, after a particularly stressful day, I opened my notebook and wished for a friendly companion who could nudge me, celebrate my wins, and even cheer me on with a comforting word. That spark—wanting a “digital fox friend” who brings warmth, whimsy, and AI-powered insights to the page—led me to build Zensai.

What it does

Zensai is an AI-powered journaling companion that guides you through daily reflection and emotional check-ins. Each morning (or whenever you open the app), it generates a fresh, personalized prompt to spark your thoughts. When you write and submit your journal entry, Zensai analyzes your mood, crafts a supportive affirmation, and tucks that affirmation alongside your entry in the dashboard. From there, you can tap “Listen” to hear Zeno speak your affirmation aloud—anytime. Engaging with Gamification using badges rewards.

How I built it

  • Frontend
    Built with React and Vite for snappy performance. Tailwind CSS defines our soft pastel theme. Each journal screen fetches prompts and submits entries via simple hooks (usePromptGenerator, useMoodAnalyzer, useAffirmationGenerator, useVoiceSynthesis).

  • Backend & Edge Functions
    We use Supabase Edge Functions to keep our API keys secure and minimize latency. Each function wraps an OpenAI call:

    1. generate-prompt → GPT crafts a reflective question.
    2. analyze-mood → GPT classifies sentiment and returns a confidence score.
    3. generate-affirmation → GPT writes a tailored, encouraging affirmation.
    4. generate-speech → ElevenLabs TTS turns that affirmation into an .mp3, cached in Supabase Storage.
  • Database
    Supabase handles auth and stores journal entries. Each entry record includes the text, detected mood, generated affirmation, and the URL for its audio file.

Challenges we ran into

Supabase Edge Functions can take a moment to spin up, making the first API call feel sluggish. We added minimal caching and pre-warm calls on page load to keep the experience fluid.

Streaming audio vs. caching
At first, we streamed raw ElevenLabs audio every time. That meant repeated waits. We solved it by uploading each .mp3 to Supabase Storage the first time, so subsequent plays are instant.

Accomplishments that we're proud of

End-to-end AI workflow in under a week—prompts, sentiment analysis, affirmations, and voice playback all flow seamlessly.

  • Persistent audio: users can revisit any past affirmation and hear it again, reinforcing positive habits.
  • Clean, human-centered UI: despite AI complexity, the screens feel warm, minimal, and distraction-free.

What we learned

Effective prompt engineering is the key to useful AI outputs—balancing clarity, tone, and context.

  • Serverless functions can be both secure and performant if you tune cold starts and implement basic caching.
  • UX matters: small touches like “Listen” buttons and saved audio transform static text into an engaging, multi-sensory experience.

What's next for Zensai

Advanced AI analytics: Dive deeper into your emotional journey with AI-powered charts and insights—sentiment trends, correlation between activities and moods, and actionable recommendations.

  • Conversational Zeno: Chat with your fox companion in natural language—ask follow-up questions, explore past entries, or get mini coaching sessions powered by our AI.
  • Custom Journal PDF export: Download your entire journal as a beautifully formatted PDF “book,” complete with cover art, date headers, embedded affirmations, and your favorite prompts—perfect for printing or offline reflection.

Built With

Share this project:

Updates