Skip to content

A simple tool to help Moroccan HR managers navigate disciplinary procedures correctly

Notifications You must be signed in to change notification settings

ELABDELLAOUI-ismail/hr-decision-helper

Repository files navigation

HR Decision Helper

A simple tool to help Moroccan HR managers navigate disciplinary procedures correctly.

Why This Exists

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.

Features

  • 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

Tech Stack

Next.js 14 (App Router) · TypeScript · Tailwind CSS · Zustand

Quick Start

git clone https://github.com/your-username/hr-decision-helper.git
cd hr-decision-helper
npm install
npm run dev

Open http://localhost:3000 in your browser.

Project Structure

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

How It Works

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.

Screenshots

Coming soon — add screenshots of the landing page, decision flow, and recommendation screen.

What I Learned

  • 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

Author

Built by Ismail El Abdellaoui — Full-Stack Developer with HR domain expertise.

About

A simple tool to help Moroccan HR managers navigate disciplinary procedures correctly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published