Welcome to "Infinite Craft NextJS", an experimental project inspired by Neal Agarwal's Infinite Craft. This simple yet engaging game combines words to create new ones using ChatGPT 3.5 by OpenAI, built on Next.js. It serves as a sandbox for experimenting with ChatGPT and React, featuring dnd-kit for drag-and-drop interactions. This project explores the integration of AI into web apps in a fun way!
Live Demo: infinite-craft-nextjs.vercel.app
- Merge Words in a Snap: Just drag and drop two words to mash them into something new and cool.
- Powered by ChatGPT 3.5: Thanks to OpenAI's tech, get ready for endless word combos that'll surprise you.
- Dark or Light Mode: Switch it up to suit your vibe, whether you're a night owl or a daylight lover.
- Smooth Dragging: Super easy and slick drag-and-drop action, making mixing words fun and fuss-free.
- Multiple Word Search Filter: Can't find your word? No sweat. Sort, search, or filter to spotlight your discoveries or hunt for new ones.
- Clear and Reset Button: Messed up or want a fresh start? Hit clear to ditch the current word or reset to wipe the slate clean and begin anew.
This project is coded purely in NextJS, covering both frontend and backend functionalities. Key libraries and technologies used include:
- OpenAI for ChatGPT integration
- dnd-kit for implementing drag-and-drop functionalities
- MongoDB for database management
- Google Analytics for tracking user interaction
Follow these steps to get the project up and running on your local machine:
Ensure you have Node.js installed on your system.
- Clone the project to your local machine:
git clone https://github.com/dekdao/infinite-craft-nextjs.git- Navigate to the project directory:
cd infinite-craft-nextjs- Create a
.envfile in the root directory and add your OpenAI API key, MongoDB URI, and Google Analytics Tracking Code (optional):
NEXT_PUBLIC_OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
MONGO_URI="YOUR_MONGO_DB_CONNECTION_URI"
NEXT_PUBLIC_GA_MEASUREMENT_ID="YOUR_GOOGLE_ANALYTIC_TRACKING_CODE (OPTIONAL)"- Install the necessary packages
npm install- Run the project
npm run devWe welcome contributions from the community! If you wish to contribute to the project, please follow the standard fork and pull request process. Don't hesitate to submit new ideas, bug fixes, or enhancements.
This project is open-sourced under the MIT License. See the LICENSE file for more details.
- Inspired by Neal Agarwal's Infinite Craft
- Thanks to OpenAI for the powerful ChatGPT models.
- Utilizing dnd-kit for smooth drag-and-drop interactions.