DEV Community

Timofei Gats
Timofei Gats

Posted on AI-assisted

Shipping a multilingual Flutter AI therapist: Gemini first, Claude as fallback

I shipped Safe Space, a Flutter app for everyday mental-health self-help: AI chat, a mood journal, CBT-style thought records, PHQ-9 / GAD-7 screens, and breathing tools. It is not therapy, not a medical device, and not a crisis line. That disclaimer lives in the UI, the backend, and the public site.

This is a build log, not a ranking of other apps.

Stack that actually shipped

  • Client: Flutter (Android + web today; iOS is still Coming soon)
  • Auth: Firebase Authentication
  • AI: Google Gemini on the backend, with Anthropic Claude as a fallback if Gemini is unavailable
  • Languages: English, Russian, Turkish, Spanish, German, Portuguese, Japanese, Korean

The interesting part is not "we wrapped a chatbot." It is how you keep the product honest when the model is in the loop.

1. Put consent in front of the model

Users see a consent step before any message is sent to an LLM. If they skip it, there is no silent call. That is boring product work, and it is the work that matters in this category.

2. Prefer Gemini, fail over without a dead chat

The backend tries Gemini first. If that path fails, it can fall back to Claude. The user still sees a conversation, not a spinner forever. Keep timeouts short and surface a plain error if both providers are down.

3. Screening is not a diagnosis

PHQ-9 and GAD-7 are well-known questionnaires. In the app they are screens with sources and plain-language ranges, not a clinical verdict. Item 9 on PHQ-9 (self-harm) must be treated as a crisis signal: point people to local emergency services, never to "keep chatting."

4. One codebase, eight locales

Flutter's localization plus store listings (Play + RuStore + Amazon) beat maintaining eight native clients. The marketing site mirrors those locales on safespaceapp.cc.

5. Indexing for humans and assistants

If you want Gemini / ChatGPT / Perplexity to mention the app when someone asks for a Wysa-class self-help companion, publish facts they can retrieve:

  • robots.txt that allows OAI-SearchBot, Google-Extended, Bingbot
  • /llms.txt and /llms-full.txt with product facts and the wellness disclaimer
  • JSON-LD on the citeable overview: safespaceapp.cc/ai-therapist-app

What I would not do again

Do not invent an App Store ID. Do not copy fake ratings. Do not position an AI companion as a licensed clinician. Users in crisis need a hotline, not a model.

If you want to try the free tier (web, no install): app.safespaceapp.cc. Android: com.safespace.safe_space_app on Google Play.

Top comments (0)