Skip to content
fernando.catalan
All projects

WorkWeb · Backend · Cloud

Services site with an online quote builder

A catalog site for companies with case pages and a two-step quote form. Every request is validated and recalculated on the server, stored in DynamoDB and triggers two emails. Built and deployed on AWS Amplify in three days.

Role
Main author. Design, development and deployment
Period
Dec 2026 — Present
Status
In production
Team
Mostly me. A teammate contributed the content for one of the case pages

Professional project: the name and client details are anonymized. The technical description is real.

Context

A unit that offers technology services to companies had a sales document with rates, but no public showcase. I built the site: it presents the service lines with real cases and lets visitors request a quote.

The problem

An interested company had nowhere to understand the offering, see cases and leave a traceable request. Requests arrived with no orderly channel and no tracking number.

A quote form is also a public endpoint. Without protection it fills up with spam, and without server-side validation anyone can submit whatever numbers they like.

What I built

  • A Next.js 15 site with its content in typed TypeScript modules that pages render as Server Components: home, pre-rendered case pages, quote form and privacy notice.

  • A two-step quote form, with the same validation in the browser and on the server.

  • A public endpoint with server-side validation, several layers of protection against spam and abuse, and a size cap on the request body, which is read as a stream.

  • Persistence in on-demand DynamoDB: keyed by reference number, a global index by date and a conditional write so the reference number stays unique.

  • Two emails per request through Amazon SES: a notification to the team with the full detail and an acknowledgment carrying the reference number.

  • A quote estimator as a pure module shared by browser and server, with a fault-tolerant conversion from UF (Chile's inflation-indexed unit) to pesos: two chained sources, caching and a fallback value flagged as such.

  • An animated landing page with no animation libraries, which honors prefers-reduced-motion.

  • The deployment on AWS Amplify, with per-route cache policy and security headers.

Architecture

architecture.svgSwipe →
  • Client
  • Compute
  • Data
  • Managed service
  • External system
  • Client:
    • Browser: companies
  • Hosting:
    • Amplify Hosting: Next.js SSR · API
  • Services:
    • DynamoDB: on-demand · GSI
    • Amazon SES: notice · receipt
    • UF rate sources: 2 chained · cached

Connections:

  • Browser → Amplify Hosting
  • Amplify Hosting → DynamoDB (IAM role)
  • Amplify Hosting → Amazon SES
  • Amplify Hosting → UF rate sources

Technical decisions

  1. The server does not trust the browser

    The estimate is recalculated on the server with the same pure module. The request is stored first and emails go out afterward: if an email fails, the request is still on record, with its delivery flags.

  2. Designing DynamoDB by access pattern

    Persistence started on PostgreSQL with Prisma and I migrated it to DynamoDB. The move forces a different way of thinking: key by reference number, an index by date for listing and a conditional write instead of a unique index.

  3. Privacy by design

    The IP address is only stored as an HMAC-SHA-256 with a secret salt, the accepted consent version is recorded and error logs contain no personal data.

  4. DynamoDB with no access keys

    DynamoDB access uses the app's compute role. Amplify rejects variables prefixed with AWS_ and does not hand variables to the SSR runtime on its own, so the build filters them and writes them to .env.production.

Stack

Frontend
  • Next.js 15
  • React 19
  • TypeScript
  • Tailwind CSS 4
Backend
  • Next.js Route Handlers
  • AWS SDK v3
  • nodemailer
Cloud
  • AWS Amplify Hosting
  • Amazon DynamoDB
  • Amazon SES
  • IAM
Quality
  • Vitest
  • ESLint
  • Docker Compose
  • DynamoDB Local

Outcome

  • A complete site built and deployed in three days, in production on a provisional domain.

  • 20 unit tests: 13 for the estimator and 7 for the request endpoint.

  • 12 pull requests merged in three days (two from a teammate), with a develop to main flow from day one.

What I learned

  • Tailwind 4 and cascade layers: a custom class outside @layer components was overriding utilities and breaking the layout.

  • A catalog with no sessions does not need a global no-store: static assets get long-lived caching and /api routes are never cached.

  • Heavy assets load on demand: a 92 MB 3D model is not downloaded until the visitor asks for it, behind a lightweight cover.