This is a Next.js project bootstrapped with create-next-app.
git clone https://github.com/rodneymandap/rodneymandap.github.io.git
cd rodneymandap.github.io
npm install
# or
yarn install
Copy .env.example to .env.local and configure:
cp .env.example .env.local
Edit .env.local with your settings:
# Required: Get your API key from https://resend.com/api-keys
RESEND_API_KEY=re_your_api_key_here
# Optional: Email where contact form submissions will be sent
CONTACT_EMAIL=your-email@example.com
# Optional: The "from" email address (must be verified in Resend)
FROM_EMAIL=onboarding@resend.dev
# Optional: Enable auto-reply to form submitters
SEND_AUTO_REPLY=false
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.
The contact form API is available at /api/contact. It accepts POST requests with the following body:
{
"name": "John Doe",
"email": "john@example.com",
"projectType": "Web Development",
"message": "Your project details here..."
}
Features:
Run the test suite:
npm test
# or
yarn test
Run specific tests:
npm run test -- __tests__/contact.test.ts
npm run build
# or
yarn build
This builds the app for production with support for API routes as serverless functions.
Important: This project uses Next.js API routes for the contact form. Do NOT use next export as it creates a static site without API route support, which will cause the contact form to fail with 405 errors in production.
The easiest way to deploy is using the Vercel Platform:
RESEND_API_KEYCONTACT_EMAILFROM_EMAIL (optional)SEND_AUTO_REPLY (optional)Deployment Notes:
vercel.json configuration ensures the contact API route is deployed as a serverless functioniad1 (US East) regionTroubleshooting:
next build (not next build && next export)Check out the Next.js deployment documentation for more details.
| Variable | Description | Required |
|---|---|---|
RESEND_API_KEY |
Your Resend API key from resend.com/api-keys | Yes |
CONTACT_EMAIL |
Email address to receive contact form submissions | Yes |
FROM_EMAIL |
Sender email address (must be verified in Resend) | No (defaults to onboarding@resend.dev) |
SEND_AUTO_REPLY |
Set to true to send auto-reply to submitters |
No (defaults to false) |
The YNAB MCP endpoint is available at /api/ynab-mcp. It is designed for personal AI clients and keeps the YNAB token server-side.
Required Vercel environment variable:
| Variable | Description | Required |
|---|---|---|
YNAB_CLIENT_ID |
OAuth application client ID from YNAB Developer Settings | Yes for multi-user OAuth |
YNAB_CLIENT_SECRET |
OAuth application client secret from YNAB Developer Settings | Yes for multi-user OAuth |
YNAB_REDIRECT_URI |
OAuth callback URL | Recommended |
UPSTASH_REDIS_REST_URL |
Persistent OAuth token store URL | Yes for production OAuth |
UPSTASH_REDIS_REST_TOKEN |
Persistent OAuth token store token | Yes for production OAuth |
YNAB_ACCESS_TOKEN |
Owner-only fallback personal access token from YNAB Developer Settings | Optional |
MCP_API_KEY |
Owner-only fallback shared secret | Optional |
YNAB_API_BASE |
YNAB API base URL | No (defaults to https://api.ynab.com/v1) |
See docs/ynab-mcp.md for setup and provisioning steps.
The contact form includes several security measures:
.
βββ pages/
β βββ api/
β β βββ contact.ts # Contact form API endpoint
β β βββ hello.ts # Example API route
β βββ _app.tsx # App component with analytics
β βββ index.tsx # Main landing page with contact form
βββ components/
β βββ email-template.ts # Email template (if needed)
βββ __tests__/
β βββ contact.test.ts # API endpoint tests
β βββ navigation.test.jsx
βββ .env.example # Environment variables template
βββ README.md
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.
The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.
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!
This project is open source and available under the MIT License.