magma-calculator is a simple calculator delivered as a single-page design. The product intent is narrow and explicit: give a person a single page on which they can perform everyday arithmetic — entering numbers and operators, seeing the computed result, and clearing the entry to start again — without any surrounding application, navigation, or account machinery.
The audience is anyone doing quick arithmetic: students, desk workers, and people on phones. The design must remain simple, and the calculator must live on exactly one page.
magma-calculator is a browser-delivered, single-page calculator. It has one page, Calculator, which is the anonymous public entry surface. There is no sign-in, no navigation, no secondary destination, and no persisted user data.
Actors
Accepted behavior
Ownership and access
Exclusions
Removed from scope
The requester asked for a simple single-page calculator design. That is the whole current product: one page, one interaction loop, no surrounding application.
Delivery ownership. The calculator is first-party custom UI rendered by the React frontend. The page is public and anonymous — a visitor opens it and immediately has a working calculator. Nothing about the accepted behavior requires the visitor to identify themselves, and no accepted behavior produces state that must survive a reload or belong to a particular person, so no identity establishment, verification, or account surface is introduced.
Current versus future. Everything in this document is current. There is no accepted future horizon, and no future capability is described or promised here.
Backend and database boundary. The shared FastAPI backend and MariaDB database are provisioned infrastructure. The accepted calculator arithmetic is an in-page interaction; this document does not require a calculator API, does not define domain entities, and does not introduce persistence. If a later requirement needs server-side behavior, it belongs in the existing shared backend rather than a new service.
The page contract is exact and contains one page.
Purpose and access. The anonymous public entry surface and the only page. It owns number and operator entry, result display, and clearing the entry.
Information and state
= eyebrow label above it.Primary actions
.) to begin or extend a fractional part of the current entry.+, −, ×, ÷) to record the operation to apply.=) to compute and display the result.Supporting actions and content
magma with a lime dot, top-left.numbers, but nicer, beneath the wordmark.., +, -, *, /, Enter/=, and Escape/Delete for clear, mirroring the on-screen keys.Domain entities
Component responsibilities
= eyebrow, oversized result/entry numeral in plum ink, and the error message region.7 8 9 ÷, 4 5 6 ×, 1 2 3 −, 0 . = + — with a full-height lime AC capsule on the left edge and a tall pink equals capsule on the right.States
= eyebrow.FR-1 — Single-page calculator delivery (explicit) As a Calculator user I should get a simple calculator on a single page so that I can do quick arithmetic without navigating anywhere.
FR-2 — Number entry (required_inference) As a Calculator user I should press digit keys to build the number I want to calculate with so that the display shows exactly what I have entered.
0–9 (on-screen or keyboard).FR-3 — Decimal entry (required_inference) As a Calculator user I should press the decimal point key so that I can enter fractional values.
..FR-4 — Operator entry (required_inference) As a Calculator user I should press an operator key so that the calculator knows which operation to apply to my numbers.
+, −, ×, or ÷.FR-5 — Compute and display result (required_inference) As a Calculator user I should press equals so that I see the computed result of my entry.
= (on-screen or keyboard Enter/=).= eyebrow; the result animates up 8px with a 240ms spring (instant under reduced motion).FR-6 — Clear the entry (required_inference) As a Calculator user I should press AC so that I can wipe the current entry and start a new calculation.
Escape/Delete).FR-7 — Keyboard operation (required_inference) As a Calculator user I should be able to use my keyboard so that I can calculate quickly without reaching for the pointer.
., +, -, *, /, Enter/=, or Escape/Delete while the page is focused.Product context. A person — a student, a desk worker, or someone on a phone — who needs a quick answer to an everyday arithmetic problem and opens a single web page to get it. They arrive with no account, no history, and no expectation of one; the page is the whole tool.
Primary goal. Enter a small arithmetic expression and read its result in as few taps as possible, then clear it and move on.
Distinct accepted responsibilities.
Relevant inputs and decisions. Which digits and operator to enter; whether the value is fractional; when the expression is complete enough to evaluate; whether to continue from a result or clear and start over.
Interactions with other participants. None. The Calculator user is the only human actor; the frontend application renders and evaluates the in-page interaction, and no other persona, provider, or counterparty is affected by the calculation.
Observable success. The display strip shows the correct result numeral for the entered expression; pressing AC returns the display to a fresh state ready for the next calculation.
Constraints carried from source. The experience must remain simple and confined to a single page; there is no account, no saved history, and no navigation.
magma wordmark and numbers, but nicer tagline, and the glossy white calculator body with the display strip showing the fresh zero state.1, 2). Each key scales to 0.94 with a glossy flash and the display strip updates to show 12.+). The operator is recorded and shown in the display strip.8), optionally including . for a fractional part. The display reflects the full entry.Enter). The result is computed and slides up 8px with a 240ms spring into the display strip as an oversized numeral beneath the lime = eyebrow.Escape/Delete). The error and entry are cleared and the display returns to the fresh zero state.., and operators (+, -, *, /). The display updates exactly as it would from on-screen keys.Enter or =. The result appears in the display strip as in Flow A step 5.Escape or Delete to clear, returning to the fresh zero state.The creative direction is authoritative for this section. Muse: Karim Rashid — sensual pop minimalism; the calculator as a glossy, joyful object. Headline idea: numbers, but nicer.
Mode. Light mode only.
Colour tokens (exact hex, by role)
| Role | Hex | Usage |
|---|---|---|
| Background (blush ground) | #FBE9F2 | Full-bleed page ground, ~60% of the composition |
| Surface | #FFFFFF | Glossy calculator body and white pill keys, ~25% |
| Text (deep plum ink) | #2A1B2E | Numerals, wordmark, primary labels |
| Primary (hot bubblegum pink) | #FF3D9A | Operator keys, equals capsule, main accent, ~10% |
| Accent (acid lime) | #C6F53C | AC key, = eyebrow, wordmark dot, lime arc, ~5% |
| Muted (muted plum) | #8A6F86 | Secondary labels, keyboard hint line |
Typography
magma is lowercase with a lime dot. Display numerals are large and tabular-feeling, never condensed.clamp. Result numerals clamp(44px, 9vw, 88px).Shape language. Capsules and blobs only. Every key is a pill or soft squircle with 999px / 28px radii. The calculator body is a large continuous-curve blob with border-radius: 48px and asymmetric corners. Curved section edges, glossy highlight arcs on buttons, no sharp corners anywhere. Keys carry a soft pink-tinted drop shadow rather than a border.
Spacing rhythm. A single centered column with generous breathing room: wordmark and tagline at top, the calculator as the hero object sitting slightly off-center on the blush ground with a large decorative blob behind it, and one quiet line of keyboard hints below the pad. Everything stacks to one column at 375px with the pad at full width and 56px minimum tap targets.
Imagery style. No photography. The imagery is the calculator itself as a glossy 3D-feeling object: a large soft pink blob behind it, a lime arc accent, and a subtle specular highlight sweep across the white body. Buttons carry a tiny inner highlight to read as candy-glossy plastic.
Avoid. Blue or indigo accents and near-white ground; gradient-blob SaaS hero with centred headline, subtext and blue CTA; flat rectangular keys with 1px grey borders; the forbidden font families; a grid of identical hover-lift cards; dense dashboard chrome or spreadsheet styling; sharp corners or hard 90-degree section edges; photographic or stock imagery.
The calculator is the hero object.
The public entry — the Calculator page — is composed as a single glossy object floating on a blush-pink ground, not as a page with a calculator widget on it.
#FBE9F2 field. One oversized bubblegum-pink (#FF3D9A) blob bleeds off the left edge; a lime (#C6F53C) arc is cropped at the bottom-right corner. Both are decoration and never overlap readable text or controls.#FFFFFF) blob-bodied device, max-width 420px, centered-right on desktop and centered on mobile, with asymmetric 48px radii and a soft pink shadow. A subtle specular highlight sweeps across the body.#2A1B2E) at clamp(44px, 9vw, 88px), with a tiny lime = eyebrow label above it.magma wordmark with a lime dot sits top-left, with the single tagline line numbers, but nicer beneath it. No centred SaaS headline, no gradient blob hero, no blue button.Every readable element — wordmark, tagline, numerals, labels, key glyphs, hint line — stays whole inside the viewport and its container at 375px, 768px, and 1280px, wrapping or scaling with clamp to fit. The blobs and arc may be cropped and bled; text and controls may not.
Interaction Model: Animated Motion Tempo: expressive Hero Dimensionality: layered_2d
Landing Hero Motion Brief
= eyebrow (outcome). The motion is the tactile feedback of pressing a soft, glossy object; it never adds behavior beyond entry, result display, and clearing.= eyebrow; magma wordmark and tagline top-left; keypad at rest with its pink-tinted shadows and inner specular highlights; the hint line quiet below.prefers-reduced-motion, the background blob freezes at a fixed border-radius, key scale and result spring are disabled, and hover lift is removed — leaving only instant state colour changes. The calculator remains fully usable and every element remains whole and readable.prefers-reduced-motion freezes the blob and disables scale/spring, leaving instant state colour changes.#2A1B2E on white #FFFFFF and on blush #FBE9F2 for all numerals and labels; muted plum #8A6F86 reserved for secondary labels and the hint line.frontend, backend, and database — with the frontend reaching the backend through the shared gateway and the backend connecting to the database. No additional services, queue workers, or ingress routes are needed for the accepted scope.= eyebrow.= eyebrow, the entry/result numeral, and any error message.prefers-reduced-motion state in which the background blob freezes and press scale/spring are disabled.
numbers, but nicer
Type with your keyboard —0-9 . + − × ÷Enter to computeEsc to clear

numbers, but nicer
Type with your keyboard —0-9 . + − × ÷Enter to computeEsc to clear
No comments yet. Be the first!