Sakinah: An Emotional Wellness and Guidance App
Description
Sakinah is an AI-powered Islamic emotional wellness app that connects users' feelings to personalized Seerah-based guidance using Retrieval-Augmented Generation, habit tracking, community reflection, and crisis detection.
Objectives
The objective of Sakinah is to develop a cross-platform AI-powered mobile application that helps Muslim users navigate emotional struggles through personalized, faith-grounded guidance. The system detects the user's emotion via facial CNN (HSEmotion) and text classification (RoBERTa), then uses a Retrieval-Augmented Generation pipeline to find the most semantically relevant Seerah story from a curated corpus indexed in MongoDB Atlas Vector Search. This story is passed to Groq's LLaMA 3.3-70b model, which generates a personalized response including a Seerah connection, lessons, practical advice, a dua, and follow-up questions all grounded in the story to prevent hallucination. Beyond guidance, the app aims to promote long-term behavioral change through a habit tracker that converts AI advice into daily practices with streaks and reminders. A crisis detection layer scans journal entries for self-harm keywords before the AI pipeline runs, surfacing Pakistani mental health helplines when needed. Additional objectives include a community space for faith-based reflection and an admin panel for managing the Seerah story corpus.
Socio-economic benefit
Sakinah fills a critical gap in the wellness landscape by providing culturally and spiritually relevant emotional support for Muslim users something generic mental health apps fail to offer. It is accessible on any Android device with minimal requirements, making it available to students, working professionals, and users who cannot afford professional counseling. The built-in crisis detection system provides a safety net for vulnerable users by immediately surfacing verified Pakistani mental health helplines (Umang, Rozan) when distress signals are detected in journal entries. From an economic perspective, Sakinah's stateless backend architecture allows cost-effective horizontal scaling from hundreds to thousands of users. It demonstrates that high-quality, AI-powered wellness tools can be developed domestically at university level using open-source and affordable technologies, reducing dependence on expensive foreign platforms. The habit module further drives long-term value by encouraging sustainable behavioral change rather than one-time advice consumption.
Methodologies
Sakinah is built on a Retrieval-Augmented Generation (RAG) architecture. Seerah stories are chunked and embedded into 384-dimensional vectors using the paraphrase-multilingual-MiniLM-L12-v2 sentence transformer, then stored in MongoDB Atlas with a vector search index. At query time, the user's journal entry and emotion are embedded identically and matched against the corpus using cosine similarity, with a 0.35 threshold filtering low-quality matches. Emotion detection uses a multi-modal fusion approach combining HSEmotion CNN for facial expression analysis (8 AffectNet emotions) and RoBERTa for text-based classification, merged through a confidence-weighted fusion module that maps results to a custom 15-emotion Sakinah taxonomy. If facial confidence falls below 0.65, a vision LLM is invoked as a fallback. The system follows a clean separation of concerns Flutter handles UI, Firebase manages personal data, and a stateless FastAPI backend handles all AI logic. All 14 functional requirements were verified through a structured test plan with a full Requirement Traceability Matrix.
Outcome
Sakinah delivers a fully functional Android application with a working RAG pipeline that returns personalized Seerah-based guidance within 2–5 seconds. The multi-modal emotion detection system, custom 15-emotion Islamic taxonomy, and confidence-gated LLM fallback work together to provide accurate and meaningful emotional classification. The habit tracker successfully converts AI advice into trackable daily practices with streaks, reminders, and a feedback loop that influences future story recommendations. Additional delivered features include a two-tier crisis detection safety layer with Pakistani helpline integration, a Firestore transaction-safe community feed, a role-based admin panel with bulk Excel upload and automatic vector re-indexing, Firebase-based full authentication, and timezone-aware local notifications. The project proves that culturally relevant, AI-powered wellness tools can be successfully developed at an academic level, offering a meaningful and accessible alternative to generic mental health platforms for Muslim users.
Gallery
More from Computer Science
Ustad Go: An AI-Powered Mobile and Web Ecosystem for Verified Local Service Provision in P…
Ustad Go is a dual-platform solution bridging the gap between skilled local service providers and households.…
Supervisor: Dr. Wasif Nisar
Sales Distribution Hub
The Sales Distribution Hub is a web-based management system designed for Masood & Company to automate and stre…
Supervisor: Dr. Wasif Nisar.
AI Based Road Damage Detection System
AI Based Road Damage Detection System is a smart application that uses YOLOv8 and computer vision techniques t…
Supervisor: Mehwish Mukhtar
EvaluTech: AI-Powered Hiring & Job Platform for Employers and Applicants
EvaluTech is an intelligent recruitment management platform that streamlines the complete hiring lifecycle fro…
Supervisor: Dr. Wasif Nisar