Weigh is a simple web app designed to help users decide between two or more options—like job offers or life choices—by comparing ratings on seven standardized questions. Source: dev.to.
How the App Works Without a Backend
The app operates entirely in the browser. It stores no data on servers or accounts. All decisions live in the user’s browser via localStorage.
When a user completes a decision, they can tap ‘Ask a friend.’ The app generates a link containing the decision title and option names, but not their personal ratings.
When a friend opens this link, they answer the same seven questions anonymously. After completing their ratings, the app gives them a second link that contains their answers.
The friend then shares this second link with the original user. When the original user opens it, the app displays a side-by-side comparison: whether the winner matches, and which question caused the most disagreement.
Encoding Data into URLs
To keep links short and functional, the app encodes data into URLs using a three-step process:
- Converts JavaScript objects to JSON.
- Encodes the JSON as UTF-8 bytes and then base64.
- URL-encodes the resulting string to make it safe for web links.
The use of TextEncoder is critical. It supports all Unicode characters, allowing option names in any language—such as Arabic, Mandarin, or Swahili—to be included without errors.
Early versions of the app included the full text of all seven questions in the link. This made links long and unappealing, especially on messaging apps like WhatsApp.
The fix was to send only what the receiver cannot reconstruct. The questions are stored as fixed templates in the app. A link now carries only a templateId and the decision title and option names.
When the friend submits their answers, the app checks if the current browser already holds a decision with matching option IDs. If yes, the user is the original decision-maker and sees a comparison. If not, the friend sees only their own result.
Scoring and Decision Logic
Each option is scored using a weighted average on a 1–5 scale. The weights are pre-defined and publicly available.
If two options tie exactly, the one that wins on the highest-weighted question is chosen. This uses the user’s own priorities, not a random selection.

The scoring formula is:
const raw = decision.criteria.reduce((sum, c) => sum + (option.answers[c.id] ?? 1) * c.weight, 0);
const score = raw / totalWeight;
This ensures transparency. Users can see exactly why one option won over another.
SEO and User Experience
As a single-page application (SPA), Weigh is invisible to search engine crawlers. To improve discoverability, the app generates static guide pages at build time.
These pages cover common decisions—like choosing between job offers—using real examples. The scoring logic matches the app’s actual code.
Each guide includes a button that pre-fills the app with an example decision, making it easy for users to try the tool immediately.
The home page includes a small static block that React replaces on load. This helps with initial rendering without requiring server-side rendering.
Why No Artificial Intelligence?
The app avoids AI entirely. A chatbot could generate confident advice from minimal input. Weigh instead relies on honest, self-reported ratings.
Users see the actual reasoning behind a decision. The questions are inspired by Schwartz’s research on human values and regret minimization—principles that help reduce post-decision regret.
The weights are defaults. The creator is transparent about this and welcomes feedback on which questions feel out of place.
Users can try the app at https://weigh-pwa.web.app/?ref=devto.
The creator invites feedback on two points: whether the result matches their gut feeling, and which of the seven questions feels irrelevant to their situation.
Sources & further reading
Featured image: original publisher image. Via original publisher. Image source
