Portfolio with built-in CMS
This site: a Next.js 16 portfolio with a private dashboard to edit everything you see, plus a blog, contact form and privacy-friendly analytics.
- Next.js
- TypeScript
- React
- Supabase
- PostgreSQL
- Drizzle ORM
- Tailwind CSS
- Tiptap
- Docker
I built my own portfolio as a full product instead of a static page: every piece of content comes from a database and is edited from a private dashboard.
Features
Public site
- Home, About, Projects, Blog, Resume and Contact pages.
- Blog with tags, search and scheduled publishing.
- Sitemap, robots.txt, an RSS feed and Open Graph metadata for sharing.
Dashboard
- Sign in with GitHub. Only my GitHub account, checked by its numeric user id, can open the dashboard.
- Edit profile, skills, experience, projects and blog posts, and set the order of skills and projects.
- A rich-text editor (Tiptap) with image upload, and resume upload as a PDF.
- A messages inbox for the contact form.
- Analytics: daily views per page, post and project.
Technical highlights
Fast pages that still update instantly
- Uses Next.js 16 Cache Components: public data is cached and tagged by type (profile, projects, posts…).
- Every dashboard save expires only the matching tag, so visitors get static-site speed and edits appear immediately.
Security
- Every dashboard page and server action checks the admin session on the server.
- Row Level Security is enabled on every Postgres table, so the public Supabase key can read nothing.
- Rich text is sanitised with an allow-list before it is stored, to prevent stored XSS.
- Uploads are checked by their real file signature (magic bytes), not the file name, with size limits of 5 MB for images and 10 MB for PDFs.
- The contact form has a honeypot field and a rate limit, and stores visitor IPs only as hashes.
Privacy-friendly analytics
- One counter row per page per day instead of one row per visit, so no personal data is stored.
- Bots and my own visits are ignored.
Data and deployment
- PostgreSQL on Supabase with Drizzle ORM for typed queries and migrations; Supabase Storage for images and files.
- Set up for deployment with Docker and Caddy (automatic HTTPS) on a VPS, with a health-check endpoint.