-
-
Privacy First Entry: A secure, judgment-free gateway The tagline "Find the Light" sets a hopeful tone, prioritizing user trust and anonymity
-
The Ecosystem: More than a chatbot. It centralizes 24/7 AI support, privacy controls, and human experts into a complete recovery suite.
-
Gamification: We track "Money Saved" Seeing 140€ saved motivates users more than just counting days. It replaces the dopamine hit.
-
Mood Journal: Users log daily emotions. The data helps spot patterns and triggers over time, turning feelings into actionable insights.
-
Expert Marketplace: Connects users to local psychologists. This ensures clinical safety and creates a sustainable business model.
-
Instant Booking: A full scheduling system. Users go from AI chat to a confirmed appointment with a local expert in just 3 clicks.
-
Native Darija: Gemini speaks street Moroccan using '7' and '3'. It validates feelings in the user's own dialect, building instant trust.
-
French Support: The AI uses CBT techniques to help. It validates feelings in native level French.
-
Global Scale: The therapeutic logic is universal. The AI switches to English instantly, proving the platform is ready for global users.
Inspiration
This project is personal for me.
My cousin fell into addiction, but it wasn't just the drugs that hurt him it was the silence. The shame "Hchouma" was so heavy that he felt he couldn't face his family anymore. So he just disappeared.
For two months, he was missing. He was living homeless on the streets of Tangier while his mother sat at home, terrified, not knowing if he was dead or alive. We were lucky we launched a campaign on social media, found him, and brought him home. He is recovering now.
But during those two months, I realized something scary: for every person like my cousin who gets found, there are thousands of young Moroccans hiding in their rooms or on the streets, too ashamed to say "I need help"
We built TAFSUT to be the thing my cousin needed before he ran away. A safe place where you can admit you're struggling without destroying your reputation.
What it does
TAFSUT is an AI recovery companion that lives in your browser. Think of it as the supportive friend who is always awake at 3 AM.
It Speaks Your Language (Literally): Most AI bots sound like a news anchor or a textbook. TAFSUT speaks "Street" Darija, French, and English. It understands that when a young Moroccan says "Darni rasi" (my head hurts), they might not mean a headache they might mean they are overwhelmed and close to relapsing.
Zero Judgment, Total Anonymity: We know that fear of exposure is the #1 reason people don't seek help. That's why TAFSUT requires no immediate sign-up. You can start talking, venting, and getting support instantly without handing over your identity.
Turning “Lost Money” into “Future Gains”: We replaced the standard “days sober” counter with something more tangible. Users input how much they used to spend daily on their addiction. From the moment they start their journey, TAFSUT calculates exactly how much money they have saved. It shifts the mindset from “I am depriving myself” to “I am getting richer every day.”
Crisis De-escalation: Using Gemini's reasoning capabilities, the app "reads the room." If it detects high-stress keywords or emotional spiraling, it shifts from "Chat Mode" to "Crisis Mode," immediately offering grounding exercises and emergency contacts to prevent a breakdown..
How we built it
1. The Architecture We adopted a Unified TypeScript approach to ensure consistency across the stack: The Core (Backend): Built with NestJS and Prisma ORM. It manages complex Role-Based Access Control (RBAC) to securely distinguish between Patients and Certified Coaches.
The Interface (Frontend): We utilized Next.js for a responsive, high-performance Web Dashboard.
2. The Brain: Context-Aware AI (Google Gemini) We used Gemini 3 Pro for its high reasoning capabilities and ability to handle complex context. We moved beyond generic prompting by enforcing Structured Output (JSON). This allows the app to parse user journals and visualize key metrics, like "Stress Levels," via dynamic gauges instead of just text.
Culturally Adaptive Persona: System Instructions were fine-tuned to speak local dialects (Darija) and French, acting as a supportive peer.
Safety Layer: A strict safety protocol prevents the AI from giving medical prescriptions and triggers an override if self-harm keywords are detected.
3. The Marketplace We built a custom booking engine: Hybrid Scheduling: Coaches can define slots for both Remote (Visio) and In-Person (Cabinet) sessions.
QR Code Validation: We implemented a secure verification logic. A patient generates an E-Ticket, which the coach scans physically to validate the session and trigger the automated payment release in the database.
4. Data & Deployment Database: PostgreSQL (via Neon) for relational data integrity.
Deployment: Decoupled architecture Vercel for the frontend, and a cloud container for the NestJS backend to handle persistent connections.
Challenges we ran into
The biggest challenge was Language Nuance . Moroccan Darija is a complex mix of Arabic, French, Spanish, and Berber. Early versions of the AI would respond in formal, "news anchor" Arabic, which felt fake and disconnected. It broke the trust immediately.
We had to work hard on the prompt engineering in AI Studio, feeding the model real examples of "street" conversations to get the tone right. Teaching an AI to understand the concept of “Hchouma” (cultural shame) was difficult, but essential.
And honestly, we aren't finished. We know the dialect isn't 100% perfect yet. Our ultimate vision is to truly "teach" the AI the depth of authentic Moroccan Darija through advanced fine-tuning, but that requires significant data, time, and money (tokens). We hope that this hackathon is the first step toward securing the resources we need to make that vision a reality.
Accomplishments that we're proud of
We’re proud to be the first to do this. Before TAFSUT, there was no AI tool designed specifically to support addiction recovery within the Moroccan context. We didn’t just translate English prompts into another language we built an entirely new kind of cultural logic, one that truly understands the context and fully respects user anonymity.
We’re also especially proud of our Financial Motivation engine. Teaching the AI to help users shift their mindset from guilt to possibility by focusing on future wealth and calculating the money they save proved that this isn’t just another chatbot. It’s a real psychological intervention, designed to create meaningful change.
What we learned
Honestly, we learned that with tools like Gemini, the coding itself is actually the fastest part. We built the app in a short time. The real breakthrough was realizing we could use Gemini to teach itself. Instead of writing the system instructions manually, we just described the "Moroccan Vibe" we wanted, and Gemini generated the perfect prompt to teach the API how to speak "Street Darija." We also found out that standard recovery features don't always work here. We pivoted from just tracking "days sober" to tracking "money saved" because we realized that for a lot of young people, seeing that cash pile up is a much stronger motivation than just a calendar streak. It shifts the vibe from "I'm sick" to "I'm building a future”
What's next for TAFSUT: The AI Companion for Addiction Recovery in MENA
We are currently applying for the Innov Idea grant in Morocco to secure our business runway, but our technical roadmap focuses on one thing: Language Perfection.
The “Fine-Tuning” Leap: “Vibe Coding” and prompt engineering got us to an amazing MVP. But to achieve 100% native fluency in Darija, we need to Fine-Tune the Gemini model on a custom dataset of Moroccan conversations. Winning this hackathon would provide the critical compute budget we need to cover those training costs.
Trust-First Growth: We aim to grow to 10,000 users strictly as an anonymous tool, proving that privacy builds trust.
The Hybrid Model: Once we hit critical mass, we will activate our network of 20+ psychologists, bridging the gap between AI support and human therapy.
We aren't just building a project for a weekend, we are building the digital infrastructure for mental health recovery in North Africa, expanding to 6 other Arab countries, and eventually going international. This prize money is the fuel for that engine.
Built With
- gemini
- gemini-api
- google-ai-studio
- google-gemini
- neon
- nestjs
- next.js
- node.js
- postgresql
- prisma
- react
- tailwindcss
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.