Portfolio / Headless CMS
Ali Haider Portfolio — CMS-Driven Public Website
A fully dynamic personal portfolio on Next.js 16 — every section, menu item and setting comes from a headless CMS, statically generated and revalidated on publish.
- Next.js 16
- React 18
- TypeScript
- Tailwind CSS
- Framer Motion
- ISR / SSG
- NestJS
- MongoDB Atlas
- sanitize-html
- highlight.js

- Client
- Personal project
- Duration
- Jul 2026 — Nov 2026
- Category
- Portfolio / Headless CMS
The public half of a no-code portfolio system: a Next.js site where nothing is hardcoded. Hero, about, skills, projects, experience, education, services, testimonials, blogs and more than twenty other sections are all defined in a shared schema and filled from an admin CMS.
A section renders only when it is both enabled and has published content, and its navigation link appears and disappears with it — so the site never shows an empty heading or a dead menu entry.
Pages are statically generated and kept fresh with Incremental Static Regeneration: when content is published in the admin, the API triggers on-demand revalidation of exactly the pages that changed, so the site stays as fast as a static build without a redeploy.
Key features
Every section, heading, menu item and setting driven by the CMS — zero hardcoded content
Sections and nav links appear only when enabled and published
Static generation with on-demand ISR revalidation triggered by the API on publish
Slug-based detail pages for projects and blog posts with related content
Per-page SEO: meta tags, canonical URLs, dynamic Open Graph images, sitemap and robots
Server-side HTML sanitisation and syntax-highlighted code blocks for rich content
Light/dark theme, CMS-controlled brand colour, Framer Motion animations, maintenance mode
My role
Sole developer — design, frontend, backend and deployment.
Built the Next.js App Router site with SSG + ISR and on-demand revalidation
Designed the shared section-definition package that both the site and the admin consume
Implemented SEO, OG image generation, sitemap and HTML sanitisation
Deployed on a VPS with PM2 and nginx, MongoDB Atlas as the data store
Challenges & solutions
Fully dynamic without being slow. A CMS-driven site usually means a server render on every request. Static generation plus targeted on-demand revalidation keeps pages static while publishing in the admin still shows up within seconds.
Never showing an empty section. Visibility is computed from two conditions — enabled and has published content — in one place, so navigation and page sections can never disagree.
Rendering admin-authored HTML safely. Rich text is sanitised on the server against an allowlist before it reaches the page.
Related projects
Admin Panel / Headless CMSAli Haider Portfolio — Admin CMS
A schema-driven admin CMS for a dynamic portfolio — 25+ content types, rich text, media library, drafts with autosave, drag-to-reorder and a resume builder.
- React 18
- Vite
- TypeScript
- Tailwind CSS
- +8