Problem

According to the CDC, approximately 60 million Americans experience a mental illness each year. Conditions such as anxiety and depression not only reduce quality of life but also increase the risk of substance abuse and suicide, which remains one of the leading causes of death in the United States. In the years following COVID-19, social isolation and societal uncertainty have exacerbated these challenges. In the same period, online activity has risen sharply, often amplifying loneliness and emotional distress. This digital behavior, however, presents an opportunity: what if the same signals that reflect psychological strain can be used to detect early warning signs and deliver timely, personalized support? MeBoard explores this opportunity through an iOS application with a custom keyboard that passively captures linguistic patterns, helping users understand their mental state and take proactive steps toward improved well-being. MeBoard is composed of three main moving parts, as defined below:

Swift Mobile Application

The Swift application had three main features: a custom iOS keyboard, a dashboard, and a journaling/conversational space.

The MeBoard keyboard is a custom iOS keyboard extension that runs in place of the default keyboard across all applications. As the user types, text is buffered locally and sent to a Supabase backend every two minutes. If the user is still actively typing when the interval hits, it waits for them to pause before transmitting to avoid sending incomplete thoughts. This text data will later be used for data aggregation, text classification, and our chatbot.

The second core component of the application is the dashboard, which aggregates mental health data over time by querying Supabase. At the top of the dashboard, the day's keyboard text entries are sent to Claude Sonnet 4 via a Supabase Edge Function, which generates a personalized, empathetic message based on the themes and tone of what the user has typed that day. The third core component is the journaling feature, which gives users a space to reflect on their thoughts in their own words. After saving an entry, the application sends the journal content to Claude Sonnet 4, which generates a personalized follow-up question specific to what the user wrote. If the user chooses to engage, a conversation is opened where Claude acts as a warm, non-clinical companion, maintaining full conversation history across messages so the dialogue feels continuous rather than fragmented. Previous conversations are stored in Supabase and can be revisited from the journal detail view at any time.

Classification Models

We fine-tuned two DeBERTaV3 transformer-based classification models on an A100 GPU. The first model was trained on 20,000 datapoints evenly split between benign text and mental health-related text collected from Reddit. The mental health class comprised 2,000 samples from each of five categories: anxiety, depression, suicidal ideation, loneliness, and general mental health. This model achieved 91.2% accuracy in distinguishing mental health-related text from benign text. The second model was trained on 30,000 datapoints split evenly between suicidal ideation and other mental health conditions from the same categories. This model achieved 81.4% accuracy in identifying suicidal ideation specifically. Both models were hosted on Hugging Face for inference and are called by a worker running on a local server each time new keyboard input is received.

Supabase

The backend is built on Supabase, which provides a managed PostgreSQL database and serverless Edge Functions. The database stores keyboard events as they arrive from the local inference worker, with each row containing the original text, timestamps, device identifiers, and prediction results from both classification models, including labels, confidence scores, and model versions. Separate tables handle journal entries, conversation histories, and individual chat messages, allowing the app to persist and retrieve full reflection sessions. Supabase Edge Functions handle all communication with the Claude API, processing actions like generating personalized dashboard messages from the day's keyboard data, creating journal prompts, and managing multi-turn conversations. All client-server communication is authenticated through Supabase's API key system over HTTPS.

What's next for MeBoard

MeBoard tracks your mental health passively through everyday typing, but its real potential lies in connecting that data to the people who can help. By introducing designated provider profiles, therapists, healthcare providers, and caretakers could receive data-driven insights about their patient or loved one's mental well-being, giving them a clearer picture of what's happening between sessions and what steps might help the most. Beyond provider profiles, MeBoard could introduce real-time push notifications during crisis moments so users aren't relying on opening the app to receive support, along with the option to choose trusted contacts who would be automatically alerted when concerning patterns are detected. On the clinical side, recurring themes from journal conversations could be surfaced to providers as high-level insights without exposing raw text, keeping the user in control of their privacy through granular sharing settings. Furthermore, over time, as enough data is collected, MeBoard could establish personalized baselines for each user and flag meaningful deviations rather than relying on fixed thresholds alone, becoming a truly adaptive mental health companion.

Built With

Share this project:

Updates