This is a full stack web app that allows someone to search for Dungeons & Dragons info and pictures. It's a fun project to explore some of the finer points of NextJS, graphQL and Material, and play with Midjourney (filling out the second half of the Monster Manual and creating the logo and favicon with generated images), among other things. Enjoy!
- Install nvm
- Clone this repo with
git clone git@github.com:CunningDJ/DnD-App.git - In the repo directory, run
nvm use, andnpm installNow you're ready to run the dev or production server! (see below)
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devnpm run lint # Check the lint
# or
npm run lint:fix # Check & auto-fix the lint# Builds the production code
npm run build
# Runs the production code
npm startBelow is the system for creating and adding new or missing monster images to the server.
This will fetch all of the monster names, check which corresponding image files are missing (see "to add more monster images to the server" below for the file name syntax), and print out the corresponding Midjourney prompts in chunks of 4 permutations (Midjourney's max permutations per prompt) to make generating the missing images easy.
npm run missingMjOnce the monster images are generated in Midjourney (or found elsewhere), follow the instructions below to serve them in the server.
- Add a higher-res monster pngs to public/img/monsters/png/, with hyphens instead of spaces, lowercase, and only parentheses preserved aside from alphanumeric, e.g.
- "Goblin Fiend (Fire)" should be named
goblin-fiend-(fire).png - "Red Hawk, Night" should be named
red-hawk-night.png
- "Goblin Fiend (Fire)" should be named
- Run
npm run genMonsterJpgsto convert all of these high-res pngs into more website-friendly, medium-res (max dimension 600px) jpegs and move them into the main server folder git addthe new.jpgs in public/img/monsters (they should show up as untracked ingit status)
