NAME
mana-stats - a manacube statistics platform with player and server search, plus a custom resource-pack renderer that turns minecraft models and animated textures into interactive 3d scenes and cached previews
DESCRIPTION
Mana Stats is a stats and item browser for the ManaCube Minecraft server. It covers player profiles, SVA collections, parkour, guilds, trading and search, and it has its own renderer for ManaCube's resource packs. A background job downloads and indexes the ManaPack, maps item materials and custom-model-data values to Minecraft and ModelEngine models, and stores model and texture metadata in PostgreSQL. The client rebuilds those models as React Three Fiber scenes. It resolves texture references, converts Minecraft face UVs and display transforms into Three.js materials, keeps pixel-art filtering, and plays animated textures defined by .png.mcmeta files. A headless-browser worker renders the scenes into cached PNG thumbnails or GIF previews and only redoes the ones whose textures changed. A companion Discord bot serves the same data for profiles, parkour, guilds and the economy.
DESIGN
- Resource-pack ingestion
- A background updater downloads the latest ManaPack archive, discovers every assets namespace, parses item overrides and custom-model-data mappings, follows Minecraft and ModelEngine model definitions, and synchronizes model elements, groups, materials, display transforms, texture references, and file hashes into PostgreSQL.
- Texture reconstruction
- PNG assets and their .png.mcmeta animation metadata are indexed by namespace and served to the viewer as encoded texture data. The client resolves indirect #texture references, applies nearest-neighbour filtering and sRGB colour space, then clones textures per face so each material can have independent UV offsets, repeats, rotations, and animation state.
- Minecraft-to-Three.js rendering
- Resource-pack cuboids are converted into Three.js geometry while preserving Minecraft coordinates, rotation origins, inverted dimensions, per-face UV rectangles, transparent pixels, GUI/display transforms, flat PNG item layers, and multipart ModelEngine assemblies. Animated sprite sheets advance by Minecraft tick timing or deterministic manual frame stepping.
- Automated image generation
- A pooled Puppeteer worker opens a dedicated WebGL model-viewer route, waits for explicit scene-ready and error signals, and captures static models as PNGs. Animated models are stepped frame by frame, captured as PNG buffers, decoded with pngjs, and assembled into looping GIFs. Texture hashes invalidate and regenerate only affected previews.
FEATURES
- Player search by username or UUID, with typo tolerance
- Player profiles with stats, friends, guilds, and parkour info
- SVA collection viewer with missing and duplicate detection and CSV export
- SVA browser by player or server ownership
- Interactive 3D viewer for Minecraft and multipart ModelEngine models
- Automatic ManaPack download, namespace discovery, model indexing, and incremental sync
- Animated textures from .png.mcmeta frame definitions
- Queued PNG and GIF thumbnails rendered with headless WebGL
- Discord embeds for sharing SVA previews, GIFs, and player info
- Parkour maps by difficulty, builder, and leaderboard stats
- Guild comparisons and member lists
- Staff and patron pages for the ManaCube team and contributors
- Search filters for players, SVAs, maps, and more
- Companion Rust Discord bot with slash commands for profiles, parkour, guilds, economy, and the earth map
CHALLENGES
- Reconstructing Minecraft and multipart ModelEngine models from resource-pack JSON rather than relying on export-ready 3D files
- Translating Minecraft's per-face UV coordinates, rotations, inverted geometry, display transforms, and texture references into correct Three.js geometry and materials
- Rendering .png.mcmeta animated textures consistently in both the interactive viewer and generated GIF previews
- Keeping thousands of cached previews current by hashing texture assets and re-queuing only models affected by a pack update
STACK
- frontend
- React 19, TanStack Router, React Three Fiber, Three.js, Tailwind CSS
- backend
- TanStack Start, Bun, Better Auth, Puppeteer workers, Rust (Discord bot)
- database
- PostgreSQL, Redis, Drizzle ORM
- tools
- Docker, Puppeteer, pngjs, GIFEncoder, Playwright, PM2, twilight / discord-bot-core
LINKS
STATUS
Live. Role: full stack developer.
SEE ALSO
SCREENSHOTS




