Home / Work / Nimisha
PLATFORM BUILD · SHIPPED & LIVE

A SaaS with no server
doing the work.

Nimisha is a consumer SaaS product whose entire computational core — an astronomical ephemeris plus 72 hand-coded scoring engines — was written in C, compiled to WebAssembly, and shipped into the user's browser. The server holds accounts and brokers a language model. It never sees the private data it would normally need to compute on, and it never runs the computation. Marginal compute cost per user: zero.

Type
Product build — concept to live SaaS
Domain
Consumer SaaS · scientific computing
Kernel
C → WebAssembly (Emscripten)
Edge
Edge worker + edge database
Live at
nimisha.app · geo.xo.rs
Status
Shipped, in active development
72
Hand-coded scoring engines
374KB
Gzipped WASM kernel
$0
Server compute per query
0
Private records leaving device
/ 01
The Problem

The product needed to answer a computationally expensive question — score every tracked activity, at every moment in time, for any location on Earth, personalised to an individual profile — and it needed to do that continuously and interactively as the user scrubbed across hours, days and months.

Done conventionally, that is a server-side compute bill that scales linearly with engagement. Every scrub of a timeline is a burst of requests. The more people use the product, and the more they enjoy using it, the faster it loses money. That is a structurally broken unit economic for a consumer product with a free tier.

There was a second, harder constraint. The input to every calculation is intensely personal data. Sending it to a server to be computed on — and, worse, into a third-party language model for interpretation — creates a privacy liability that no amount of policy text resolves. The honest answer is not to hold the data at all.

/ 02
The Approach

We inverted the standard SaaS topology. Instead of a thin client calling a fat server, Nimisha ships a fat kernel to a thin server's client.

The computational core is written in C — the Swiss Ephemeris for astronomical positions, statically linked, plus roughly 12,000 lines of rule engines and 72 separate activity-scoring engines. That whole body of code is compiled with Emscripten into a single WebAssembly module of about 374 KB gzipped, downloaded once, cached by a service worker, and executed entirely inside the user's browser tab.

The Cloudflare Worker that remains does only what a client genuinely cannot: it authenticates users via Google ID tokens, holds subscription state in D1 at the edge, and proxies calls to a language model. Crucially, the model is never asked to calculate anything — the kernel computes the numbers locally, and only the derived, non-identifying findings are sent up for the model to phrase in natural language.

That division — the kernel computes, the model interprets — is enforced as an architectural rule, not a convention. It is what makes the privacy claim true and the cost claim durable at the same time.

/ 03
The Hard Parts
  1. Getting a scientific C library into a browser tab The Swiss Ephemeris is a decades-old C codebase that expects a filesystem, real doubles, and a desktop's memory model. Making it run correctly under Emscripten meant solving data-file packaging, heap sizing, and numeric consistency between the native build and the WASM build — because a result that differs between the two is a result nobody can trust.
  2. Keeping a 374 KB payload honest 72 scoring engines plus a full ephemeris is a lot of code. Every kilobyte shipped is a kilobyte of first-load latency. The kernel is aggressively size-optimised and service-worker cached so the cost is paid once per device, not once per session.
  3. Verifying correctness against external oracles Accuracy is the whole product. Kernel output is checked against an independent reference implementation for raw numeric parity, against published almanacs for derived boundary times, and against a corpus of hand-verified reference cases. Where a value genuinely cannot be computed — polar latitudes where sunrise is undefined — the system says so explicitly rather than silently substituting an approximation.
  4. Running a language model on a free tier, reliably A consumer free tier can't absorb per-token costs. Model access is pooled behind a circuit breaker with caching on the stable portion of the context, so a rate limit on one path moves traffic elsewhere without the user ever seeing a failure.
  5. Designing for a client that may be offline or asleep The roadmap includes proactively notifying a user when a favourable window opens — which means nothing in the kernel or scoring API may assume someone is actively looking at a screen. That constraint was designed in from the start rather than retrofitted.
/ 04
The Outcome

Nimisha runs live at nimisha.app on Cloudflare's free tier. Scrubbing the timeline triggers no network requests at all — the computation happens locally, at native-adjacent speed, with no round trip.

The economics invert with it: engagement no longer drives marginal cost. A user who spends an hour exploring costs the same as one who bounces. That is what makes a genuinely free tier possible without a burn rate behind it.

And the privacy promise is architectural rather than contractual. Private profile data is held in the browser and computed on in the browser. There is no server-side store to breach, subpoena, or leak — the property holds because of where the code runs, not because of what a policy page says.

Architecture — where the work actually happens
USER'S BROWSER — PRIVATE React SPA · timeline · chat UI Zustand · service-worker cached WASM KERNEL — 374 KB gz Swiss Ephemeris (C, static) 72 activity engines · ~12k LOC rules executes locally — no round trip Private profile data never transmitted for computation ▸ scrub timeline = 0 network requests derived findings only (no identifying data) CLOUDFLARE EDGE Worker (Hono) JWT · Google OAuth · CORS D1 (SQLite at edge) accounts · usage · subscriptions LLM broker pooled access · circuit breaker prompt caching · interprets only never calculates ▸ compute cost per query: $0
The unusual part is the dashed green boundary. Everything expensive and everything private
sits on the left — inside the tab, on the user's own hardware.
Stack C → WebAssembly Emscripten Swiss Ephemeris Rust-grade numeric verification React 19 Vite Tailwind v4 Zustand Cloudflare Workers Hono Cloudflare D1 Cloudflare Pages Service Workers Google OAuth / JWT Gemini API Flutter (mobile port)

The cheapest server to operate
is the one you never call.

HAVE A COST OR PRIVACY WALL?

If your unit economics break as usage grows,
the architecture is the problem — not the pricing.

Contact Us →