Personal portfolio site for John Rentschler — developer, fintech, and networker.
Live: johnkrentschler.me
| Layer | Tech |
|---|---|
| Frontend | React 19, TypeScript 5.7, Vite 6 |
| Styling | Hand-authored CSS, custom properties |
| API | Cloudflare Pages Functions |
| Resend | |
| Hosting | Cloudflare Pages |
- Node.js 22+
- npm 10+
- Wrangler CLI (included as a dev dependency)
git clone https://github.com/rntschlr/jkr.me.git
cd jkr.me
npm installCopy the example vars file for local development:
cp .dev.vars.example .dev.varsThen fill in your values in .dev.vars. See .dev.vars.example for reference.
Note: Cloudflare Pages Functions use
.dev.varsinstead of.env. This file is gitignored.
# Start the Vite dev server (frontend only)
npm run dev
# Start with Cloudflare Functions (runs contact API locally)
npx wrangler pages dev dist --compatibility-date=2024-12-01
# Run `npm run build` first, or open two terminals and combine both| Command | Description |
|---|---|
npm run dev |
Start Vite dev server |
npm run build |
Type-check + production build |
npm run preview |
Preview production build locally |
npm run typecheck |
TypeScript type-check only |
npm run lint |
Lint with ESLint |
npm run lint:fix |
Lint and auto-fix |
npm run format |
Format with Prettier |
npm run format:check |
Check formatting without writing |
.
├── functions/
│ └── api/
│ └── contact.ts # Cloudflare Pages Function — email endpoint
├── public/
│ ├── _headers # Cloudflare security + cache headers
│ ├── manifest.json # PWA manifest
│ ├── robots.txt
│ └── sitemap.xml
├── src/
│ ├── components/ # React section components
│ ├── hooks/ # Custom React hooks
│ ├── styles/ # Hand-authored CSS (one file per section)
│ ├── App.tsx
│ ├── main.tsx
│ └── index.css
├── index.html
├── vite.config.ts
└── wrangler.toml
The site deploys automatically to Cloudflare Pages on every push to main via GitHub Actions.
npm run build
npx wrangler pages deploy dist --project-name=personalportfolioSet RESEND_API_KEY in your Cloudflare Pages project settings under Settings → Environment variables.
Without this variable, the contact form falls back to a mailto: link automatically.
The contact form at /api/contact is a Cloudflare Pages Function that:
- Validates required fields (name, email, message)
- Rejects bots via a honeypot field
- Sends email via Resend if
RESEND_API_KEYis set - Returns a
501with"fallback": "mailto"if the key is absent — the frontend handles this gracefully
Production rate limiting is configured at the Cloudflare dashboard level
(Security → Rate limiting rules) on path /api/contact. Recommended
settings: 10 req/min/IP, action Block.
The in-code per-isolate throttle in functions/api/contact.ts is a
defense-in-depth supplement, not a replacement. It only persists for the
lifetime of a single Cloudflare Worker isolate and provides no
cross-isolate protection; the dashboard rule is the authoritative gate.
MIT