Back to projects

Case Study

Mental Health Platform

A full-stack therapy platform built for the Ethiopian market — AI assessments, live video sessions, real-time chat, and local payment processing.

Stack

React · Django · PostgreSQL · CatBoost · WebRTC

Role

Solo developer

Status

Production ready

Payments

Chapa (ETB)

The Problem

Ethiopia has one of the highest mental health treatment gaps in the world. The combination of limited therapists, high costs, and deep social stigma means most people who need help never get it.

I wanted to build something that lowered every barrier at once — finding a therapist, booking a session, paying for it, and actually having the session — all in one place, designed for the Ethiopian context.

Why a Full Platform?

A chatbot alone wasn't enough. The real problem isn't just access to information — it's access to actual human therapists. The platform needed to connect real patients with real professionals, with AI playing a supporting role in assessment and triage, not replacing the therapist.

The AI component (CatBoost-based mental health assessment) helps patients understand their situation before booking, and helps therapists prioritize cases. It's a tool, not the product.

Key Technical Decisions

1. Django over Node.js for the backend. The ML model integration (CatBoost, XGBoost) is much cleaner in Python. Django REST Framework gave us a solid API layer without reinventing the wheel.

2. WebRTC for video sessions. Third-party video APIs are expensive and have data residency concerns. WebRTC keeps sessions peer-to-peer, reducing latency and cost.

3. Chapa for payments. Stripe doesn't work in Ethiopia. Chapa is the leading local payment gateway and supports ETB natively — this was a non-negotiable requirement.

4. WebSocket for real-time features. Chat and notifications needed to be instant. Polling would have been simpler but the UX difference matters when someone is in a mental health crisis.

5. Role-based architecture from day one. Patients, therapists, and admins have fundamentally different workflows. Building this in early prevented a lot of messy conditional logic later.

The AI Assessment

The mental health assessment uses a CatBoost classifier trained on anonymized assessment data. The model predicts risk levels across several dimensions and surfaces them to both the patient and their therapist.

The hardest part was handling overfitting — the training data was limited and imbalanced. I used SMOTE for oversampling minority classes and cross-validation to ensure the model generalized. The final model achieved acceptable performance on the validation set, but I'm cautious about overstating its clinical accuracy.

The assessment is a starting point, not a diagnosis. That framing is built into the UI.

What I'd Do Differently

The biggest gap is proper clinical validation. The AI model was built with available data, but it hasn't been reviewed by mental health professionals. In a production system, that review is mandatory before deployment.

I'd also invest more in the therapist onboarding experience. The current admin verification flow is functional but manual. Automating credential verification would make the platform more scalable.

On the technical side, the WebRTC implementation works but needs a proper TURN server setup for users behind strict NATs — something I'd prioritize before a real launch.