Files
aigrowthtech/README.md
T
Alejandro Veras a259c92cb0 Let the contact form deliver to several inboxes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:46:20 -04:00

80 lines
2.5 KiB
Markdown

# AI Growth Technologies — website
Next.js 16 (App Router) site for aigrowthtechnologies.com.
## Local development
```bash
npm ci
npm run dev # http://localhost:3000
```
## Environment variables
Copy `.env.example` to `.env.production` (or `.env.local` for development) and fill it in.
| Variable | Required | Purpose |
|---|---|---|
| `RESEND_API_KEY` | yes | Resend key with sending access to `aigrowthtechnologies.com`. Without it the contact form shows an error. |
| `CONTACT_FROM` | yes | Sender, on the domain verified in Resend: `AI Growth Website <hello@aigrowthtechnologies.com>` |
| `CONTACT_TO` | no | Inbox that receives enquiries; separate several with commas. Defaults to `rey@aigrowth360.io`. |
| `TURNSTILE_SECRET_KEY` / `NEXT_PUBLIC_TURNSTILE_SITE_KEY` | no | Cloudflare Turnstile. When both are set, the form shows the challenge. `NEXT_PUBLIC_*` values are baked in at build time, so rebuild after changing it. |
## Deploying to a VPS
Requirements: Node.js 20.9 or newer (22 LTS recommended), npm, nginx, and a process manager such as pm2.
```bash
git clone https://github.com/AlejandroVeras/aigrowth-website.git
cd aigrowth-website
cp .env.example .env.production # then edit it
npm ci
npm run build
pm2 start npm --name aigrowth-website -- start -- -p 3000
pm2 save && pm2 startup # restart on reboot
```
To update later:
```bash
git pull && npm ci && npm run build && pm2 restart aigrowth-website
```
### nginx
Put nginx in front of the Node server and turn off buffering so streamed pages arrive progressively:
```nginx
server {
server_name aigrowthtechnologies.com www.aigrowthtechnologies.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
}
}
```
Then issue HTTPS with `sudo certbot --nginx -d aigrowthtechnologies.com -d www.aigrowthtechnologies.com`.
### DNS
At Hostinger, point the `A` records for `@` and `www` to the VPS IP. Leave the MX records (Titan email) and the Resend
records (`send`, `resend._domainkey`) as they are.
## Content
Inner pages are generated from the Word copy decks:
```bash
python3 -E scripts/convert-docs.py "<folder with the .docx files>"
```
This rewrites `src/content/pages/*.json`. The homepage (`src/app/page.tsx`) is written by hand.