AZ
Back to constellation
Web3Published

NFTMixer (Go)

A C# / .NET 6 Blazor generative-NFT builder rewritten as a Go API + Next.js frontend, targeting functional parity.

GochiNext.jsTypeScriptMongoDBS3 / MinIOSIWEgo-ethereumPlaywright
Read the write-up

Overview

What it is

NFTMixer (Go) is a web app for building generative NFT collections: upload layered art, organise it into layers and variants with traits and rarity weights, wire a node graph describing how layers combine, generate thousands of unique combinations, review them, then render final PNGs plus metadata to S3 (or download a zip). It is a ground-up rewrite of an existing C# / .NET 6 Blazor Server application.

The problem

The owner wanted full long-term ownership of the stack and does not read C#. Blazor Server is the UI — the .razor files aren't templates, they're a stateful framework pushing DOM diffs over a websocket — so roughly 70% of the "rewrite in Go" was actually frontend work in Next.js.

The architecture

A monorepo with two deployables: a Go service (net/http + chi, a pure domain package, an engine for path-tracing/compositing, Mongo repositories, and an S3/MinIO blob interface) and a Next.js App Router frontend. Art lives in S3 so the service stays stateless and horizontally scalable.

Highlights

The rewrite deliberately did not carry over the original's defects:

  • Auth that actually authenticates. The C# app believed whatever wallet the browser named. The Go version implements real SIWE: server nonce, MetaMask signature, address recovered from the signature via go-ethereum.
  • Ownership from the session, never the URL — closing endpoints that let anyone download anyone's output.
  • Sessions that expire via a TTL index, replacing an in-memory map that was never cleaned.
  • Deliberate parity breaks where the original was wrong: OpenSea-standard metadata instead of a flat dictionary, and every layer resized to output dimensions so non-uniform art composites correctly.

Related write-ups