niso.moe
  • Projects
  • Posts
  • Contact

© 2026 niso.moe

  • Imprint
  • Privacy
  1. projects
  2. /
  3. plushies

Plushies

Visit siteSource
Date
23 Sep 2026
Author
NINikki Sophie 🌸
Stack
Next.js, TypeScript, Tailwind CSS, shadcn/ui, PostgreSQL, Prisma, Better Auth, Docker
Tags
Front-EndBack-EndFull-StackWebsiteSelf-Hosted

Pictures

A home for every plushie in my collection: each one gets a page with photos, traits, details and comments, and a dashboard keeps them all in order. The best way in is one of those pages. Meet Blåhaj: theirs is the first picture in this project's gallery, with photos on one side and, on the other, their name, a like button, a few traits, a short description and a grid of details. Let's start there and work backwards.

On the page

The details are the kind you'd want to know about a plushie: species, where they're from, gender, pronouns and a birthday, which can be as vague as just a year. If there's a birthday, the age counts along with it. Any other fact can be added with a label of its own.

Plushies can mention each other with an @, in their descriptions and facts, and the plushie being mentioned gets a "Mentioned by" list. If they're part of a group, like a family, the rest of the group is listed too. At the bottom, links lead to the previous and next plushie in the same order as the home page, which is my own: I set it by dragging, and each group's plushies stay together.

Shared links get a preview picture of the plushie, and the site comes in light and dark themes in pink and purple, with link previews and icons made from the same colors.

Signing in to say hi

Visitors who sign in can like a plushie and comment on it. Replies nest as deep as people go, comments can mention plushies too, and they can be edited and deleted. A length limit, a rate limit and a filter that blocks links keep things tidy, and a deleted comment stays as "[deleted]" while it still has replies.

Anyone can report a comment or an account. Once three people report the same comment within 24 hours, it's hidden until an editor or admin has looked at it, and reports are limited per hour so nobody can hide lots of comments with a few accounts.

Signing in works with email and password, Discord or a passkey. Password sign-ins can add two-step codes from an authenticator app or by email, with backup codes. Deleting an account or changing a verified email needs a link from the current inbox, so a stolen session isn't enough.

Signing in with email, Discord or a passkeySigning in with email, Discord or a passkey
Email, Discord or a passkey

Behind the page: the dashboard

Three roles share the site. Users look, like and comment. Editors also manage plushies and moderate comments and reports. Admins also manage people.

For editors and admins there's a dashboard: an overview with upcoming birthdays and how much photo storage is used, lists you can search, sort and filter, comment moderation, the Reports page and the Arrange page where the home page's order is set, by dragging, with arrows or from a plushie's menu.

The dashboard's overviewThe dashboard's overview
Upcoming birthdays on the dashboard
Arranging the plushies, with a family kept together as a groupArranging the plushies, with a family kept together as a group
A family stays together while the order changes

Photos go into a photo library. The browser makes a small and a large copy of each one and uploads them straight to Garage, an S3-compatible store on my own server, with links signed for that one file that last five minutes.

The photo libraryThe photo library
Every photo, and how much space they take

Admins can change roles, ban someone for a set time with a reason, sign someone out everywhere, send a password reset and view the site as someone else. Viewing as someone is strictly read-only, enforced on the server. A few guardrails stop admins from hurting the site: the last admin can't delete their account, admins can't be banned, and the auth library's own admin endpoints are narrowed to what the site actually offers.

Undo, but careful

Every change to plushies, accounts and moderated comments lands in an activity log, and most can be reverted with one click. Each entry stores the fields from before and after the change, and a revert is only offered while the current state still matches that "after". If anything changed since, the button goes away instead of quietly overwriting newer work.

The activity log, with a change ready to revertThe activity log, with a change ready to revert
Every change, with a way back

Under the floor

Discord tokens and two-step secrets are encrypted at rest, sign-in codes are stored only as hashes, and a password reset request takes the same time whether or not the email exists. The page that tells a banned person why only opens through a signed, short-lived cookie. Emails go out through my own mail server, and the site runs with Docker on my home server.

More than 90 tests cover plushies and photos, comments, likes, user management, bans, reverts, two-step sign-in and account settings. Each run starts a throwaway PostgreSQL container, applies the real migrations and removes it afterwards. The setup refuses to run against anything but a local database, emails are recorded instead of sent, and uploads go to a pretend store.

What building it taught me

  • Permissions work best as data, roles mapped to allowed actions, checked on the server in every action instead of only hiding buttons.
  • Threaded comments can be modeled so a page loads whole threads in one query.
  • A live schema keeps growing, from plushies to auth, bans, comments, two-step sign-in and passkeys, and every step needs a careful migration.
  • An audit log has to outlive what it describes, so it stores names and snapshots instead of relying on relations.

On this page

  1. On the page
  2. Signing in to say hi
  3. Behind the page: the dashboard
  4. Undo, but careful
  5. Under the floor
  6. What building it taught me
Back to top
Newer projectTinderhajEvery Blåhaj deserves someone to swim with. Tinderhaj is a dating site for plush sharks, named after IKEA's blue one: owners make a profile for each shark, a moderator checks it…9 Oct 2026 · Next.js · TypeScript · Tailwind CSS
Older projectLudoThe classic board game in the browser: open a room, share the link, and play with friends or bots, with no account and nothing to install. Even before you click anything, a game…16 Sep 2026 · Next.js · TypeScript · Tailwind CSS