This is a Next.js project bootstrapped with create-next-app.
Create a local env file from the example:
cp .env.example .env.localSet the Google Maps Embed API key in .env.local:
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_embed_api_keySet up the contact form with Resend:
- Verify
alexanderinn.co.nzas a sending domain in Resend. - Create a Resend API key.
- Register Google reCAPTCHA v3 keys for
alexanderinn.co.nz,www.alexanderinn.co.nz, and any local/preview domains you want to test. - Add the following values to
.env.localand 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.comCONTACT_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 devOpen 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.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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_TOConfigure 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.