Skip to content

bezzchen/alexwebsite

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

Create a local env file from the example:

cp .env.example .env.local

Set the Google Maps Embed API key in .env.local:

NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_embed_api_key

Set up the contact form with Resend:

  1. Verify alexanderinn.co.nz as a sending domain in Resend.
  2. Create a Resend API key.
  3. Register Google reCAPTCHA v3 keys for alexanderinn.co.nz, www.alexanderinn.co.nz, and any local/preview domains you want to test.
  4. Add the following values to .env.local and to the Vercel project:
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=your_recaptcha_site_key
RESEND_API_KEY=re_your_api_key
RECAPTCHA_SECRET_KEY=your_recaptcha_secret_key
CONTACT_EMAIL_TO=info@alexanderinn.co.nz,barry.phasel235@gmail.com

CONTACT_EMAIL_TO accepts multiple comma-separated recipients. The form uses the guest's submitted email address as Reply-To, so replying to an enquiry from the recipient's mail client responds directly to the guest. Enquiries are sent from Alexander Inn <info@alexanderinn.co.nz>. The contact API fails closed if reCAPTCHA is not configured, so add the reCAPTCHA keys before deploying this change.

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

Add this environment variable in Vercel under Project Settings → Environment Variables:

NEXT_PUBLIC_GOOGLE_MAPS_API_KEY
NEXT_PUBLIC_RECAPTCHA_SITE_KEY
RESEND_API_KEY
RECAPTCHA_SECRET_KEY
CONTACT_EMAIL_TO

Configure the values for Production, Preview, and Development as needed. Never prefix RESEND_API_KEY or RECAPTCHA_SECRET_KEY with NEXT_PUBLIC_; they must remain server-only.

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages