Personal portfolio site for Tommy Chow, built on top of next-template with gallery tooling and Cloudflare Workers deployment.
pnpm install
- Create
.env.local for server-only keys if needed
- Optionally create
.dev.vars for local Cloudflare bindings
pnpm dev
| Command |
Description |
pnpm dev |
Start development server |
pnpm gallery |
Regenerate gallery manifest from public/gallery/images |
pnpm build |
Production build (auto-runs pnpm gallery) |
pnpm start |
Start production server (Node.js) |
pnpm preview |
Build and preview on local Cloudflare Workers |
pnpm deploy |
Build and deploy to Cloudflare Workers |
pnpm upload |
Build and upload to Cloudflare Workers |
pnpm cf-typegen |
Generate Cloudflare binding types |
pnpm lint |
Run ESLint |
pnpm typecheck |
TypeScript type checking |
pnpm check |
Full check: typecheck + lint + format check + build |
pnpm format |
Format with Prettier |
pnpm ui:update |
Regenerate shadcn components to latest |
pnpm clean |
Remove .next, .open-next, node_modules |
pnpm nuke |
Clean + remove pnpm-lock.yaml |
- Create a Worker project in Cloudflare Workers & Pages
- Connect this GitHub repository
- Configure commands:
| Field |
Value |
| Build command |
pnpm exec opennextjs-cloudflare build |
| Deploy command |
pnpm exec opennextjs-cloudflare deploy |
pnpm exec wrangler login
pnpm deploy
- Gallery images live in
public/gallery/images/ and produce src/lib/gallery-manifest.json
- Static caching rules are configured in
public/_headers
- Set
SITE_URL in production for correct metadata, robots.txt, and sitemap.xml