JP
HomeBlogProjectsResumeAbout

© 2026 JP. All rights reserved.

Back to projects

Magic Serverless App

I built a serverless web app for managing a tabletop magic system — think crafting spells from components, tracking attribute costs across schools of magic, and exploring a dataset of hundreds of items imported from a master spreadsheet.

Magic Serverless App

Tech Stack

Next.jsTanStackS3Drizzle ORMPostgreSQLAWSCDKS3Lamda

Date

March 4, 2026

View SourceLive Demo

Building a Magic Item Manager with Serverless and Next.js

The Problem

The current magic system lives in a sprawling Excel workbook: items organized by category (plants, gems, monsters, anatomy, etc.), each with attributes, schools, and numeric values. Looking anything up mid-session meant digging through tabs and rows. Crafting a new magical item meant juggling cost formulas, quality multipliers, and context modifiers by hand.

What It Does

Data Explorer — Browse, filter, and sort the full item catalog. Search by name, filter by category or school, paginate through results. Full CRUD so the dataset stays current without touching the spreadsheet.

Crafting Wizard — A five-step guided flow for building magic items:

  1. Pick your magic attribute, school, and base cost
  2. Search and add crafting components from the item database
  3. Adjust quality multipliers
  4. Apply location, event, and holiday cost modifiers
  5. Review the final calculation and save the session

Sessions persist, so you can save mid-craft and pick up later.

AI Query — Ask natural language questions about the dataset, powered by Amazon Bedrock.

The Stack

  • Frontend: Next.js (static export) with TanStack Query, deployed to S3 + CloudFront
  • Backend: Serverless Framework on AWS Lambda with Drizzle ORM against PostgreSQL (Neon)
  • Infrastructure: AWS CDK for S3, CloudFront; Serverless Framework for API Gateway + Lambda
  • Data Pipeline: Excel workbook import via a Lambda-powered ETL endpoint

The entire thing runs serverless — no servers to manage, scales to zero when idle, and costs practically nothing for a small group of users.

Key Decisions

PostgreSQL over DynamoDB — The item data is inherently relational (items belong to categories and schools, crafting sessions reference multiple items with join-like lookups). Postgres with Drizzle ORM made queries straightforward.

Static export over SSR — The data changes infrequently and there's no user-specific content on the public pages. A static Next.js export behind CloudFront keeps latency low and hosting simple.

Excel as the source of truth — Rather than rebuilding the entire dataset from scratch, the import pipeline reads directly from the existing workbook. This kept the game master's workflow intact — edit the spreadsheet, re-import, done.

What I Learned

Serverless is a great fit for niche tools like this. The usage pattern is bursty (game nights), the dataset is modest, and the team is small. The pay-per-request model means it costs almost nothing between sessions, and there's zero ops overhead.

The crafting wizard was the most fun to build — turning a manual formula-heavy process into a step-by-step UI with live cost calculations made the game experience noticeably smoother.


Built with Next.js, AWS Lambda, PostgreSQL, and AWS CDK.