Nidal Alrouh

Mental health support platform for Moroccans - Open source, non-profit. Built with React and scalable full stack architecture.

2023-01-01

full-stackOpen GitHub
Nidal Alrouh

Nidal Alrouh — نضال الروح

"The Soul's Struggle" — an open-source, non-profit mental health support platform built for the Moroccan and broader MENA community. It connects people seeking emotional support with trained volunteer helpers in a safe, anonymous, and culturally aware environment.

No ads. No fees. No monetization of user data. Just people helping people.

Why it exists

Mental health support in Morocco and the Arab world faces two real barriers: cultural stigma and a lack of culturally-sensitive resources. Most available platforms are built for Western audiences, in English, with no understanding of the social dynamics or languages of the people they're trying to reach.

Nidal Alrouh is built differently. Arabic with full RTL layout, French, and English. Peer support rather than clinical framing. Anonymous by default. Community-driven from day one.

Two sides of the platform

For seekers — people looking for support:

  • Browse verified volunteer helpers filtered by specialization, language, and availability
  • Schedule sessions through a Cal.com integration
  • Encrypted real-time chat with helpers
  • Private journal with mood tracking and guided reflection prompts
  • Curated resource library (articles, videos, educational content)
  • Community forum for anonymous shared experiences
  • Workshops, webinars, and peer support group events

For helpers — volunteer supporters:

  • Guided onboarding with training guidelines
  • Cal.com scheduling for managing availability
  • Dashboard with session history, ratings, and feedback
  • Full session lifecycle management with notes

Stack

Frontend

TechRole
Next.js 15 + React 19App framework with App Router
TypeScriptType safety throughout
Tailwind CSS + Radix UIStyling and accessible components
React QueryServer state management
React Hook Form + ZodForms and validation
Socket.io ClientReal-time chat
TiptapRich text editor for journal
RechartsDashboard analytics
Cal.com EmbedSession scheduling widget
next-intlFull i18n (Arabic RTL, French, English)

Backend

TechRole
NestJS + FastifyHigh-performance API server
Prisma + PostgreSQLType-safe ORM and relational database
Socket.ioWebSocket server for real-time chat
Passport.jsAuthentication strategies
Argon2Password hashing
ZodRuntime validation on all endpoints
PinoStructured logging

DevOps

Yarn Workspaces monorepo with apps/frontend and apps/backend under one roof. Docker Compose for local PostgreSQL. Deployed on Railway.

Security

This platform handles sensitive mental health data, so security was designed in from the start:

  • Argon2 password hashing
  • JWT with refresh token rotation — sessions tracked in the database with IP and user agent
  • Encrypted messages at rest
  • Rate limiting at three tiers: 3 req/s, 20 req/10s, 100 req/15min
  • Helmet for HTTP security headers (CSP, HSTS, X-Frame-Options, CORS)
  • Input validation via Zod schemas on every endpoint
  • Content moderation with profanity filters and post reporting

Internationalization

Full support for three languages with dedicated translation files and proper RTL layout for Arabic:

LanguageCodeDirection
EnglishenLTR
FrenchfrLTR
ArabicarRTL

Architecture

nidal-alrouh/
├── apps/
│   ├── frontend/          Next.js 15, i18n, real-time UI
│   └── backend/           NestJS, Prisma, Socket.io, auth
├── docker-compose.yml     Local PostgreSQL + pgAdmin
└── package.json           Yarn workspaces root

The backend is organized into feature modules: auth, users, helpers, sessions, chat, journal, resources, and community. Each module owns its own routes, service layer, and Prisma queries.

Roadmap

  • Mobile app in React Native
  • AI-powered crisis detection
  • Video call support sessions
  • Professional therapist marketplace
  • Multi-region deployment for other MENA countries

SCREENSHOTS // 20 FRAMES

Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5
Screenshot 6
Screenshot 7
Screenshot 8
Screenshot 9
Screenshot 10
Screenshot 11
Screenshot 12
Screenshot 13
Screenshot 14
Screenshot 15
Screenshot 16
Screenshot 17
Screenshot 18
Screenshot 19
Screenshot 20
01 / 20