# gradation.ai

A retro-terminal-styled web calculator for construction aggregate blends. It validates the target and aggregate gradations, sends them to an external blending service and shows the blend percentages, a deviation score and charts. Anonymous visitors get 3 calculations, and signed-in users keep their inputs.

- **Facts:** 2025, Built for a client, Completed, role: Sole developer
- **What I did:** I built the whole app alone, from the input model and validation to accounts and saving. The blend itself is calculated by an external blending service that the app calls.
- **Scope:** fullstack
- **Domain:** construction
- **Stack:** Next.js, React, TypeScript, Tailwind CSS, Supabase, Drizzle, PostgreSQL, React Hook Form, Zod, Recharts, next-safe-action, T3 Env, React Compiler, Vercel Analytics, dotenvx, Vercel, pnpm, ESLint, Prettier, GitHub Actions, Radix UI, shadcn/ui, Supabase Auth, date-fns
- **Live:** https://www.gradation.ai/calculator
- **Page:** https://sergey-petrinich.vercel.app/work/gradation-ai
- **Screenshot:** https://sergey-petrinich.vercel.app/work/gradation-ai.webp

Capabilities:

- Target gradation on 10 sieves in two modes: exact values or minimum and maximum ranges
- Auto-range button that builds ranges around the exact values with a chosen tolerance
- Any number of aggregates, each with its own gradation and an on/off switch
- Maximum number of aggregates in the blend, following the enabled count
- Sieve-order checks with cell-level messages that name the previous sieve and value
- Blend percentage per aggregate and the combined gradation per sieve
- Deviation score that counts a value inside a range as zero error
- Charts for exact and range targets, finest to coarsest sieve
- Passwordless login with an email and a 6-digit code
- 3 free calculations for anonymous visitors, then a login prompt
- Inputs kept in local storage and, for signed-in users, saved to the database
- First-login migration of local inputs into the account

Back to the [work archive](https://sergey-petrinich.vercel.app/work.md) · [CV](https://sergey-petrinich.vercel.app/cv.md) · [all of it in one file](https://sergey-petrinich.vercel.app/llms-full.txt)
