|
| 1 | +# Gumball Club |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +A decentralized application (dApp) built on the Radix DLT platform that showcases Scrypto concepts and provides a delightful user experience with the Radix Wallet. |
| 6 | + |
| 7 | +## Project Overview |
| 8 | + |
| 9 | +The Gumball Club is a collection of blueprints that facilitates the distribution of Gumball Club tokens and member card NFT badges. These can be used to purchase gumballs and candies from the GumballMachine and CandyMachine components. |
| 10 | + |
| 11 | +### Key Features |
| 12 | + |
| 13 | +- Users can dispense free Gumball Club tokens to purchase member cards, gumballs, and candies |
| 14 | +- Member cards provide access to privileged methods and qualify for discounts |
| 15 | +- Owners can configure component state and metadata |
| 16 | +- Customizable blueprint instantiations |
| 17 | +- Integration with external price oracle for dynamic pricing |
| 18 | + |
| 19 | +## Project Structure |
| 20 | + |
| 21 | +- **scrypto/** - smart contracts written in Scrypto |
| 22 | + - GumballClub Blueprint |
| 23 | + - GumballMachine Blueprint |
| 24 | + - CandyMachine Blueprint |
| 25 | + - SugarPriceOracle Blueprint |
| 26 | +- **dapp/** - Frontend application built with Next.js |
| 27 | +- **deploy/** - Deployment scripts and configurations |
| 28 | + |
| 29 | +## Technologies Used |
| 30 | + |
| 31 | +- **Backend**: Scrypto (Radix's smart contract language) |
| 32 | +- **Frontend**: Next.js, React, TypeScript |
| 33 | +- **Radix DLT**: Radix Dapp Toolkit, Babylon Gateway API SDK |
| 34 | + |
| 35 | +## Getting Started |
| 36 | + |
| 37 | +### Prerequisites |
| 38 | + |
| 39 | +- Node.js (v16 or higher) |
| 40 | +- Radix Engine Simulator or access to Radix Network |
| 41 | +- Radix Wallet (for testing with the dApp) |
| 42 | + |
| 43 | +### Backend Setup (Scrypto) |
| 44 | + |
| 45 | +See the detailed instructions in the [scrypto/README.md](scrypto/README.md) file. |
| 46 | + |
| 47 | +### Frontend Setup (dApp) |
| 48 | + |
| 49 | +1. Navigate to the dapp directory: |
| 50 | + |
| 51 | + ```bash |
| 52 | + cd dapp |
| 53 | + ``` |
| 54 | + |
| 55 | +2. Install dependencies: |
| 56 | + |
| 57 | + ```bash |
| 58 | + npm install |
| 59 | + ``` |
| 60 | + |
| 61 | +3. Run the development server: |
| 62 | + |
| 63 | + ```bash |
| 64 | + npm run dev |
| 65 | + ``` |
| 66 | + |
| 67 | +4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 68 | + |
| 69 | +## Scrypto Concepts Demonstrated |
| 70 | + |
| 71 | +- Radix Engine system-based authority model |
| 72 | +- Native resources |
| 73 | +- Finite state machine guaranteed resource management |
| 74 | +- External blueprint package cross-component call |
| 75 | +- Reusable blueprints |
| 76 | +- Intent based transactions |
| 77 | + |
| 78 | +## Additional Resources |
| 79 | + |
| 80 | +- [Radix DLT Documentation](https://docs.radixdlt.com/) |
| 81 | +- [Scrypto Documentation](https://docs-babylon.radixdlt.com/main/scrypto/introduction.html) |
| 82 | +- [Radix Dapp Toolkit](https://github.com/radixdlt/radix-dapp-toolkit) |
| 83 | + |
| 84 | +## License |
| 85 | + |
| 86 | +This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. |
0 commit comments