Nerd stuff

Magic 8-Ball

The server does nothing. That's the feature.

A toy, but a carefully built one: five moods, three languages, a ball drawn in CSS and SVG — and a sharing mechanism whose whole point is what it doesn't do.

React 19CSS keyframesSVGbase64url fragment codeclocalStorage (language only)zero dependencies

§Moods are data, not code

The five oracles — classic, gloomy, furious, happy pills and zen monk — are one data file: ten answers per mood per language, plus a window color and an aura. Adding a sixth mood is adding an object, not writing logic. The furious ball also shakes harder only in your imagination; the physics are shared, the personality is data.

§The window is geometry, not luck

The answer die is an SVG triangle inscribed in the window circle — corner points computed to sit inside the radius, so the circle never clips them. It points down (wide side up) so greedy line-wrapping naturally tapers the text with the shape, and long answers shrink in real pixels rather than being CSS-scaled, which keeps them sharp. Click the window and everything is recomputed at 1.77×, for the reading-glasses demographic.

§Sharing without a server

A shared verdict is just the question, answer and mood, JSON-encoded to base64url in the URL fragment. The fragment never leaves the browser — it isn't even sent in the HTTP request, so it can't reach server logs that don't exist anyway. No database, no IDs, no expiry to manage, no privacy policy update: the sender's link is the storage.

§Locked when shared

Opening a shared link shows the verdict with the mood chips disabled — the mood belongs to the verdict, not to the viewer. Corrupt fragments fail silently into a fresh ball; the codec validates the mood and caps the lengths, so the worst a mangled link can do is nothing.

§The flow

encodedecode0 bytesYouquestion + shake#fragmentb64url(q, a, mood)Friendreads the verdictOur serverdoes nothing

← Back to rm-worx.be

This website uses minimal technical storage (cookies and local storage) to ensure proper functioning and simple visit statistics. By continuing to browse, you agree to this. See our Cookie Policy and Privacy Policy.