A booking site that turns visitors into service calls for a local electrician

Live: mahan-electric.vercel.app (in "coming soon" mode until the full launch) · Code: private (client project) · Skills proven: Next.js, React, TypeScript, Tailwind CSS, Node.js, REST APIs, Vercel

The story

Context. Mahan Electric is a locally owned residential electrical contractor in the Greater Philadelphia area: panel upgrades, rewiring, EV chargers, remodels, lighting and troubleshooting. Small trades businesses win work by phone, so the site's job is to make it easy to request service and give an owner in the field every lead right away.

My role and constraints. I built the site end to end, from the first commit to deployment, working with the owner on copy and branding. Constraints: a small-business budget (pay-per-use APIs, no CMS or database), an owner who is on job sites all day, and a public URL that needed to be shareable before the full site was ready.

Key decisions.

  1. Booking: email the owner, text the customer. The form posts to a Next.js API route that validates the request, emails the owner through Resend, then sends the customer an SMS confirmation through Twilio. The email is the request that matters, so if it fails the customer is told to call instead; a failed SMS is logged and doesn't fail the request.
  2. US phone numbers only. Before an SMS goes out, every number is normalized to E.164, and anything outside the US numbering plan is refused. An open SMS form is a known target for toll fraud, where bots submit premium international numbers to run up the bill.
  3. Real reviews or none. Reviews come from the Google Places API, cached for an hour so the site doesn't pay for an API call on every visit. If the API fails or returns nothing, the section hides instead of showing placeholder text.
  4. A launch switch. One environment variable (WIP_MODE) sends every route to a "coming soon" page, so the URL could be shared early while the full site was finished behind it.

What went wrong. An audit before launch found three problems: placeholder reviews that looked real, an SMS path that would text any number in the world, and copy that promised AI phone answering the business doesn't offer. I fixed them across three pull requests: removed the fake reviews and restricted SMS to US numbers, added unit tests for the booking validation, and rewrote the copy to match what the business actually does.

Result. A Next.js site deployed on Vercel in coming-soon mode and ready to launch: a valid service request emails the owner, and once Twilio is configured, the customer gets a confirmation text.

The evidence

flowchart LR
  F[Booking form] --> A[/api/booking/]
  A -->|validate| V{valid US request?}
  V -->|no| E[400 + message]
  V -->|yes| R[Resend: email owner]
  R -->|fails| C[500: please call]
  R -->|ok| T[Twilio: SMS confirmation]
  T --> OK[200]

What I'd do next: rate-limit the booking route, add an end-to-end test of the form, and measure requests per week once the site launches.