Inspiration
Research shows that nearly half of all suicide attempt survivors made their decision in less than 10 minutes before acting (Deisenhammer et al., 2008), and 24% deliberated for under 5 minutes (Simon et al., 2001). Meanwhile, the average wait time for a crisis chat response is 45.5 minutes, and even hotline calls average 3.1 minutes — assuming the person is willing and able to call at all. Up to two thirds of people who die by suicide never contact mental health services in the year before their death (Stene-Larsen & Reneflot, 2019).
These numbers revealed a critical gap: the crisis window is measured in minutes, but help arrives in tens of minutes to hours. We also learned from interviewing a psychology professional that people in this situation need a friend — not just a system, but a real human connection. In Indonesia specifically, only 9% of people with depression receive evidence-based treatment (Riskesdas, Kemenkes 2018), and the psychiatrist-to-population ratio is just 0.058 per 10,000 — far below the WHO recommendation of 1 per 10,000.
Selfty was born from a simple question: what if the intervention was already in the person's hands before the crisis began, rather than something they had to seek out, dial, and wait for during it?
What it does
Selfty is an IoT-connected web application designed to intervene during the critical window between suicidal ideation and action. It works on two levels:
Immediate crisis intervention: A physical button (ESP32 with BLE) connects to the user's phone via Web Bluetooth. A double-press instantly triggers two things in parallel — a grounding techniques screen appears immediately (fully offline, zero network delay) to guide the user through breathing exercises and the 3-3-3 sensory grounding method, while the system simultaneously alerts their personal companion via voice call and SMS through Twilio's API. If the companion doesn't respond, the system escalates to a shared support team. If no trusted contact was provided during sign-up, it defaults to the Indonesian national mental health hotline (119 ext. 8).
Daily check-in and monitoring: Users complete a daily self-assessment based on the Columbia-Suicide Severity Rating Scale (C-SSRS) Self-Report, a clinically validated instrument that categorizes risk through item-pattern logic rather than a simple score. Each check-in is followed by a journaling session, and results are stored securely in a database. The assessment outcome determines the type of intervention — from gentle grounding exercises for low-risk responses, to prompting contact with their care team for moderate risk, to immediate companion notification for high-risk results using the same pathway as the physical button.
The system is designed to accompany individuals already under treatment, providing a bridge between clinical sessions — not a replacement for professional care.
How we built it
Hardware layer: An ESP32 microcontroller with a physical push button, programmed through Arduino IDE. The firmware handles interrupt-driven double-press detection with debounce filtering, and exposes a custom BLE GATT service that notifies paired devices on trigger.
Frontend: A Progressive Web App (PWA) served over HTTPS, using the Web Bluetooth API to pair with the button. The grounding content is bundled locally and cached via a service worker so it renders instantly — even in airplane mode. The app uses the Wake Lock API to keep the screen active during a crisis, and supports installation to the home screen for quick access.
Backend: A FastAPI (Python) server handling user authentication (bcrypt password hashing, JWT session tokens), the C-SSRS assessment engine, journal storage, and the companion notification pipeline. User data is stored in SQLite via SQLAlchemy. The assessment scoring engine reads question definitions and stage thresholds from a configuration file — all clinical content comes from the psychologist's input, not from us.
Communication: The emergency communication system is powered by Twilio, integration-ready with phone numbers to contact answer.
Challenges we ran into
Regulatory compliance for phone numbers: Buying a phone number through any provider requires regulatory bundles — identity verification documents reviewed by the provider. This process took days and added unexpected friction to what we assumed would be a quick setup step.
Clinical responsibility: Building a system that categorizes suicide risk forced us to confront a hard question: how do you automate something this sensitive without causing harm? Our answer was to not invent any clinical logic ourselves — we use the C-SSRS, a validated instrument, configured exactly as our psychologist specified, and every path leads to a human, never to the software making the final call alone.
Environment variable and deployment issues: Configuring the server across different development environments (Windows PowerShell, Python path issues, .env loading) consumed more debugging time than anticipated, especially for team members less familiar with backend deployment.
Accomplishments that we're proud of
- The grounding screen renders in under a second from button press, fully offline — no network dependency for the most time-critical part of the system.
- Every risk level, including the lowest, routes to a human. Our psychologist emphasized that these individuals need a friend, and we built the system around that insight rather than treating low-risk as "no action needed."
- The assessment engine is entirely config-driven — changing the instrument, adjusting thresholds, or updating intervention content requires editing a JSON file, not rewriting code. This means our psychologist can iterate on the clinical side without needing a developer.
- We successfully integrated a physical IoT device (ESP32) with a web application through Web Bluetooth
- The system is grounded in peer-reviewed research at every design decision, from the C-SSRS instrument selection to the "companion first, shared team as backup" escalation model.
What we learned
- The crisis window is real and terrifyingly short. The research showing that 48% of attempts happen within 10 minutes of the decision fundamentally shaped every technical choice — offline-first, instant UI, pre-paired devices. Speed isn't a feature; it's the entire point.
- Clinical tools exist and should be used. Our instinct was to design our own assessment questions. Learning about validated instruments like the C-SSRS — and understanding why reinventing them is genuinely dangerous — was one of the most important lessons of the project.
- Mental health technology demands humility. We are not clinicians. Every design decision that touches clinical judgment was reviewed with our psychologist, and the system is deliberately built so that software never makes a risk determination alone.
What's next for Selfty
- Native mobile wrapper: Replace the PWA's Web Bluetooth limitation with a lightweight native app (or WebView shell with a background BLE service) so the button connection persists even when the screen is locked.
- Companion-side app: Build a dedicated interface for the trusted companion — showing the user's check-in history (with consent), providing guidance on how to respond to different alert levels, and confirming receipt of alerts back to the user's grounding screen in real time.
- WhatsApp integration: Many Indonesians are more reachable via WhatsApp than voice calls or SMS.
- Clinical pilot: Partner with a mental health clinic or university counseling center to run a supervised pilot with real patients under professional oversight — the necessary step before this moves beyond a prototype.
Big thanks to...
To Mr Valtrizt, Mr Felix, as our mentors, who have helped tremendously with ideation and the technical aspects of the implementation. To Ms Ignatia Ria Natalia as the pyschologist who willingly gave her time to be interviewed.

Log in or sign up for Devpost to join the conversation.