Skip to content

Repository files navigation

Swift Ridge Law Website

Next.js website for Swift Ridge Law with a Cloudflare Pages contact function powered by Resend.

Getting Started

npm install
npm run dev

Open http://localhost:3000 with your browser.

Contact Form Email Setup

The contact form posts to /api/contact, which is implemented as a Cloudflare Pages Function in functions/api/contact.ts. The Resend API key must be configured in Cloudflare, not committed to GitHub.

In Cloudflare Pages, open this project and go to:

Settings -> Environment variables

Add these production variables:

RESEND_API_KEY=re_your_resend_api_key
CONTACT_TO_EMAIL=sarthakbohora1@gmail.com
CONTACT_FROM_EMAIL=Swift Ridge Law <onboarding@resend.dev>

For production sending from the law firm's domain, verify the domain in Resend and then change CONTACT_FROM_EMAIL, for example:

CONTACT_FROM_EMAIL=Swift Ridge Law <contact@swiftridgelaw.com>

After adding or changing environment variables in Cloudflare, redeploy the Pages project.

Cloudflare Pages Deployment

Use the existing Cloudflare Pages Git integration for the sarthak branch.

Recommended settings:

Build command: npm run build
Environment variables: RESEND_API_KEY, CONTACT_TO_EMAIL, CONTACT_FROM_EMAIL

The contact API route is provided by Cloudflare Pages Functions, so it remains deployable on Cloudflare without exposing the Resend key in the browser.

About

A modern and responsive law firm website built with Next.js, React, and Tailwind CSS. For your current project, this is best.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages