PRJ
7 Powers Assessment Tool
15 May 2026
15 May 2026 ·Design & build (personal project)
Next.js 15React 19TypeScriptSupabaseAnthropic APIDocker

Background

Hamilton Helmer’s 7 Powers argues that durable competitive advantage — a real moat — comes from one of seven specific sources: scale economies, network economies, counter-positioning, switching costs, branding, cornered resource, and process power. Each has a formal economic model behind it, what Helmer calls the Statistical Learning Model (SLM).

The framework is rigorous but trapped in a book. A founder honestly assessing their own idea either hand-waves (“we have network effects!”) or abandons the rigour entirely. I wanted to close that gap: run Helmer’s actual SLM math behind the scenes, but surface only plain-language, founder-friendly questions on top.

What I built

A web app that walks a founder through scoring an idea against all seven powers:

  1. Ideas workbench — create, compare, and manage ideas, each with a stage (origination / takeoff / stability), market size, growth rate, and revenue target.
  2. Seven guided wizards — one per power, each asking a handful of accessible questions (“how painful is it for a customer to switch away?”) and computing a live Strength of Leveraged Moat (SLM) score with a gauge and a checklist of which moat conditions are met.
  3. Stage-aware applicability — only the powers that matter for an idea’s stage are shown, so a pre-revenue idea and a mature business see different questions.
  4. Portfolio comparison — a radar per idea plus a quadrant that plots every idea by market size against its strongest single power.
  5. AI critique — Claude reviews the idea and its answers and returns a written critique of the moat, stored for later.
  6. Pilot logs — record real experiments (hypothesis, predicted vs actual) so the assessment becomes a living document rather than a one-off score.

The seven SLM calculators are pure, independently tested functions — 47 unit tests — and every plain-language-answer-to-number mapping lives in one central file, so the formulas can be tuned without touching the UI.

Outcome

The MVP is complete, tested, and live in production at sevenpowers.butenasg.uk (*Currently available only to selected people):

  • All seven wizards work end-to-end with live, in-browser SLM computation.
  • 47/47 tests pass; clean production build; zero TypeScript errors under strict mode.
  • Email/password and Google OAuth, with each new user auto-provisioned a personal organisation.
  • Runs in Docker behind a Cloudflare Tunnel — self-hosted rather than on a managed platform.

Stack rationale

Next.js 15 (App Router) + React 19 + strict TypeScript. Server Actions keep the SLM math, validation, and database writes server-side without a separate API layer, while the wizards still compute SLM live in the browser for instant feedback. Strict types caught a class of bugs around the seven calculators’ input shapes.

Tailwind CSS v4 + shadcn/ui. An ownable design system without a heavy component library — nearly every screen is built from a small set of shared “wizard primitives,” which kept the wizards and the new-idea form consistent with little duplicated code.

Supabase (Postgres + Auth + RLS). Database, authentication, and row-level security in one service, with clean SSR integration. A database trigger auto-creates a personal org per user, so the multi-tenant foundation exists from day one.

Zod validates every server-action input — the boundary between plain-language form data and the typed numbers the calculators expect. The Anthropic API (Claude Haiku) powers fast, inexpensive single-shot critiques.

Docker + Cloudflare Tunnel (not Vercel). Deliberately self-hosted on infrastructure already running other services, keeping hosting costs near zero. The one tradeoff — reverse-proxy OAuth redirects pointing at the public domain rather than the container — was a one-time fix.

The portfolio comparison screen: a quadrant chart plotting ideas by market TAM against maximum power, split by a 3× moat threshold into compounding winners, niche moats, race conditions, and kill candidates, with a sortable scoring table across all seven powers below.

The 7 Powers framework is from Hamilton Helmer’s book of the same name — the strategic thinking is his; the scoring quirks are mine.

← All projects