A simple tool to help Moroccan HR managers navigate disciplinary procedures correctly.
HR managers in small Moroccan companies often make costly mistakes during disciplinary procedures:
- Firing without the mandatory hearing (audition) — automatic "abusive dismissal" ruling
- Wrong sanction order — procedure invalidated by labor courts
- Missing the 8-day legal deadline — sanction becomes unenforceable
This tool guides them step-by-step through the decision process, referencing the relevant articles of the Code du Travail at each stage.
- Interactive decision tree covering minor faults, serious faults, and gross misconduct
- Legal references (Code du Travail) displayed at each recommendation
- Step-by-step action checklists with warnings for common pitfalls
- Mobile-friendly — works on any device
- No data collection — runs 100% client-side with localStorage
Next.js 14 (App Router) · TypeScript · Tailwind CSS · Zustand
git clone https://github.com/your-username/hr-decision-helper.git
cd hr-decision-helper
npm install
npm run devOpen http://localhost:3000 in your browser.
src/
├── app/ # Next.js pages (landing, procedure, result)
├── components/ # DecisionCard, RecommendationCard, ProgressBar, etc.
├── data/decision-tree.ts # All questions and recommendation logic
├── hooks/ # useDecisionFlow — navigation logic
├── store/ # Zustand store with localStorage persistence
└── types/ # TypeScript interfaces
The app models Moroccan labor law disciplinary procedures as a decision tree. Each node is either a question (with multiple-choice options) or a recommendation (with an action plan, legal reference, and warnings).
The user answers questions about the situation — nature of the fault, prior sanctions, intent to keep or dismiss — and the app guides them to the correct legal procedure.
Coming soon — add screenshots of the landing page, decision flow, and recommendation screen.
- Modeling legal procedures as navigable decision trees with back-tracking support
- State management for wizard-style flows using Zustand with persistence
- Designing domain-specific UIs that prioritize clarity over decoration
Built by Ismail El Abdellaoui — Full-Stack Developer with HR domain expertise.