Mythroller
Generating D&D characters using AI
Mythroller is a character generator for tabletop roleplaying games like Dungeons and Dragons. Typical generators for Dungeons & Dragons rely on picking random values from large tables to create unique characters, but this generator uses OpenAI completions and DALL-E.
Check it out here. Or view the code on Github here.

I created this app from the ground up, handling everything from the database schema to picking typefaces for the UI. The tech stack includes NextJS (app router), Prisma ORM, Planetscale (MySQL provider), Vercel (hosting provider) and Tailwind (design system). I'm using the text completion API from OpenAI, as well as DALL-E to generate an image for each character. Character images are persisted to a Cloudinary bucket. Some UI elements make use of THREE.JS.
AI content can take some time to generate. It was important to me that the user can start viewing the character data as soon as possible - so rather than waiting for a long load process, the app immediately starts streaming the generated response content to the user. A class to compose prompts is used to create a unique prompt for each field to be generated, feeding back into the prompt all content that has been generated so far. Each field intelligently understands the dependencies it requires to generate. For example: generating a character's physical description requires the species/age of a character to be generated first - but generating the characters height and weight can be done completely in parallel, as they do not require one another to generate.

I also felt strongly that users should be able to generate a character without logging in. There were some technical challenges to solve with this - but through some cookie management, you can create a character without authenticating, and then create an account (with Google OAuth) later to associate that character with your user and gain privileges to edit that character.
After the character has been generated, individual fields (including the image) can be "re-rolled", and instructions can be given for the re-roll process. A button in the header also allows the entire character to be re-rolled.
This project really broke open an entirely new field of development for me and was full of interesting problems to solve - I'm very happy with how it turned out and I think it demonstrates a fun and interesting use case for LLM text generators such as ChatGPT and others.