WebNest
Team/Shafin Ahmed/portfolio

Repository

portfolio

View on GitHub ↗
TypeScript0 stars0 forks

README

Shafin Ahmed — Portfolio

Personal portfolio website built with Next.js, TypeScript, and Tailwind CSS.

  • Desktop: Windows-style app layout with sidebar navigation
  • Mobile: Android-style layout with bottom navigation

Getting Started

npm install
npm run dev

Open http://localhost:3000.

Scripts

CommandDescription
npm run devStart development server
npm run buildCreate production build
npm run startRun production server
npm run lintRun ESLint
npm run cf:buildBuild for Cloudflare Workers
npm run previewBuild and preview on Workers runtime locally
npm run deployBuild and deploy to Cloudflare (wrangler deploy)

Deploy to Cloudflare Workers

First-time setup (one time only)

  1. Install dependencies
npm install
  1. Log in to Cloudflare
npx wrangler login

This opens your browser. Sign in to your Cloudflare account and allow Wrangler access.

  1. Deploy your site
npm run deploy

This runs two steps automatically:

  • opennextjs-cloudflare build — builds your Next.js app for Workers
  • wrangler deploy — uploads it to Cloudflare

Your site will be live at a URL like:

https://portfolio.<your-subdomain>.workers.dev

You can also add a custom domain later in the Cloudflare dashboard.


After you change code — how to update the live site

Whenever you edit your portfolio (text, design, new sections, etc.), follow this workflow:

Step 1 — Test locally

npm run dev

Check your changes at http://localhost:3000.

Step 2 — Save to GitHub (recommended)

git add .
git commit -m "describe your change"
git push origin main

This keeps your code backed up on GitHub. It does not update Cloudflare by itself unless you set up auto-deploy (see below).

Step 3 — Deploy to Cloudflare

Run this again from your project folder:

npm run deploy

Or step by step:

npm run cf:build
npx wrangler deploy

Cloudflare replaces the old version with your new build. Changes usually go live within 1–2 minutes.


Quick reference — update workflow

Edit code → npm run dev (test) → git push (backup) → npm run deploy (go live)
What you wantCommand
Test changes locallynpm run dev
Push code to GitHubgit add .git commit -m "..."git push
Update live Cloudflare sitenpm run deploy

Option A — Manual deploy (what you use now)

You run npm run deploy yourself after each change. Simple and full control.

You change code → npm run deploy → site updates

Option B — Auto deploy from GitHub (optional)

Connect your repo so Cloudflare deploys automatically when you push to main.

  1. Go to Cloudflare DashboardWorkers & Pages
  2. Click CreateWorkersConnect to Git
  3. Select your repo: Shafin5556/portfolio
  4. Set build settings:
SettingValue
Production branchmain
Build commandnpm install && npx opennextjs-cloudflare build
Deploy commandnpx wrangler deploy
  1. Save and deploy.

After this, your workflow becomes:

Edit code → git push origin main → Cloudflare builds and deploys automatically

You no longer need to run npm run deploy manually.


Preview before deploying (optional)

Test the production build locally in the Workers runtime:

npm run preview

Troubleshooting

ProblemSolution
Not logged inRun npx wrangler login
Build fails on WindowsTry WSL, or deploy via GitHub (Option B)
Old site still showingWait 1–2 min, then hard-refresh (Ctrl+Shift+R)
Wrong worker nameCheck name in wrangler.jsonc (currently portfolio)

Stack

  • Next.js 15
  • React 19
  • TypeScript
  • Tailwind CSS
  • Framer Motion
  • Cloudflare Workers (OpenNext)

License

Private — © Shafin Ahmed

← Back to profile