🌌 Welcome to the Megaverse! 🌌
This project is a React-based application that solves Crossmint's coding challenge to mint a new "Megaverse" into existence. Using a RESTful API, the app creates an X-shaped pattern of 🪐POLYanets Soloons and Comeths in a 2D astral grid, showcasing automation, clean coding practices, and resilience
- Features
- Tech Stack
- Setup Instructions
- How It Works
- Challenge Requirements Addressed
- Future Enhancements
- License
- Contributing
- Dynamically generates a grid representing the Megaverse.
- Automates the creation of an X-shape pattern using API calls.
- Visual feedback for real-time updates as Polyanets are minted.
- Modular and scalable code structure with React components.
- Error handling and resilience for API interactions.
- Frontend: React, TypeScript
- Styling: CSS/Tailwind CSS (optional for custom design)
- API Interaction: Axios
- Environment Management: .env for secure handling of API URLs and Candidate ID
To get started with the Megaverse X Creator, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/megaverse-x-creator.git cd megaverse-x-creator -
Install dependencies:
npm install
-
Add a
.envfile with your API details:NEXT_PUBLIC_API_BASE_URL=https://challenge.crossmint.io/api NEXT_PUBLIC_CANDIDATE_ID=your_candidate_id_here -
Start the development server:
npm start
- The app renders an 11x11 grid of astral objects (🌌 by default).
- Clicking the "Create X-Shape" button:
- Dynamically calculates positions for an X-shape.
- Sends POST requests to the
/polyanetsendpoint to mint 🪐POLYanets. - The grid visually updates to reflect the minted objects.
- Clean and understandable code: Structured with reusable components and services.
- Resilient to errors: Handles API failures gracefully with error logging.
- Automated solution: Eliminates the need for manual API calls.
- Proper abstraction: Encapsulates logic in components and utility functions.
- Add support for Soloons and Comeths to expand the grid.
- Implement Phase 2 to create larger, more complex patterns.
- Enhance UI/UX with animations or interactive elements.
This project is open-source and available under the MIT License.
Contributions and feedback are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.