Urgent.News

What's breaking now, across thousands of outlets.

Tech

I almost unlocked Pro from a URL parameter. What I changed before launch.

I build a small SaaS called ClauseRadar ( https://clauseradar.online/?utm_source=devto&utm_medium=article&utm_campaign=paywall-lessons ). It reads contracts (freelance agreements, brand deals, job offers) and flags clauses like "payment within 90 days" or "contractor's liability is unlimited". I'm in India, I work alone, and I deploy from my phone using Termux. I build with an AI coding assistant…

Three mistakes the author made or nearly made when building a SaaS called ClauseRadar:

1. Paywall mistake: The author initially implemented a paywall using a URL parameter in Whop checkout. This approach was unsafe for four reasons: the secret could be shared, the check was in JavaScript, replaceState hid the URL from the address bar but not from history, analytics, or extensions, and there was no server-side confirmation of payment. The author changed this by granting Pro status through a secure webhook handler that verifies a signature and adds Pro days to the database.

2. CSS blur is not a paywall: The author originally used CSS blur to create a blurred preview for free users. However, this method is ineffective as anyone can remove the CSS rule. To fix this, the author now uses AES-256-GCM to seal locked parts before sending them to the client, and decrypts them only after checking the user's plan through an unlock endpoint.

3. Installer bug: The author's installer script had a bug that caused the app to display grey blocks, causing user frustration. To resolve this, the author read the mount target from the main.js file instead of using a regular expression, and made the loading state fail open by removing the skeleton and showing a static server-rendered page after six seconds if any errors occurred.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Every Big Outage This Week Started With a Change

Email went down for a day. Every departing flight in the US was held for over four hours. A big bank's transactions stalled for most of a Monday.

  • Several major outages this week began with a single change.
  • Microsoft 365 outage lasted a day due to a defect from a July fix.
  • FAA ground stop extended over four hours due to a router from a fiber upgrade.

The Importance of Documentation in Software Development

Documentation is sometimes treated as an optional part of software development. Developers often focus on implementation, features, and fixing bugs, leaving documentation until later.

  • Documentation often overlooked, developers focus on coding
  • Clear introduction and README vital for initial understanding
  • Up-to-date, navigable documentation enhances team collaboration

More from Tuesday 17 November →