How I built this portfolio with Next.js, Payload CMS and MongoDB
The stack behind jubaer.live, why I chose it over WordPress for my own site, and what it costs to run.
I've built a lot of WordPress sites, so the obvious choice for my own portfolio was WordPress. I didn't use it. I wanted the site itself to show the other half of what I do: custom builds with a modern JavaScript stack.
Here's what's under the hood.
The stack
Part | What I used |
|---|---|
Framework | Next.js (App Router), React, TypeScript |
CMS / dashboard | Payload CMS 3, running inside the same Next.js app |
Database | MongoDB Atlas (free M0 cluster) |
Images and files | Vercel Blob |
Hosting | Vercel (Hobby plan) |
Domain, DNS and email | Hostinger |
Styling | Plain CSS with design tokens and CSS Modules, no UI library |
Why Payload instead of a page builder
I wanted to edit everything (my profile, the home sections, projects, blog posts) without touching code, but I didn't want a page builder deciding how the HTML looks.
Payload is a headless CMS written in TypeScript that installs into a Next.js app. The admin panel lives at /admin on the same domain, and the public pages read from it directly on the server, with no separate API service to host. I define the content as code:
{ name: "summary", type: "textarea", required: true, maxLength: 220 },
{ name: "showOnHome", type: "checkbox", defaultValue: true },and Payload builds the editing screens, the validation and the database schema from that. When I save a project, the affected pages rebuild on the next visit, so the site stays static and fast but never stale.
Design without a template
The design started as a style guide I wrote myself: an electric-blue "moon" that breathes slowly, a dark night palette, and three typefaces (Anton for display, Plus Jakarta Sans for text, Newsreader for long reading). On desktop, the home page is a deck. The hero shrinks away, a profile card pins to the side, and each section or project takes one scroll step. It's built with native scroll, CSS transitions and a single requestAnimationFrame scroll reader, with no animation library.
On phones and short screens, the deck turns off and it's normal scrolling. Anything clever has to fall back to something plain.
Things I handled that clients never see
- Search and sharing: page titles, descriptions, canonical links, Open Graph images generated on the fly,
sitemap.xml,robots.txt, and structured data (Person on the home page, BlogPosting on articles). - An indexing switch: while the site was unfinished, one checkbox in the dashboard kept every page
noindex. - Analytics events: enquiries, CV downloads and project clicks are tracked in GA4 without sending anyone's name or email to Google.
- Email: a mailbox on my own domain, with SPF, DKIM and DMARC records so enquiry notifications don't land in spam.
- Performance: images are converted to WebP on upload and served from a CDN. (I wrote up one mistake I made there.)
What it costs
Hosting, database and file storage all run on free tiers within their limits. The domain and mailbox are on my existing Hostinger plan. For a personal site with modest traffic, that's enough.
Would I build a client site this way?
For the right client, yes. If a business needs custom logic, an app-like interface or content with a very specific shape, this stack is a pleasure to work in. For a typical brochure site, store or booking site, I still often recommend WordPress. I wrote about how I decide.
Either way, the site you're reading is the proof that I can do both.