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

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
| Tech | Role |
|---|---|
| Next.js 15 + React 19 | App framework with App Router |
| TypeScript | Type safety throughout |
| Tailwind CSS + Radix UI | Styling and accessible components |
| React Query | Server state management |
| React Hook Form + Zod | Forms and validation |
| Socket.io Client | Real-time chat |
| Tiptap | Rich text editor for journal |
| Recharts | Dashboard analytics |
| Cal.com Embed | Session scheduling widget |
| next-intl | Full i18n (Arabic RTL, French, English) |
Backend
| Tech | Role |
|---|---|
| NestJS + Fastify | High-performance API server |
| Prisma + PostgreSQL | Type-safe ORM and relational database |
| Socket.io | WebSocket server for real-time chat |
| Passport.js | Authentication strategies |
| Argon2 | Password hashing |
| Zod | Runtime validation on all endpoints |
| Pino | Structured 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:
| Language | Code | Direction |
|---|---|---|
| English | en | LTR |
| French | fr | LTR |
| Arabic | ar | RTL |
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



















