Mind-Mend-App: Mind Mend AI: When a Mood Journal Becomes a Triage Engine
A privacy-first wellness app that encrypts journal entries, routes AI through Supabase Edge Functions, and turns emotional check-ins into targeted therapeutic actions.
- Mind Mend is not trying to be a therapist chatbot. It acts as a routing layer that turns a mood check-in into a specific intervention.
- Privacy is part of the product logic, not a compliance sticker. Journal text is encrypted before storage, and Gemini sits behind a Supabase Edge Function.
- The smartest detail is the feedback loop in `MoodTracker.tsx`, where AI output is parsed into game links that the UI can instantly render.
- The stack is small-team friendly because it keeps sensitive logic on the server while leaving the frontend fast, modular, and easy to ship.
The app does not chat. It routes.
Most wellness apps split into two familiar buckets. They either log feelings and stop, or they chat endlessly and hope the conversation itself helps. Mind Mend takes a different bet: the AI output is not the destination. It is the handoff.
That changes the product shape. A user enters a mood and a note, the note is encrypted, the server analyzes the signal, and the result is a concrete next step. Instead of waiting for insight to emerge from conversation, the app tries to move the user directly into a targeted action.
Privacy is the product feature
The repo’s privacy posture is not decorative. According to the codebase design, journal entries are encrypted on the client side before they are stored, and the frontend never calls Gemini directly. That means the sensitive part of the flow is split across layers on purpose.
There is also a quieter UX decision hiding inside auth. The app uses a pseudo-anonymous identity flow that creates a virtual email behind the scenes, which lowers the friction of signing up for something deeply personal. That matters here because mental-health tools lose users the moment they start feeling bureaucratic.
The result is a rare combination: the app asks for emotional data, but it works to reduce the social cost of giving it.
The feedback loop is the real engine
The most interesting code path lives in MoodTracker.tsx. It persists the mood entry, sends analysis through a Supabase Edge Function, and then renders suggestions from the model output. The implementation is clever because it treats the AI response as structured UI input, not as prose to be displayed and forgotten.
const handleSubmit = async () => {
const encryptedJournal = await encryptJournal(journalText);
await supabase.from('mood_entries').insert({
mood,
journal: encryptedJournal,
});
const { data } = await supabase.functions.invoke('analyze-mood', {
body: { mood, journal: encryptedJournal },
});
setSuggestions(renderSuggestionsWithGameLinks(data.suggestions));
};
That last line is the trick. The repo uses a small DSL pattern, with tokens like [GAME:breathing], to convert AI text into navigable actions. In practice, that means the model can do more than recommend. It can route the user straight into a specific therapeutic module.
Therapeutic games turn advice into action
The Games area is where the app’s philosophy becomes visible. Breathing, memory, and pattern exercises are not side quests. They are the destination the model can point to when it decides a user needs a specific intervention rather than a broader conversation.
| Pattern | Primary interaction | Data handling | AI role | Privacy posture | Next-step clarity | Immediate user payoff |
|---|---|---|---|---|---|---|
| Traditional mood tracker | Log feelings and review charts | Usually stores raw or lightly protected entries | Minimal or none | Often secondary to analytics | Low | Trend awareness |
| Chatbot wellness app | Talk back and forth | Conversation-heavy and persistent | Generates dialogue | Depends on vendor defaults | Medium | Feels supportive in the moment |
| Mind Mend AI | Log mood, then route to a module | Encrypts journal text before storage | Analyzes and dispatches | Built into the architecture | High | A concrete therapeutic action |
The difference is subtle but important. Mind Mend does not want the user to linger inside reflection forever. It tries to shorten the distance from insight to action.
A modern full-stack wellness blueprint
The stack is the other reason this repo is worth paying attention to. React, Vite, Supabase, shadcn-ui, React Query, and Edge Functions are a very efficient combination for a small team building sensitive consumer software.
The division of labor is clean. The frontend stays modular. Supabase handles auth, Postgres, and edge orchestration. Gemini stays behind a server-side proxy. That keeps the app fast to build without forcing the browser to become the place where secrets live.
| Layer | Mind Mend choice | Why it matters |
|---|---|---|
| Frontend | React, Vite, shadcn-ui | Fast iteration and a polished UI without framework overhead |
| State and data | React Query | Keeps server state predictable and easy to cache |
| Backend | Supabase plus Edge Functions | Moves AI calls and sensitive logic off the client |
| Storage | Postgres with RLS | Supports structured data and access control |
| AI integration | Gemini through a proxy | Protects API keys and centralizes prompts |
What Mind Mend trades off
Every architecture choice buys something and gives something up. Client-side encryption protects privacy, but it also limits server-side search and richer personalization over the raw journal text. That is a real cost, not a cosmetic one.
Pseudo-anonymous auth lowers friction, but it can complicate recovery and identity assurance later. And AI routing only works if the model emits well-formed tags and trustworthy suggestions, which means the product depends on disciplined prompt design and careful sanitization.
Those tradeoffs are acceptable if the priority is emotional safety. They are less acceptable if the goal is deep analytics or account portability. Mind Mend clearly chooses the former.