A web application for creating, visualizing, and sharing spells for the Hex Casting Minecraft mod. This tool allows you to draw hex patterns, generate spells using AI, save them to a local Grimoire, and share them with others via URL.
- Interactive Hex Canvas: Draw your spells directly on a hexagonal grid.
- AI Spell Generation: Describe what you want the spell to do, and the AI will generate the correct sequence of hex patterns (requires Gemini API Key).
- Grimoire Storage: Save your favorite spells locally in your browser.
- Spell Sharing: Generate a unique link to share your spell with anyone.
- Pattern Templates: Save specific glyph poses to ensure consistency when generating or adding new patterns.
- Import/Export: Backup your entire Grimoire to a JSON file or import existing ones.
- Node.js (v18 or higher recommended)
- npm or yarn
-
Clone the repository:
git clone <your-repo-url> cd hex-casting-grimoire
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173(or the port shown in your terminal).
This application uses the Google Gemini API to generate spells from text descriptions.
Important Security Note:
- The API key is never saved in the source code.
- If you clone this repository, the AI generation feature will not work out-of-the-box until you provide your own API key.
Option 1: Using the UI (Recommended for users)
- Open the app and click the "AI Generation" (magic wand) button.
- Scroll down to "API Settings".
- Paste your Gemini API key into the input field. It will be saved securely in your browser's local storage.
Option 2: Using Environment Variables (For developers)
- Create a file named
.envin the root directory of the project. - Add your Gemini API key like this:
VITE_GEMINI_API_KEY="your_api_key_here"
- Restart the development server.
You can get a free Gemini API key from Google AI Studio.
- React
- TypeScript
- Tailwind CSS
- Lucide React (Icons)
- Google Gen AI SDK
- Vite
MIT License