Portfolio
- Date
- Author
NINikki Sophie 🌸- Stack
- Next.js, TypeScript, Tailwind CSS, shadcn/ui, PostgreSQL, Prisma, Garage, Docker
- Tags
- Front-EndBack-EndFull-StackWebsiteSelf-Hosted
Pictures
This site: my projects, my writing and the dashboard behind both, written from scratch, with no CMS and no template. You're reading its project page on the thing it describes, which is also where I try out the newest parts of the stack I like using.
So instead of a list, here's this page from both sides.
What you're looking at
If you came here from the projects page, the card you clicked had a colour of its own. Every project takes the colour closest to its cover, or one I pick by hand, and it tints the project's cards, thumbnails and search suggestions.

That search box suggests tags, titles and dates as you type, and dates work in nearly any format: "26 September", "26th" or "09/26" all find something.
Switch the theme and the pictures switch with it. Covers, thumbnails, gallery pictures and pictures in a post's text can each have a dark version, shown while a dark theme is on. There are five themes: light, dark, system and two Catppuccin flavors, Latte and Macchiato. In a post, pictures sit in a frame with an optional caption.

Move the mouse over a card and its border lights up where the pointer is. Scroll, and every block rises in as it comes into view. The scrollbars are slim and take the theme's colours, and if a page ever fails to load, you get the site's own error page with a Try again button rather than a blank screen.

Under every post there are comments, threaded up to three replies deep, once you sign in with Discord. After that you have an account page with your comments, the devices you're signed in on, a download of everything the site keeps about you, and a button to delete your account.
The same page, from my side
When I open this page signed in as a writer, a right-click on a post or project card opens a menu instead of the browser's: open it in a new tab, copy its link, edit it or publish it. Visitors keep the browser's own menu.
Editing takes me to the dashboard. Its overview shows views, drafts and new comments, and next to it are tables of posts, projects, comments and users, plus a page for every person with what they've written and commented.
The text you're reading was written in a Markdown editor with a live preview and a publish column that stays in view. A toolbar covers bold, italic, underline, code, headings, links, lists, quotes, code blocks and tables, with Ctrl shortcuts for the common ones. Lists carry on when I press Enter, and Tab nests them.

A picture goes in by pasting it, dropping it or picking it with the Picture button. I can add a dark version, a description and a caption, and the editor writes the pair into the text. The browser makes four WebP copies, 400, 720, 960 and 2000 pixels wide, and sends them straight to Garage, an S3-compatible store on my own server. Pages then load the copy closest to the size they show.
Each post and project has its own date. Posts can also have a thumbnail for small places next to their cover, and covers are shown at 2:1. Any number of people can be listed as authors, including people without an account, with a name and a link.
The tables bend to the job. Columns can be resized, hidden and reset from a Columns menu, each table remembers its layout, and right-clicking a row opens its menu at the cursor.


Nothing gets lost or left behind. Leaving a form with unsaved changes asks first, and leaving anyway deletes the pictures uploaded since the last save. The Media page lists pictures nothing uses and clears them out. Writers manage all posts and projects; only admins manage users.
What happens in between
This page was prerendered. With Next.js's Cache Components and Partial Prerendering, only the parts that depend on who's signed in stream in after. Menus, cards and the gallery viewer load their code the first time you use them, so a page loads about 200 KB of JavaScript, most of it React and Next.js itself.
The Discord sign-in is written by hand, without an auth library: a single-use state cookie for every login, sessions stored only as hashes, and return paths limited to this site. Every dashboard page and action checks the role on the server. Comments are rate limited and only accepted on published posts, and the contact form has a honeypot, a timing check and rate limits, sending through my own mail server.
And it all runs at home: one Docker container on my home server, behind Caddy, with PostgreSQL in its own container on the same machine. Database migrations run in a separate step before each start, so a migration that fails leaves the running site as it is.







