Why I Chose Next.js and Firebase for My Portfolio (And You Might Too)
Ahad Nawaz2 min read
A no-BS walkthrough of why Next.js and Firebase power this site: SSR, static generation, Google Auth, Firestore for the blog, and how to keep it simple without a custom backend.
Picking a stack for your dev portfolio shouldn’t take a week. Here’s how I landed on Next.js + Firebase and what you get out of the box.
What I Wanted
I needed: a fast, SEO-friendly site, a blog with comments and likes, and sign-in so readers could unlock full posts. No servers to run, no DB to host. Ship and forget.
- Next.js, File-based routing, SSR/SSG, great DX.
app/blog/[slug]is the URL. Done. - Firebase Auth, Google sign-in in a few lines. No session tables, no JWT plumbing.
- Firestore, NoSQL for posts, comments, likes. Real-time optional. Security rules handle who reads/writes what.
Why Next.js Fits a Portfolio
You get a production-ready React app without the config. Routing, code splitting, and image optimization are built in. For a blog, that means:
- Static or server-rendered pages, Pre-render posts for speed and SEO. Crawlers see full HTML.
- API routes, Contact form, webhooks, or a small backend live in
app/api/. No separate server. - Image optimization,
next/imagehandles responsive images and lazy loading so the site stays fast.
Why Firebase Fits
Auth and data without standing up a backend. Firestore rules enforce: “anyone can read excerpts; only signed-in users read full posts and add comments.”
- Google sign-in → one popup, you’re in.
- Firestore → collections for
blogs,blogs/{id}/comments,blogs/{id}/likes. No migrations. - Rules → read/write in the Firebase Console. No middleware to maintain.
SEO and Performance
Next.js + clear structure gives you a lot for free: semantic HTML, meta tags per page, and good Core Web Vitals if you keep the bundle lean. Add JSON-LD for Person/BlogPosting later if you want rich results.
What I’d Do Next
MDX for long posts (components inside markdown). Firebase Admin in a seed script so you don’t depend on the browser for initial data. Maybe an RSS feed. For now, this stack ships fast and stays maintainable.
If you’re building a portfolio or a small blog, try Next.js + Firebase. You get performance, auth, and a database without running servers.
Comments
Sign in to leave a comment.