Inspiration

Mental wellbeing support is often fragmented. One application records moods, another provides meditation exercises, another tracks physical activity, and crisis information may be hidden somewhere else entirely. Many AI chatbots also provide generic responses without understanding the user’s recent sleep, stress, goals, or preferred coping strategies.

I created MindGuard AI to explore a different approach: one calm, privacy-first workspace where conversation, wellbeing tools, physical activity context, personal planning, and human safety support work together.

MindGuard is designed as a supportive companion—not a therapist, medical device, diagnostic system, or replacement for emergency and professional care.

What it does

MindGuard AI introduces Lumi, an AI companion that can discuss difficult emotions as well as ordinary everyday topics naturally.

The application includes:

  • Context-aware AI conversations: Lumi uses recent conversation, check-ins, user-approved memories, and tool-effectiveness information to provide more relevant responses.
  • Mood and wellbeing check-ins: Users can record mood, stress, energy, sleep, and personal reflections.
  • Risk-aware safety responses: Elevated or critical language is handled through a dedicated safety layer that prioritizes immediate human support instead of casually recommending an exercise.
  • Wellbeing toolkit: Lumi can recommend focused tools including breathing exercises, grounding techniques, thought reframing, study resets, muscle relaxation, and sleep wind-down exercises.
  • Lumi Media: Users can ask Lumi to open calming, focus, sleep, or uplifting music through an integrated media experience.
  • Mind-body insights: Optional Google Health integration brings activity information such as steps, workouts, and estimated energy expenditure into weekly wellbeing insights.
  • Goals, focus sessions, and daily planning: MindGuard transforms wellbeing context into realistic actions rather than leaving the user with only a conversation.
  • Personal safety plan: Users can privately record warning signs, coping steps, safer places, trusted people, professional support, environmental safety steps, and reasons to keep going.
  • Trusted-contact shortcuts: MindGuard can open the user’s call or messaging application, but it never sends a message or starts a call automatically.
  • Reports and insights: Mood calendars, weekly summaries, sleep recovery, tool-effectiveness tracking, and downloadable PDF reports help users identify patterns over time.
  • Privacy and accessibility: The application includes local-first storage, account separation, data controls, reduced-motion support, adjustable text sizing, high contrast, and dim display modes.
  • Encrypted reflection vault: Sensitive reflections can be protected using browser-based encryption.

How I built it

MindGuard AI is built with Next.js, React, TypeScript, and Tailwind CSS and deployed through Vercel.

Lumi’s companion responses are generated through the Groq API. The backend requests structured output containing the detected emotional tone, intensity, risk level, direct response, follow-up question, suggested wellbeing tool, and an optional safe memory candidate. Responses are validated before being used by the interface.

A separate safety pipeline evaluates messages for elevated or critical risk. Safety decisions take priority over media requests, memory creation, and ordinary wellbeing-tool recommendations.

Personal records use Dexie and IndexedDB for a local-first architecture. Clerk provides authentication, while account boundaries prevent local records belonging to one signed-in account from appearing under another.

The application also uses:

  • Google OAuth and Google Health APIs for optional activity context
  • YouTube Data API for Lumi Media
  • MediaPipe for an optional browser-based visual check-in
  • Web Speech APIs for voice input and read-aloud features
  • Web Crypto API for encrypted reflections
  • jsPDF for downloadable reports and safety-plan exports

Challenges I faced

One major challenge was balancing natural conversation with responsible safety behaviour. Lumi needed to feel like a grounded companion during ordinary conversations while immediately changing priorities when a message indicated possible danger.

Another challenge was connecting many features without creating a confusing interface. Mood records, sleep, activity, AI insights, media, goals, tools, reports, and safety planning needed to feel like parts of one experience.

The local-first architecture also required careful handling of persistence, account separation, approved memories, browser permissions, encryption, and third-party integrations.

I additionally had to make structured AI responses reliable, prevent contradictory media responses, handle browser and deployment differences, and design fallbacks for optional integrations.

Accomplishments that I’m proud of

I built and deployed MindGuard AI as a complete end-to-end application rather than only a concept or interface mock-up.

I am especially proud that the project:

  • Combines emotional and physical wellbeing context
  • Turns AI recommendations into usable in-app actions
  • Treats crisis safety differently from ordinary stress
  • Keeps the user in control of calls, messages, memories, and integrations
  • Provides meaningful functionality even without connecting external health services
  • Includes privacy, accessibility, safety planning, reporting, and encrypted storage within one consistent experience

What I learned

This project taught me that responsible wellbeing technology involves much more than connecting a chatbot to an interface. The product needs clear boundaries, predictable structured responses, privacy-conscious data flows, safe failure states, accessible design, and honest communication about what the system can and cannot do.

I also gained experience with local browser databases, authentication, OAuth integrations, external APIs, schema validation, browser media and speech capabilities, encryption, PDF generation, responsive interface design, testing, GitHub workflows, and production deployment.

What’s next for MindGuard AI

Future development would include structured safety evaluations with qualified advisors, broader user testing, multilingual support including Sinhala and Tamil, stronger encrypted synchronization across devices, native mobile applications, improved accessibility testing, more integrations with wearable platforms, and transparent evaluation of Lumi’s safety and response quality.

The long-term vision is not to replace human relationships or professional care. It is to help people understand their patterns, discover what genuinely supports them, and reach real human help when it matters most.

Built With

Share this project:

Updates

Submission history