Zum Hauptinhalt springen
Laufend

Alirjt.de — this website

My personal website and the system behind it: a Next.js front end and a NestJS API on PostgreSQL, with a private admin area for posts, projects, media, my resume and messages. Built to be secure and honest by default; verified locally, not public yet.

Aktueller Stand

The first release (MVP 1A) is implemented and verified locally with unit, PostgreSQL end-to-end and real-browser tests. Production containers are prepared on a private server, but the site is not public yet: object storage, email delivery, the domain, the first admin account and backups still need to be set up.

Technologie-Stack

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS 4
  • NestJS 11
  • Prisma 7
  • PostgreSQL 16
  • Docker Compose
  • Caddy
  • Jest
  • Playwright

Why I built it

I wanted one place on the internet that is actually mine: somewhere to show my projects properly, keep my resume up to date and write about whatever is on my mind, without a platform deciding who sees it. You're looking at it.

Who it is for

  • Visitors — recruiters, people I work with, friends, or anyone curious — who want to see my work and read what I write.
  • Me, as the editor — I needed a private admin area to write posts, manage projects, upload images and my resume, and read messages, without touching code for every change.

My role

I built it myself, from the database schema to the page layouts. It's a monorepo with a Next.js front end and a NestJS API in front of PostgreSQL. AI coding assistants helped throughout; deciding what to keep, reviewing it, and testing it carefully was very much my job.

What it does

  • Projects as case studies, with progress status (ongoing, done, paused, archived) kept separate from publishing status (draft, published, archived).
  • Inside Ali's Mind, a writing section with Journal, Ideas & Thoughts and Entertainment categories, tags and cover images.
  • An interactive resume plus a downloadable PDF that I manage from the admin area.
  • A contact form that stores every message before any email is attempted, so a mail outage can't lose a message.
  • An optional visitor check-in on the home page that only stores data with explicit consent.
  • SEO basics — canonical URLs, Open Graph data, a sitemap that only lists published content, and structured data.

How I built it

  • Next.js 16 (App Router) with React 19 and Tailwind CSS 4 for the public pages and the admin area. Pages are rendered on the server and ask the API for published content on every request, so unpublishing something takes effect immediately.
  • NestJS 11 with Prisma 7 and PostgreSQL 16. Every admin route is protected by default; public routes must opt out explicitly.
  • Security as part of the design: hashed passwords, HttpOnly session cookies, one-time CSRF tokens for every admin change, upload checks based on file contents rather than file names, and images streamed through the API only while the content they belong to is published.
  • Safe writing format: posts are Markdown rendered without raw HTML, and links are limited to safe schemes. Here is part of that link rule:
ts
// Only relative links and http(s)/mailto URLs survive; everything else
// (javascript:, data:, protocol-relative URLs, …) is dropped.
const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(normalized)?.[1]?.toLowerCase();
if (!scheme) return undefined;
if (scheme === "http" || scheme === "https") return normalized;
if (scheme === "mailto") return normalized;
return undefined;
  • Tests at three levels: Jest unit tests, API end-to-end suites against a real PostgreSQL test database, and Playwright tests in a real Chrome browser.

Challenges and what I learned

  • "Published" has to mean the same thing everywhere. The page list, the detail page, the sitemap, the home page and the image routes all have to agree on what visitors may see. Keeping that rule in the API, not in each page, was the only way to make it reliable.
  • Concurrent edits are easy to get wrong. Optimistic locking (a version number on every post and project) means two open editor tabs can't silently overwrite each other.
  • Honesty is a feature. It was tempting to fill pages with impressive-sounding placeholders. Writing only what I could back up made the site smaller, but I trust it more.

Where it stands

Status
ImplementedPublic site, writing and project sections, resume, contact, check-in, admin area and SEO
Verified locallyUnit, PostgreSQL end-to-end and real-browser test suites
DeployedNot public yet. Production containers are prepared on a private server; storage, email, the domain and backups still need to be finished

Next steps

  • Finish the production setup and put the site online.
  • Add project update logs and more ways to browse posts.
  • Keep writing.

Links

The source code is in a private repository for now.

  • #nestjs
  • #next-js
  • #postgresql