Personal portfolio built with Next.js.
npm run devApp runs at http://localhost:3000.
Content is file-driven and editable without touching component code:
content/live-build.jsoncontent/posts.jsoncontent/projects.json
UI reads these files through:
src/lib/content.ts
npm run content:checkThis validates shape + required fields + unique slugs.
Blog views can be tracked with free Upstash Redis.
- Create a free Redis database on Upstash.
- Copy REST URL + REST token.
- Set env vars (Vercel or Cloudflare Workers):
UPSTASH_REDIS_REST_URLUPSTASH_REDIS_REST_TOKEN
If env vars are missing, the site falls back to static view counts from content files.
.github/workflows/ci.yml- runs
content:check,lint, andbuildon PRs and pushes tomain
- runs
.github/workflows/content-validation.yml- runs content checks for content-related changes
- Import this GitHub repo in Vercel.
- Set framework to Next.js (auto-detected).
- Add your domain in Vercel Project Settings -> Domains.
- Update DNS at your domain provider using the records shown by Vercel.
- Wait for SSL to provision automatically.
This repo is configured for Cloudflare with:
open-next.config.tswrangler.jsonc(main+assets.directoryset to.open-next/assets)wrangler.jsoncbuild hook (build.command = "npm run cf:build") so directwrangler deployalso works
Build/deploy commands:
npm run cf:build
npm run cf:deployLocal preview:
npm run cf:previewWhy your error happened:
wrangler deploywas run directly.- For Next.js, deploy through OpenNext CLI so it builds + wires assets correctly.
- Use
npm run cf:deployinstead of callingwrangler deploymanually.
Custom domain on Cloudflare:
- Deploy once using
npm run cf:deploy. - In Cloudflare Dashboard -> Workers & Pages -> your worker -> Triggers -> Custom domains.
- Add your domain (for example
whyujjwal.comand/orwww.whyujjwal.com). - Keep DNS proxied in Cloudflare and SSL mode as
Full (strict).