Full-Stack2025Empfohlen

FabWorks

Stahlbau-Plattform

fab-works.vercel.app
FabWorks – Stahlbau-Plattform screenshot 1 of 1
01

Die Herausforderung

Ein Stahlbau-Unternehmen verwaltete Leads, Kalkulationen und Kundenrückfragen per Telefon und Papier – ohne einheitliche Angebote oder Auftragsverfolgung.

02

Der Ansatz

Entwicklung einer Next.js 16 Anwendung als öffentliche Website und Backoffice.

Was ausgeliefert wurde
  • Lead-Erfassung mit Cloudflare Turnstile
  • Kalkulations-Engine für Fertigungskosten
  • 7-stufiger Angebots-Lifecycle mit Aktivitätsprotokoll
  • PDF-Erstellung
  • MongoDB
  • OCI Object Storage und Kunden-Tracking-Portal
03

Das Ergebnis

Leads werden zu kalkulierten Angeboten, die als PDF versendet und vom Kunden über einen sicheren Einmal-Link angenommen, abgelehnt oder zur Überarbeitung zurückgesendet werden.

Systemdesign

So ist FabWorks aufgebaut

Die technische Architekturbeschreibung ist auf Englisch.

A Next.js Pages Router application that is both the public website and the business back office: lead and quotation intake, a client project-tracking portal, and an admin panel with a costed fabrication-estimate engine and a quotation lifecycle that ends in a customer accepting or rejecting a PDF quote by secure link.

quotation states, enforced transitions
7
single-use quote links, stored hashed
256-bit
MongoDB models
16
function budget the PDF design fits
1 GB / 10 s

01 · Clients

client

Visitors & customers

client

Admin staff

02 · Next.js app

gateway

Middleware

per-route cache policy

service

Public site

services, gallery, quotes, tracking · i18n

service

Admin panel

content, leads, estimates

03 · API

service

API routes

Zod DTOs, JWT cookie, rate limits

service

Quotation engine

calc engine, state machine, audit log

worker

Vercel Cron

expire quotations daily

04 · Data

database

MongoDB

Mongoose

16 models

object store

OCI Object Storage

drawings, attachments

05 · Third-party

third-party

PDF render API

hosted browser · Chrome fallback

third-party

SMTP

Nodemailer

third-party

Cloudflare Turnstile

bot check on public forms

clientgatewayserviceworkerdatabaseobject storethird-party

14 connections

  • Visitors & customers→MiddlewareHTTPS
  • Admin staff→MiddlewareHTTPS
  • Middleware→Public site
  • Middleware→Admin panel
  • Public site→API routesleads · quotes · respond
  • Admin panel→API routesCRUD · estimates
  • API routes→Cloudflare Turnstileverify
  • API routes→Quotation engine
  • Quotation engine→MongoDB
  • API routes→MongoDB
  • API routes→OCI Object Storageupload
  • Quotation engine→PDF render APIHTML → PDF
  • Quotation engine→SMTPquote email · async
  • Vercel Cron→Quotation engineexpire stale · async

Request flow · From lead to accepted quotation

  1. 1A visitor requests a quote by materials, an uploaded drawing or a gallery design; Turnstile and a rate limit screen the form and the API stores an intake record.
  2. 2Staff build a costed quotation from line items, templates and material rates; the engine computes subtotals, charges, tax and margin.
  3. 3Sending renders the quote to PDF and emails it with a link carrying a random 256-bit token, of which only the hash is stored.
  4. 4The customer accepts, rejects or requests changes through that link; the state machine allows only legal transitions and a daily cron expires what was never answered.

Design decisions

An explicit state machine
draft → sent → viewed → accepted / rejected / expired, with cancellation from any open state; every transition is checked and written to an activity log.
Links as hashed bearer tokens
A quote link carries a random token; only its hash is stored, so a database read never yields a working link, and expired or revoked links answer 410 or 404.
PDF rendering off the function
Vercel Hobby limits (1 GB, 10 s) are too tight for in-process Chromium, so PDFs render through a hosted browser API behind one htmlToPdfBuffer() entry point.
Intake and estimate stay separate
A public request is a lead; a costed fabrication quotation is a bill of materials. Keeping them apart stops marketing forms from shaping estimating data.
Cache policy at the edge
Middleware marks forms and admin as no-store, catalog APIs as cacheable and static assets as immutable.

Trade-offs & known limits

  • The client tracking portal is gated by order id and phone with a sessionStorage marker: convenient, but not a full authenticated session.
  • WhatsApp sending is a pre-filled wa.me link the admin opens, not automated delivery.

Haben Sie etwas Ähnliches vor?

Ich bin offen für Freelance- und Vertragsprojekte – lassen Sie uns über Ihr Vorhaben sprechen.