A Next.js (App Router) version of the freelance web project pricing calculator. Same functionality as the plain HTML build, restructured into React components with page.js / layout.js conventions.
estimate-nextjs/
├── app/
│ ├── layout.js root layout — fonts, metadata, imports globals.css
│ ├── page.js entry point — renders the calculator
│ └── globals.css theme and layout styles
├── components/
│ └── EstimateCalculator.js all interactive logic and markup
├── lib/
│ └── rates.js pricing constants + the pure pricing calculation
├── package.json
└── next.config.js
npm install
npm run devThen open http://localhost:3000.
npm run build
npm startlib/rates.js— default pricing data and thecomputeQuote()function. Pure logic, no React, easy to unit test independently if you want to add tests later.components/EstimateCalculator.js— a client component ('use client') holding all form state, saved-estimate history, and rate customization. This is where nearly all the logic lives.app/page.js— deliberately thin; just renders<EstimateCalculator />. Keeps the route file simple if you later want to add more routes (e.g./history,/settingsas their own pages).app/layout.js— shared shell: fonts and page metadata.
Same as the HTML version — custom rates and saved estimates are stored in the browser's localStorage, client-side only. Nothing is sent to a server.
The easiest path is Vercel (built by the Next.js team — connect the repo, zero config needed). Also works on Netlify, or any Node host that supports next start.
- Built on Next.js 14.2.35 (patched release addressing the Dec 2025 React Server Components CVEs). If you later upgrade, check nextjs.org/blog for the current recommended version.
- No external UI libraries — plain CSS in
globals.css, same visual design as the original build.