Completed

QARAR | قرار

A bilingual web app for decision intelligence and project risk: weighted option comparison, a risk register, assumptions and dependencies, scenario stress tests, and an executive report, with user accounts, role-based sharing, and a review by Claude.

The problem

Project decisions are often made from slide decks and impressions, without a structured comparison of options or a clear record of risks and assumptions. Later, it is hard to tell why an option was chosen or how well it holds up when circumstances change.

The solution

A workspace that takes the decision owner from the question to a recommendation: define options, criteria, and weights; record risks and assumptions; and test each option against scenarios such as cost increases or delays, with every number showing how it was calculated.

Verified outcomes

  • Live on techcore.com.sa, with clearly labeled illustrative samples.
  • 14 unit tests for the calculation engine, 8 API tests (accounts, permissions, sharing, and Claude limits), and 91 end-to-end interface checks in both languages on mobile and desktop, all passing.

How it works

QARAR answers five questions: What decision do I need to make? What options are available? What risks, dependencies, and assumptions could affect the outcome? What happens if circumstances change? What evidence supports the recommended option?

Design principles

  • Every number is traceable: weighted score = Σ(weight × score) ÷ Σ(weight × 5) × 100, and risk score = probability × impact.
  • No recommendation without justification: none is shown when scores are missing, results are too close, or the leading option has open critical risks.
  • AI as a second opinion: QARAR's engine always calculates the numbers; Claude's review appears separately, names the model, and asks you to verify it.
  • Honest limits: scenario results are arithmetic on the user's assumptions, not statistical forecasts.

Architecture

  • A dependency-free JavaScript (ES modules) interface, with a separate calculation engine that is tested on its own.
  • A server on Cloudflare Pages Functions with a Cloudflare D1 database.
  • Passwords are stored as salted PBKDF2 hashes, sessions use HttpOnly cookies, sign-in attempts are rate limited, and cross-site requests are refused.
  • The Claude API key stays on the server and never reaches the browser, with daily limits per user and for the whole site.
  • Without signing in, the app runs entirely in the browser, and decisions can be copied to an account later.

Source code

The source code is available on GitHub in the qarar repository.

Key features

  • A weighted decision matrix that recalculates instantly and shows each criterion's contribution
  • A sensitivity check showing whether one weight change would change the leading option
  • A risk register with probability × impact scoring, a 5×5 matrix, and overdue alerts
  • Tracking of assumptions and dependencies with a verification status for each item
  • Stress tests with preset and custom scenarios, checked against success targets
  • User accounts with email and password; decisions saved to the account and available on any device
  • Sharing per decision with view-only or edit access, with protection against conflicting edits
  • An independent review by Claude through the server, with a daily limit, alongside transparent rule-based checks
  • A 15-section executive report you can print or save as PDF, in Arabic or English
  • A complete Arabic (RTL) and English (LTR) interface that also works without an account, in the browser

Screenshots

Dashboard with illustrative decisions
Dashboard with illustrative decisions
Weighted decision matrix with the calculation breakdown and weight sensitivity
Weighted decision matrix with the calculation breakdown and weight sensitivity
Decision stress test: baseline versus scenario
Decision stress test: baseline versus scenario